Revision: 201005
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Mar 2010 09:37:41 +0200
changeset 12 e6a66db4e9d0
parent 0 c8caa15ef882
child 13 b7e70c0792e6
Revision: 201005 Kit: 201011
XDMEngine/group/XdmEngine.mmp
XDMSettingsUI/data/10207428.rss
XDMSettingsUI/data/XDMPluginRsc.rss
XDMSettingsUI/group/XDMPlugin.mmp
XDMSettingsUI/group/bld.inf
XDMSettingsUI/help/data/xhtml.zip
XDMSettingsUI/inc/XDMPlugin.h
XDMSettingsUI/inc/XDMPluginContainer.h
XDMSettingsUI/inc/XDMPluginSLContainer.h
XDMSettingsUI/inc/XDMPluginSettinglist.h
XDMSettingsUI/src/XDMPlugin.cpp
XDMSettingsUI/src/XDMPluginContainer.cpp
XDMSettingsUI/src/XDMPluginSettinglist.cpp
inc/xcapappusagedef.h
inc/xdmlogwriter.h
layers.sysdef.xml
presencesettingsui/data/psuigspluginrsc.rss
presencesettingsui/group/bld.inf
presencesettingsui/help/data/xhtml.zip
presencesettingsui/inc/psuigsplugin.h
presencesettingsui/inc/psuigsplugincontainer.h
presencesettingsui/inc/psuisipxdmsettingitem.h
presencesettingsui/src/psuigsplugin.cpp
presencesettingsui/src/psuigsplugincontainer.cpp
pressrv_plat/registration_api/inc/simplefactory.h
pressrv_plat/xdm_api/inc/XdmDocument.h
pressrv_plat/xdm_api/inc/XdmProtocolUidList.h
simpledatamodeladapter/group/10275464.rss
simpledatamodeladapter/group/bld.inf
simpledatamodeladapter/group/presenceplugin.mmp
simpledatamodeladapter/inc/presencecontactscontextbase.h
simpledatamodeladapter/inc/presencepluginauthorization.h
simpledatamodeladapter/inc/presenceplugincontacts.h
simpledatamodeladapter/inc/presenceplugincontactsobs.h
simpledatamodeladapter/inc/presenceplugincontactstate.h
simpledatamodeladapter/inc/presenceplugincontactstateend.h
simpledatamodeladapter/inc/presenceplugincontactstatehandler.h
simpledatamodeladapter/inc/presenceplugincontactstateopen.h
simpledatamodeladapter/inc/presenceplugincontactstateresolve.h
simpledatamodeladapter/inc/presenceplugincontactstatesearch.h
simpledatamodeladapter/inc/presenceplugindata.h
simpledatamodeladapter/inc/presencepluginlanguagecodes.h
simpledatamodeladapter/inc/presencepluginlocalstore.h
simpledatamodeladapter/inc/presencepluginpublisher.h
simpledatamodeladapter/inc/presencepluginxdmpresrules.h
simpledatamodeladapter/inc/presencepluginxdmutils.h
simpledatamodeladapter/src/presenceplugin.cpp
simpledatamodeladapter/src/presencepluginauthorization.cpp
simpledatamodeladapter/src/presencepluginconnection.cpp
simpledatamodeladapter/src/presenceplugincontacts.cpp
simpledatamodeladapter/src/presenceplugincontactstate.cpp
simpledatamodeladapter/src/presenceplugincontactstateend.cpp
simpledatamodeladapter/src/presenceplugincontactstatehandler.cpp
simpledatamodeladapter/src/presenceplugincontactstateopen.cpp
simpledatamodeladapter/src/presenceplugincontactstateresolve.cpp
simpledatamodeladapter/src/presenceplugincontactstatesearch.cpp
simpledatamodeladapter/src/presenceplugindata.cpp
simpledatamodeladapter/src/presencepluginentitywatcher.cpp
simpledatamodeladapter/src/presencepluginpublisher.cpp
simpledatamodeladapter/src/presencepluginsession.cpp
simpledatamodeladapter/src/presencepluginxdmpresrules.cpp
simpledatamodeladapter/src/presencepluginxdmutils.cpp
simpledatamodeladapter/src/presensepluginlocalstore.cpp
simpleengine/engine/BWINS/simpleengineU.DEF
simpleengine/engine/EABI/simpleengineU.DEF
simpleengine/engine/inc/simpleconnection.h
simpleengine/engine/inc/simpleengineimhandler.h
simpleengine/engine/src/simpleconnection.cpp
simpleengine/engine/src/simpleengineimhandler.cpp
simpleengine/engine/src/simplefactory.cpp
simpleengine/inc/simplecommon.h
simpleengine/presencedm/src/presencedmadapter.cpp
simpleengine/siputils/BWINS/simplesiputilsU.DEF
simpleengine/siputils/EABI/simplesiputilsU.DEF
simpleengine/siputils/group/simplesiputils.mmp
simpleengine/siputils/inc/simplesipconncallback.h
simpleengine/siputils/inc/simplesipconnection.h
simpleengine/siputils/inc/simplesipconnectionobserver.h
simpleengine/siputils/src/simpledebugutils.cpp
simpleengine/siputils/src/simplesettings.cpp
simpleengine/siputils/src/simplesipconnection.cpp
simpleengine/siputils/src/simplesipconnectionobserver.cpp
simpleengine/siputils/src/simplesipprofileobserver.cpp
sysdef_1_5_1.dtd
xdmprotocols/XcapProtocol/XcapAppUsage/XcapC4/inc/XcapC4.h
xdmprotocols/XcapProtocol/XcapAppUsage/XcapC4/src/XcapC4.cpp
xdmprotocols/XcapProtocol/XcapAppUsage/eabi/XcapAppUsageU.DEF
xdmprotocols/XcapProtocol/XcapAppUsage/group/XcapAppUsage.mmp
xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsage.h
xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsageDef.h
xdmprotocols/XcapProtocol/XcapAppUsage/src/10207416.rss
xdmprotocols/XcapProtocol/XcapAppUsage/src/XcapAppUsage.cpp
xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheIndex.h
xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheServer.h
xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndex.cpp
xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndexEntry.cpp
xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServer.cpp
xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServerMain.cpp
xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheSession.cpp
xdmprotocols/XcapProtocol/XcapHttpTransport/BWINSCW/XcapHttpTransportU.DEF
xdmprotocols/XcapProtocol/XcapHttpTransport/eabi/XcapHttpTransportU.DEF
xdmprotocols/XcapProtocol/XcapHttpTransport/group/XcapHttpTransport.mmp
xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpReqHead.h
xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpReqMkcol.h
xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpTransport.h
xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpAuthManager.cpp
xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpReqHead.cpp
xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpReqMkcol.cpp
xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpTransport.cpp
xdmprotocols/XcapProtocol/XcapOperations/src/XcapHttpOperation.cpp
xdmprotocols/XcapProtocol/XcapOperations/src/XcapOperationFactory.cpp
xdmprotocols/XcapProtocol/XcapOperations/src/XcapRetrieval.cpp
xdmprotocols/XcapProtocol/bwinscw/XcapProtocolU.DEF
xdmprotocols/XcapProtocol/eabi/XcapProtocolU.DEF
xdmprotocols/XcapProtocol/inc/XcapDocument.h
xdmprotocols/XcapProtocol/src/XcapDocument.cpp
xdmprotocols/XdmXmlParser/inc/XmlParserDefines.h
xdmprotocols/XdmXmlParser/src/XdmXmlParser.cpp
xdmprotocols/XdmXmlParser/src/XmlFormatter.cpp
--- a/XDMEngine/group/XdmEngine.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMEngine/group/XdmEngine.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -38,8 +38,7 @@
 SOURCE                          XdmNodeAttribute.cpp
 
 USERINCLUDE                     ../inc
-USERINCLUDE                     ../../pressrv_dom/xdm_api/inc
-//USERINCLUDE                     ../XdmSettingsApi/inc
+USERINCLUDE                     ../XdmSettingsApi/inc
 
 MW_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE                   /epoc32/include/ecom
--- a/XDMSettingsUI/data/10207428.rss	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/data/10207428.rss	Fri Mar 19 09:37:41 2010 +0200
@@ -47,4 +47,4 @@
             }
         };
     }
-
+    
\ No newline at end of file
--- a/XDMSettingsUI/data/XDMPluginRsc.rss	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/data/XDMPluginRsc.rss	Fri Mar 19 09:37:41 2010 +0200
@@ -74,45 +74,14 @@
     {
     items =
         {
-        MENU_ITEM
-            { 
-            command = EGSXDMPluginCmdChange;
-            txt = qtn_xdm_settings_change;
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM 
-            { 
-            command = EGSXDMPluginCmdEdit;
-            txt = qtn_xdm_options_edit_set;
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM 
-            {
-            command = EGSXDMPluginCmdNewSettings;
-            cascade = r_gs_xdm_new_settings_menu; 
-            txt = qtn_xdm_options_new_set;
-            },
-        MENU_ITEM
-            { 
-            command = EGSXDMPluginCmdDelete;
-            txt = qtn_xdm_options_delete;
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdHelp;
-            txt = qtn_options_help;
-            },   
-        MENU_ITEM 
-            { 
-            command = EGSXDMPluginCmdExitFromSL;
-            txt = qtn_options_exit;
-            },     
-        MENU_ITEM 
-            { 
-            command = EAknCmdExit;
-            txt = qtn_options_exit;
-            }     
+        MENU_ITEM { command = EGSXDMPluginCmdChange; txt = qtn_xdm_settings_change; },
+        MENU_ITEM { command = EGSXDMPluginCmdEdit; txt = qtn_xdm_options_edit_set; },
+        MENU_ITEM { command = EGSXDMPluginCmdNewSettings; 
+                cascade = r_gs_xdm_new_settings_menu; txt = qtn_xdm_options_new_set; },
+        MENU_ITEM { command = EGSXDMPluginCmdDelete; txt = qtn_xdm_options_delete; },
+        MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },   
+        MENU_ITEM { command = EGSXDMPluginCmdExitFromSL; txt = qtn_options_exit; },     
+        MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }     
         };
     }
 
@@ -127,16 +96,8 @@
     {
     items =
         {
-        MENU_ITEM 
-            { 
-            command = EGSXDMPluginCmdNewDefault;
-            txt = qtn_xdm_options_new_sub_default;
-            },
-        MENU_ITEM 
-            { 
-            command = EGSXDMPluginCmdNewExisting;
-            txt = qtn_xdm_options_new_sub_existing;
-            }        
+        MENU_ITEM { command = EGSXDMPluginCmdNewDefault; txt = qtn_xdm_options_new_sub_default; },
+        MENU_ITEM { command = EGSXDMPluginCmdNewExisting; txt = qtn_xdm_options_new_sub_existing; }        
         };
     }
     
--- a/XDMSettingsUI/group/XDMPlugin.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/group/XDMPlugin.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -68,12 +68,9 @@
 
 LIBRARY             egul.lib // CGulIcon
 LIBRARY             aknskins.lib // AknsUtils.h
-LIBRARY             apsettingshandlerui.lib  // access point UI
-LIBRARY             commdb.lib
-LIBRARY             apengine.lib  //AP engine
+LIBRARY             cmmanager.lib //Connection Method Manager
 LIBRARY             xdmsettingsapi.lib
 LIBRARY             gsecomplugin.lib //GS Ecom plugin
-LIBRARY             agentdialog.lib // To show access points only in emulator
 
 LIBRARY		        featmgr.lib // Feature Manager
 LIBRARY		        hlplch.lib // HlpLauncher
--- a/XDMSettingsUI/group/bld.inf	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/group/bld.inf	Fri Mar 19 09:37:41 2010 +0200
@@ -47,9 +47,6 @@
 PRJ_MMPFILES
 XDMPlugin.mmp
 
-PRJ_TESTMMPFILES
-//../internal/tsrc/test/group/ut_xdmplugin.mmp
-
   
 #endif //__XDM
 
Binary file XDMSettingsUI/help/data/xhtml.zip has changed
--- a/XDMSettingsUI/inc/XDMPlugin.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/inc/XDMPlugin.h	Fri Mar 19 09:37:41 2010 +0200
@@ -84,7 +84,7 @@
         /**
         * Hides MSK if not needed
         */
-        void UpdateMskL();
+        void UpdateMSK();
 
     public: // From CAknView
         
@@ -174,11 +174,7 @@
         CXDMPluginSLContainer* iSettingListContainer;
         
         // Pointer to the current container - not owned.
-        CCoeControl* iCurrentContainer;   
-        
-#ifdef _DEBUG
-    friend class UT_CXDMPluginContainer;
-#endif
+        CCoeControl* iCurrentContainer;     
     };
 
 #endif // GS_XDMPLUGIN_H
--- a/XDMSettingsUI/inc/XDMPluginContainer.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/inc/XDMPluginContainer.h	Fri Mar 19 09:37:41 2010 +0200
@@ -25,9 +25,7 @@
 #include    <bldvariant.hrh>
 #include    <coeccntx.h>
 #include    <eikclb.h>
-#include    <eikmobs.h>
 #include    <akntitle.h>
-#include    <aknview.h>
 
 #include    "XDMPlugin.hrh"
 
@@ -47,9 +45,7 @@
 /**
 *  CXDMPluginContainer main list container class
 */
-class CXDMPluginContainer : public CCoeControl, 
-                            public MEikListBoxObserver,
-                            public MEikMenuObserver
+class CXDMPluginContainer : public CCoeControl, MEikListBoxObserver
     {
     public: // Constructors and destructor
         
@@ -122,17 +118,6 @@
         void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
         
         /**
-         * From MEikMenuObserver
-         */
-        void SetEmphasis( CCoeControl* /*aMenuControl*/, TBool /*aEmphasis*/ ){};
-      
-        
-        /**
-         * From MEikMenuObserver
-         */
-        void ProcessCommandL( TInt /*aCommandId*/ ){};
-        
-        /**
         * Finds whether main list is empty
         * @return ETrue if main list is empty.
         */
@@ -222,9 +207,8 @@
       
       // Pointer to title pane, not owned
       CAknTitlePane* iTitlePane;
-      
-      // Menubar, owned
-      CEikMenuBar* iEikMenuBar;
+  
+
     };
 
 #endif //GS_XDMPLUGIN_CONTAINER_H   
--- a/XDMSettingsUI/inc/XDMPluginSLContainer.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/inc/XDMPluginSLContainer.h	Fri Mar 19 09:37:41 2010 +0200
@@ -25,7 +25,6 @@
 #include    <bldvariant.hrh>
 #include    <coeccntx.h>
 #include    <eikclb.h>
-#include    <aknview.h>
 
 #include    "XDMPlugin.hrh"
 
--- a/XDMSettingsUI/inc/XDMPluginSettinglist.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/inc/XDMPluginSettinglist.h	Fri Mar 19 09:37:41 2010 +0200
@@ -24,7 +24,7 @@
 // INCLUDE FILES
 #include <coecntrl.h>
 #include <aknsettingitemlist.h>
-#include <agentdialog.h>
+#include <cmmanagerext.h>
 
 // FORWARD DECLARATIONS
 class CSettingsData;
@@ -86,6 +86,12 @@
 
     private:
         
+        
+        /**
+         * By default Symbian 2nd phase constructor is private.
+         */
+        void ConstructL();
+        
         /**
         * C++ constructor
         * @param reference to CSettingsData
@@ -118,9 +124,17 @@
 
     private:
     
-        // Reference to the data owned by container
+        /**
+         *  Reference to the data owned by container
+         */
         CSettingsData& iSettingsData;
         
+        /**
+         * Handle to connection method manager.
+         * Own.
+         */
+        RCmManagerExt iCmManagerExt;
+      
     };
 
 #endif // CXDMPLUGINSETTINGLIST_H
--- a/XDMSettingsUI/src/XDMPlugin.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/src/XDMPlugin.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -212,7 +212,7 @@
     iSettingListContainer->MakeVisible(EFalse);    
     iCurrentContainer = iMainListContainer;
     iAppUi->AddToViewStackL( *this, iCurrentContainer );
-    UpdateMskL();
+    UpdateMSK();
     }
 
 // ---------------------------------------------------------------------------
@@ -274,7 +274,7 @@
             break;
         case EGSXDMPluginCmdDelete:
             iMainListContainer->DeleteSetProcedureL();
-            UpdateMskL();
+            UpdateMSK();
             break;
         case EAknCmdHelp:
             HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppUi()->AppHelpContextL ());
@@ -342,7 +342,7 @@
     iAppUi->AddToViewStackL( *this, iCurrentContainer );
     iMainListContainer->MakeVisible(EFalse);
     iSettingListContainer->MakeVisible(ETrue);
-    UpdateMskL();
+    UpdateMSK();
     }
 
 // ---------------------------------------------------------------------------
@@ -362,7 +362,7 @@
     
     iSettingListContainer->MakeVisible(EFalse);  
     iMainListContainer->MakeVisible(ETrue);
-    UpdateMskL();
+    UpdateMSK();
     }
     
 // ---------------------------------------------------------------------------
@@ -444,16 +444,11 @@
     }
     
 // ---------------------------------------------------------------------------
-// CXDMPlugin::UpdateMskL()
+// CXDMPlugin::UpdateMSK()
 // ---------------------------------------------------------------------------
 //
-void CXDMPlugin::UpdateMskL()
+void CXDMPlugin::UpdateMSK()
     {
-    if ( !Cba() )
-        {
-        return;
-        }
-    
     CEikCba* cba = static_cast< CEikCba* >( Cba()->ButtonGroup() );
     if(iCurrentContainer==iMainListContainer)
         {
--- a/XDMSettingsUI/src/XDMPluginContainer.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/src/XDMPluginContainer.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -102,9 +102,6 @@
     SetRect( aRect );
     ActivateL();
     
-    iEikMenuBar = new ( ELeave ) CEikMenuBar();
-    iEikMenuBar->ConstructL( this, NULL, R_GS_XDM_SETTINGS_MAIN_MENUBAR );
-    
     #ifdef _DEBUG           
     RDebug::Print( _L( "[CXDMPluginContainer] Construct done" ) );
 	#endif
@@ -123,8 +120,6 @@
         {
          delete iMainList;
         }
-    
-    delete iEikMenuBar;
     }
 
 // ---------------------------------------------------------------------------
@@ -203,19 +198,16 @@
     if (iMainList)
         {
         // if cancel key is pressed and list is not empty, invoke deletion
-        if ((aKeyEvent.iCode == EKeyBackspace ) && (aType == EEventKey) &&
-            iEikMenuBar->ItemSpecificCommandsEnabled() )
+        if ((aKeyEvent.iCode == EKeyBackspace ) && (aType == EEventKey) )
             {
             if(!IsListEmpty())
                 DeleteSetProcedureL();
             CXDMPlugin* iTempView = static_cast<CXDMPlugin*> (iView);
-            iTempView->UpdateMskL();
+            iTempView->UpdateMSK();
             return EKeyWasConsumed;
             }
         else
-            {
             return iMainList->OfferKeyEventL (aKeyEvent, aType);
-            }        
         }
     return EKeyWasNotConsumed;
     }
@@ -228,7 +220,7 @@
     {
     // if the Select Key has been pressed
     if ((aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) ||
-    (aListBoxEvent == MEikListBoxObserver::EEventItemSingleClicked))
+    (aListBoxEvent == MEikListBoxObserver::EEventItemDoubleClicked))
         {
         EditCurrentItemL();           
         }
--- a/XDMSettingsUI/src/XDMPluginSettinglist.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/XDMSettingsUI/src/XDMPluginSettinglist.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -22,9 +22,8 @@
 #include "XDMExternalInterface.h"
 
 #include <barsread.h>
-#include <ApSettingsHandlerUI.h>
-#include <ApUtils.h>
-#include <commdb.h>
+#include <cmconnectionmethodext.h>
+#include <cmapplicationsettingsui.h>
 #include <avkon.loc>
 #include <StringLoader.h>
 #include <akntitle.h>
@@ -53,10 +52,20 @@
     {
     CXDMPluginSettinglist* self = new (ELeave) CXDMPluginSettinglist(aData);
     CleanupStack::PushL(self);
+    self->ConstructL();
     return self;
     }
 
 // -----------------------------------------------------------------------------
+// CXDMPluginSettinglist::ConstructL()
+// -----------------------------------------------------------------------------
+// 
+void CXDMPluginSettinglist::ConstructL()
+    {
+    iCmManagerExt.OpenL();
+    }
+
+// -----------------------------------------------------------------------------
 // CXDMPluginSettinglist::CXDMPluginSettinglist(CSettingsData &aData)
 // -----------------------------------------------------------------------------
 // 
@@ -72,7 +81,7 @@
 // 
 CXDMPluginSettinglist::~CXDMPluginSettinglist()
   {
-  // no specific destruction code required - no owned data
+  iCmManagerExt.Close();
   }
 
 // -----------------------------------------------------------------------------
@@ -234,35 +243,21 @@
 // 
 void CXDMPluginSettinglist::EditAccessPointL()
     {
-    // After dialog server for access point selection (RGenConAgentDialogServer)
-    // has deprecated wins emulator mode needs a different technique to show
-    // emulator-lan access point.
-    
-    CCommsDatabase* commsDb = CCommsDatabase::NewL( EDatabaseTypeIAP );
-    CleanupStack::PushL(commsDb);
-    CApUtils* aPUtils = CApUtils::NewLC( *commsDb );
+    TCmSettingSelection selectionUid;
+    CCmApplicationSettingsUi* settingsUi =  CCmApplicationSettingsUi::NewLC();
+    // All Connection Methods will be listed if bearerFilter array has no element.
+    TBearerFilterArray bearerFilter;
+    CleanupClosePushL( bearerFilter );
+    settingsUi->RunApplicationSettingsL( selectionUid ,
+                                         CMManager::EShowConnectionMethods,
+                                         bearerFilter );
+    CleanupStack::PopAndDestroy( &bearerFilter );    
+    CleanupStack::PopAndDestroy( settingsUi );
 
-    CApSettingsHandler *apUi = CApSettingsHandler::NewLC(
-                                                        ETrue, 
-                                                        EApSettingsSelListIsPopUp,
-                                                        EApSettingsSelMenuSelectNormal,
-                                                        KEApIspTypeAll,
-                                                        EApBearerTypeAllBearers,
-                                                        KEApSortNameAscending,
-                                                        EIPv4 | EIPv6
-                                                        );
-    TUint32 id;
-    
-    TRAP_IGNORE(id = aPUtils->WapIdFromIapIdL(iSettingsData.iAccessPoint));
-    
-    //err can also be in case this is new set, iSettingsData.iAccessPoint = -1
-    //so ignoring the error
-    
-    if ( apUi->RunSettingsL( id, id ) == KApUiEventSelected)
+    if ( selectionUid.iResult == CMManager::EConnectionMethod )
         {
-    iSettingsData.iAccessPoint = aPUtils->IapIdFromWapIdL(id);
+        iSettingsData.iAccessPoint = selectionUid.iId;
         }
-    CleanupStack::PopAndDestroy(3, commsDb); //commsDb, aPUtils, apUi
     }
 
 // -----------------------------------------------------------------------------
@@ -271,20 +266,37 @@
 // 
 void CXDMPluginSettinglist::GetAccessPointNameL(TInt32 aAP, TDes& aAccessPoint)
     {
-#if defined __WINS__ && defined _DEBUG // handled differently in wins+debug
-    if (aAP != KErrNotFound) // if access point is defined take a general name
-        StringLoader::Load ( aAccessPoint, R_STR_XDM_AP_NAME_FOR_DEBUG_ONLY);    
-#else
-    CCommsDatabase* commsDb = CCommsDatabase::NewL( EDatabaseTypeIAP );
-    CleanupStack::PushL(commsDb);
-    CApUtils* aPUtils = CApUtils::NewLC( *commsDb );
-    TInt err(KErrNone);
-    // to remove id bug
-    TRAP(err, aAP = aPUtils->WapIdFromIapIdL(aAP)); 
-    TRAP(err, aPUtils->NameL(aAP, aAccessPoint));
-    // dont do anything if name not found or if some error occur
-    CleanupStack::PopAndDestroy(2); // commsDb, aPUtils
-#endif 
+    #ifdef _DEBUG
+    RDebug::Print( _L( "CXDMPluginSettinglist::GetAccessPointNameL - IN" ) );
+    #endif
+    if ( aAP > KErrNotFound )
+        {
+        RCmConnectionMethodExt connMethod = iCmManagerExt.ConnectionMethodL( aAP );
+        CleanupClosePushL( connMethod );
+        
+        HBufC* connName = connMethod.GetStringAttributeL( CMManager::ECmName );
+        CleanupStack::PushL( connName );
+        
+        if ( KMaxAccessPointNameLength >= connName->Des().Length() )
+            {
+            aAccessPoint.Copy( connName->Des() );
+            }
+        else
+            {
+            aAccessPoint.Copy( connName->Des().Left( KMaxAccessPointNameLength ) );
+            }
+        
+        CleanupStack::PopAndDestroy( connName );
+        CleanupStack::PopAndDestroy( &connMethod );
+        #ifdef _DEBUG  
+        RDebug::Print( _L( "CXDMPluginSettinglist::GetAccessPointNameL - Name: %S"),
+                                &aAccessPoint );
+        #endif
+        }
+    #ifdef _DEBUG
+    RDebug::Print( _L( "CXDMPluginSettinglist::GetAccessPointNameL - OUT id: %d:" ),
+                                aAP );
+    #endif
     }
 
 // -----------------------------------------------------------------------------
--- a/inc/xcapappusagedef.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,254 +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:  XcapAppUsage enumerations
-*
-*/
-
-
-
-
-#ifndef __XCAPAPPUSAGEDEF__
-#define __XCAPAPPUSAGEDEF__
-
-// Supported data types    
-enum TDataType
-    {
-    EDataTypeUndefined = 0,
-    EDataTypeString,
-    EDataTypeNonNegativeInteger,
-    EDataTypeAnyURI,
-    EDataTypeDateTime,
-    EDataTypeBoolean,
-    EDataTypeToken,
-    EDataTypeEmpty
-    };
-    
-// AUIDs
-_LIT8( KXdmResourceListsUsageAUID,         "/resource-lists/" );
-_LIT8( KXdmCapabilityUsageAUID,            "/xcap-caps/" );
-_LIT8( KXdmDirectoryUsageAUID,             "/org.openmobilealliance.xcap-directory/" );
-_LIT8( KXdmIetfCommonPolicyUsageAUID,      "/policy-capabilities/" );
-_LIT8( KXdmOmaCommonPolicyUsageAUID,       "/org.openmobilealliance.policy-capabilities/" );
-_LIT8( KXdmPocUserAccessUsageAUID,         "/org.openmobilealliance.poc-rules/" );
-_LIT8( KXdmIetfPresRulesUsageAUID,         "/pres-rules/" );
-_LIT8( KXdmRlsServicesUsageAUID,           "/rls-services/" );
-_LIT8( KXdmSharedXDMUsageAUID,             "/resource-lists/" );
-_LIT8( KXdmOmaPresRulesUsageAUID,          "/org.openmobilealliance.pres-rules/" );
-_LIT8( KXdmPocGroupUsageAUID,              "/org.openmobilealliance.poc-groups/" );
-// add new AUID definitions here
-//_LIT8( KXdmTestAppUsageAUID,               "/org.foo.bar/" );
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentAUID,                "/org.openmobilealliance.pres-content/" );
-// PRES-CONTENT ends
-
-// ContentTypes
-_LIT8( KXdmResourceListsUsageContType,     "application/resource-lists+xml" );
-_LIT8( KXdmCapabilityUsageContType,        "application/xcap-caps+xml" );
-_LIT8( KXdmDirectoryUsageContType,         "application/oma-directory+xml" );
-_LIT8( KXdmIetfCommonPolicyUsageContType,  "application/policy-caps+xml" );
-_LIT8( KXdmOmaCommonPolicyUsageContType,   "application/policy-caps+xml" );
-_LIT8( KXdmSharedXDMUsageContType,         "application/resource-lists+xml" );
-_LIT8( KXdmIetfPresRulesUsageContType,     "application/auth-policy+xml" );
-_LIT8( KXdmPocUserAccessUsageContType,     "application/auth-policy+xml" );
-_LIT8( KXdmOmaPresRulesUsageContType,      "application/auth-policy+xml" );
-_LIT8( KXdmRlsServicesUsageContType,       "application/rls-services+xml" );
-_LIT8( KXdmPocGroupUsageContType,          "application/vnd.oma.poc.groups+xml" );
-// add new content types here
-//_LIT8( KXdmTestAppUsageContType,           "application/test-type+xml" );
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentContType,            "application/vnd.oma.pres-content+xml" );
-_LIT8( KXdmPresContentContTypeOld,         "application/vnd.oma.content+xml" );
-// PRES-CONTENT ends
-
-// Namespaces
-_LIT8( KXdmResourceListsNamespace,         "urn:ietf:params:xml:ns:resource-lists" );
-_LIT8( KXdmCapabilityNamespace,            "urn:ietf:params:xml:ns:xcap-caps" );
-_LIT8( KXdmDirectoryNamespace,             "urn:oma:params:xml:ns:xcap-directory" );
-_LIT8( KXdmIetfCommonPolicyNamespace,      "urn:ietf:params:xml:ns:common-policy" );
-_LIT8( KXdmOmaCommonPolicyNamespace,       "urn:oma:xml:xdm:common-policy" );
-_LIT8( KXdmOmaPresRulesNamespace,          "urn:oma:xml:prs:pres-rules" );
-_LIT8( KXdmIetfPresRulesNamespace,         "urn:ietf:params:xml:ns:pres-rules" );
-_LIT8( KXdmRlsServicesNamespace,           "urn:ietf:params:xml:ns:rls-services" );
-_LIT8( KXdmSharedXDMUriUsageNamespace,     "urn:oma:params:xml:ns:resource-list:oma-uriusage" );
-_LIT8( KXdmPocUserAccessNamespace,         "urn:oma:xml:poc:poc-rules" );
-_LIT8( KXdmPocGroupNamespace,              "urn:oma:xml:poc:list-service" );
-// add new namespace definitions here
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentNamespace,           "urn:oma:xml:prs:pres-content" );
-// PRES-CONTENT ends
-
-// Namespace prefixes
-_LIT8( KXdmSharedXDMUriUsageNsPrefix,       "ou" );
-_LIT8( KXdmResourceListsNsPrefix,           "rl" );
-_LIT8( KXdmIetfCommonPolicyNsPrefix,        "cr" );
-_LIT8( KXdmOmaCommonPolicyNsPrefix,         "ocp" );
-_LIT8( KXdmIetfPresRulesNsPrefix,           "pr" );
-_LIT8( KXdmTestAppUsageDefaultNamespace,    "ta" );
-_LIT8( KXdmPocUserAccessNsPrefix,           "poc" );
-_LIT8( KXdmOmaPresRulesNsPrefix,            "opr" );
-_LIT8( KXdmRlsServicesNsPrefix,             "rls" );
-_LIT8( KXdmPocGroupNsPrefix,                "ls" );
-// add new namespace prefix definitions here
-
-// Common literals
-_LIT( KXdmAuid,                             "auid" );
-_LIT( KXdmUri,                              "uri" );
-_LIT( KXdmEtag,                             "etag" );
-_LIT( KXdmName,                             "name" );
-_LIT( KXdmRef,                              "ref" );
-_LIT( KXdmUse,                              "use" );
-_LIT( KXdmRuleset,                          "ruleset" );
-_LIT( KXdmEntry,                            "entry" );
-_LIT( KXdmEntity,                           "entity" );
-_LIT( KXdmId,                               "id" );
-_LIT( KXdmAnyIdentity,                      "any-identity" );
-_LIT( KXdmIdentity,                         "identity" );
-_LIT( KXdmDomain,                           "domain" );
-_LIT( KXdmAnc,                              "anc" );
-_LIT( KXdmDisplayName,                      "display-name" );
-_LIT( KXdmAnchor,                           "anchor" );
-_LIT( KXdmExternal,                         "external" );
-_LIT(  KXdmList,                            "list" );
-_LIT(  KXdmServiceId,                       "service-id" );
-_LIT8( KXdmZero,                            "0" );
-_LIT8( KXdmOneNbr,                          "1" );
-_LIT8( KXdmTrue,                            "true" );
-_LIT8( KXdmFalse,                           "false");
-_LIT8( KXdmFull,                            "full" );
-_LIT8( KXdmAllow,                           "allow" );
-_LIT8( KXdmBlock,                           "block" );
-
-// Literals for capability
-_LIT( KXdmExtensions,                       "extensions" );
-_LIT( KXdmExtension,                        "extension" );
-_LIT( KXdmAuids,                            "auids" );
-_LIT( KXdmNamespaces,                       "namespaces" );
-_LIT( KXdmNamespace,                        "namespace");
-
-// Literals for directory
-_LIT( KXdmXcapDirectory,                    "xcap-directory" );
-_LIT( KXdmFolder,                           "folder" );
-_LIT( KXdmErrorCode,                        "error-code" );
-_LIT( KXdmLastModified,                     "last-modified" );
-_LIT( KXdmSize,                             "size" );
-
-// Literals for presence
-_LIT( KXdmServiceUriScheme,                "service-uri-scheme" );
-_LIT( KXdmClass,                           "class" );
-_LIT( KXdmOccurenceId,                     "occurence-id" );
-_LIT( KXdmServiceUri,                      "service-uri" );
-_LIT( KXdmAllServices,                     "all-services" );
-_LIT( KXdmProvideServices,                 "provide-services" );
-// pres-rules-03
-_LIT( KXdmDeviceId,                        "device-id" );
-// pres-rules-05
-_LIT( KXdmDeviceID,                        "deviceID" );
-_LIT( KXdmAllDevices,                      "all-devices" );
-_LIT( KXdmProvideDevices,                  "provide-devices" );
-_LIT( KXdmAllPersons,                      "all-persons" );
-_LIT( KXdmProvidePersons,                  "provide-persons" );
-_LIT( KXdmProvideActivities,               "provide-activities" );
-_LIT( KXdmProvideClass,                    "provide-class" );
-_LIT( KXdmProvideDeviceId,                 "provide-device-id" );
-_LIT( KXdmProvideMood,                     "provide-mood" );
-_LIT( KXdmProvidePlaceIs,                  "provide-place-is" );
-_LIT( KXdmProvidePlaceType,                "provide-place-type" );
-_LIT( KXdmProvidePrivacy,                  "provide-privacy" );
-_LIT( KXdmProvideRelationship,             "provide-relationship" );
-_LIT( KXdmProvideStatusIcon,               "provide-status-icon" );
-_LIT( KXdmProvideSphere,                   "provide-sphere" );
-_LIT( KXdmProvideTimeOffset,               "provide-time-offset" );
-_LIT( KXdmProvideUserInput,                "provide-user-input" );
-_LIT( KXdmProvideNote,                     "provide-note" );
-_LIT( KXdmProvideUnknownAttribute,         "provide-unknown-attribute" );
-_LIT( KXdmProvideAllAttributes,            "provide-all-attributes" );
-_LIT( KXdmSubHandling,                     "sub-handling" );
-_LIT( KXdmProvideWillingness,              "provide-willingness" );
-_LIT( KXdmProvideNetworkAvailability,      "provide-network-availability" );
-_LIT( KXdmProvideSessionParticipation,     "provide-session-participation" );
-_LIT( KXdmProvideGeopriv,                  "provide-geopriv" );
-_LIT( KXdmProvideRegistrationState,        "provide-registration-state" );
-_LIT( KXdmProvideBarringState,             "provide-barring-state" );
-_LIT8( KXdmBare,                           "bare" );
-_LIT8( KXdmThresholds,                     "thresholds" );
-_LIT8( KXdmRandomize,                      "randomize" );
-_LIT8( KXdmObfuscate,                      "obfuscate" );
-_LIT8( KXdmConfirm,                        "confirm" );
-_LIT8( KXdmPoliteBlock,                    "polite-block" );
-
-// Literals for commonpolicy
-_LIT( KXdmOtherIdentity,                    "other-identity" );
-_LIT( KXdmExternalList,                     "external-list" );
-_LIT( KXdmAnonymousRequest,                 "anonymous-request" );
-_LIT( KXdmRule,                             "rule" );
-_LIT( KXdmExceptDomain,                     "except-domain" );
-_LIT( KXdmExcept,                           "except" );
-_LIT( KXdmFrom,                             "from" );
-_LIT( KXdmTo,                               "to" );
-_LIT( KXdmValue,                            "value" );
-_LIT( KXdmSphere,                           "sphere" );
-_LIT( KXdmValidity,                         "validity" );
-_LIT( KXdmConditions,                       "conditions" );
-_LIT( KXdmActions,                          "actions" );
-_LIT( KXdmTransformations,                  "transformations" );
-_LIT( KXdmMany,                             "many" );
-_LIT( KXdmUntil,                            "until" );
-_LIT( KXdmOne,                              "one" );
-_LIT( KXdmScheme,                           "scheme" );
-
-// Literals for poc
-_LIT(  KXdmGroup,                           "group");
-_LIT(  KXdmListService,                     "list-service" );
-_LIT(  KXdmInviteMembers,                   "invite-members" );
-_LIT(  KXdmMaxParticipantCount,             "max-participant-count" );
-_LIT(  KXdmIsListMember,                    "is-list-member" );
-_LIT(  KXdmAllowConfState,                  "allow-conference-state" );
-_LIT(  KXdmAllowInvUsersDyn,                "allow-invite-users-dynamically" );
-_LIT(  KXdmJoinHandling,                    "join-handling" );
-_LIT(  KXdmAllowInitiateConf,               "allow-initiate-conference" );
-_LIT(  KXdmAllowAnonymity,                  "allow-anonymity");
-_LIT(  KXdmIsKeyParticipant,                "list-service" );
-_LIT(  KXdmAllowInvite,                     "allow-invite" );
-_LIT8( KXdmReject,                          "reject" );
-_LIT8( KXdmAccept,                          "accept" );
-_LIT8( KXdmPass,                            "pass" );
-
-// Literals for resource list
-_LIT(  KXdmEntryRef,                        "entry-ref");
-_LIT(  KXdmResourceLists,                   "resource-lists");
-
-// Literals for shared
-_LIT(  KXdmUriUsages,                       "uriusages");
-_LIT(  KXdmUriUsage,                        "uriusage");
-
-// Literals for rls
-_LIT(  KXdmRlsServices,                     "rls-services" );
-_LIT(  KXdmService,                         "service");
-_LIT(  KXdmResourceList,                    "resource-list" );
-_LIT(  KXdmPackages,                        "packages" );
-_LIT(  KXdmPackage,                         "package" );
-_LIT8( KXdmPresence,                        "presence" );
-
-// PRES-CONTENT starts
-_LIT( KXdmMimeType,                         "mime-type");
-_LIT( KXdmEncoding,                         "encoding");
-_LIT( KXdmDescription,                      "description");
-_LIT( KXdmData,                             "data");
-_LIT( KXdmSvg,                              "svg");
-_LIT( KXdmRect,                             "rect");
-// PRES-CONTENT ends
-
-#endif      //__XCAPAPPUSAGEDEF__
-            
-// End of File
--- a/inc/xdmlogwriter.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   XDM Engine log writer
-*
-*/
-
-
-
-
-#ifndef __XDMLOGWRITER__
-#define __XDMLOGWRITER__
-
-#include <e32base.h>
-
-_LIT( KXdmLogDir,                                  "XDM" );
-_LIT( KXdmLogFileExt,                              ".txt" );
-_LIT( KXdmLogRoot,                                 "C:\\logs\\" );
-
-//Determines how many log file instances are
-//retained until the directory is cleaned up
-/* E.g. XdmEngine1.txt, XdmEngine2.txt ... XdmEngine10.txt */
-const TInt KMaxLogFiles                            = 10;
-
-/* Default size of the log buffer */
-const TInt KLogBufferMaxSize		               = 2000;
-
-// CLASS DECLARATION
-class CXdmLogWriter : public CBase
-    {
-    public:
-        
-        /**
-        * Symbian OS constructor
-        *
-        * @param TDesC& The log file name
-        * @return CXdmLogWriter* A log writer instance
-        */ 
-        IMPORT_C static CXdmLogWriter* NewL( const TDesC& aLogName );
-        
-        /**
-        * Write a log string.
-        *
-        * @param TDesC& Log string in 16-bit
-        * @return void
-        */     
-        IMPORT_C void WriteToLog( const TDesC& aLogLine ) const;
-        
-        /**
-        * Write a log string.
-        *
-        * @param TDesC8& Log string in 8-bit
-        * @return void
-        */     
-        IMPORT_C void WriteToLog( const TDesC8& aLogLine  ) const;
-        
-        /**
-        * Destructor
-        */ 
-        virtual ~CXdmLogWriter();
-
-    private:
-        
-        /**
-        * C++ constructor is private
-        */ 
-        CXdmLogWriter();
-        
-        /**
-        * Symbian OS second-phase constructor
-        * @param TDesC& Name of the log file to write to
-        * @return void
-        */ 
-        void ConstructL( const TDesC& aLogName );
-        
-    private:  //Data
-        
-        HBufC*              iLogFileName;
-    
-    };
-
-#endif      //__XDMLOGWRITER__
-            
-// End of File
--- a/layers.sysdef.xml	Tue Feb 02 01:05:17 2010 +0200
+++ b/layers.sysdef.xml	Fri Mar 19 09:37:41 2010 +0200
@@ -1,10 +1,10 @@
 <?xml version="1.0"?>
 
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
   <!ENTITY layer_real_source_path "sf/mw/legacypresence" >
 ]>
 
-<SystemDefinition name="legacypresence" schema="1.4.0">
+<SystemDefinition name="legacypresence" schema="1.5.1">
   <systemModel>
     <layer name="mw_layer">
       <module name="legacypresence">
--- a/presencesettingsui/data/psuigspluginrsc.rss	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/data/psuigspluginrsc.rss	Fri Mar 19 09:37:41 2010 +0200
@@ -75,34 +75,12 @@
     {
     items =
         {
-        MENU_ITEM 
-            { 
-            command = EPSUICmdEdit; 
-            txt = qtn_presence_settings_edit;
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM 
-            { 
-            command = EPSUICmdNewSettings;
-            txt = qtn_presence_settings_new;
-            cascade = r_psui_newsettings_menu;
-            },
-        MENU_ITEM 
-            {
-            command = EPSUICmdDelete;
-            txt = qtn_presence_settings_delete;
-            flags = EEikMenuItemSpecific;
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdHelp;
-            txt = qtn_options_help;
-            },
-        MENU_ITEM 
-            { 
-            command = EAknCmdExit;
-            txt = qtn_options_exit;
-            }
+        MENU_ITEM { command = EPSUICmdEdit; txt = qtn_presence_settings_edit; },
+        MENU_ITEM { command = EPSUICmdNewSettings; txt = qtn_presence_settings_new;
+            cascade = r_psui_newsettings_menu; },
+        MENU_ITEM { command = EPSUICmdDelete; txt = qtn_presence_settings_delete; },
+        MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
+        MENU_ITEM { command = EAknCmdExit; txt = qtn_options_exit; }
         };
     }
 
@@ -115,16 +93,8 @@
     {
     items =
         {
-        MENU_ITEM 
-            { 
-            command = EPSUICmdNewSettingsDefault;
-            txt = qtn_presence_settings_new_default;
-            },
-        MENU_ITEM 
-            { 
-            command = EPSUICmdNewSettingsExisting;
-            txt = qtn_presence_settings_new_existing;
-            }
+        MENU_ITEM { command = EPSUICmdNewSettingsDefault; txt = qtn_presence_settings_new_default; },
+        MENU_ITEM { command = EPSUICmdNewSettingsExisting; txt = qtn_presence_settings_new_existing; }
         };
     }
 
@@ -214,22 +184,9 @@
     {
     items =
         {
-        MENU_ITEM 
-            { 
-            command = EPSUICmdChange;
-            txt = qtn_presence_settings_change;
-            flags = EEikMenuItemAction;
-            },
-        MENU_ITEM
-            {
-            command = EAknCmdHelp;
-            txt = qtn_options_help;
-            },
-        MENU_ITEM
-            {
-            command = EEikCmdExit;
-            txt = qtn_options_exit;
-            }
+        MENU_ITEM { command = EPSUICmdChange; txt = qtn_presence_settings_change; },
+        MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; },
+        MENU_ITEM { command = EEikCmdExit; txt = qtn_options_exit; }
         };
     }
 
--- a/presencesettingsui/group/bld.inf	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/group/bld.inf	Fri Mar 19 09:37:41 2010 +0200
@@ -43,7 +43,7 @@
 psuigsplugin.mmp
 
 PRJ_TESTMMPFILES
-//../internal/tsrc/test/group/ut_presencesettingsui.mmp
+// none
 
 PRJ_TESTEXPORTS
 // none
Binary file presencesettingsui/help/data/xhtml.zip has changed
--- a/presencesettingsui/inc/psuigsplugin.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/inc/psuigsplugin.h	Fri Mar 19 09:37:41 2010 +0200
@@ -22,7 +22,6 @@
 #define PSUIGSPLUGIN_H
 
 //  INCLUDES
-#include <eikmobs.h>
 #include <ConeResLoader.h>
 #include <gsbaseview.h>
 
@@ -40,8 +39,7 @@
 */
 class CPSUIGSPlugin : 
     public CGSBaseView,
-    public MCoeViewDeactivationObserver,
-    public MEikListBoxObserver
+    public MCoeViewDeactivationObserver
     {
     
     public: // Constructors and destructor
@@ -128,12 +126,6 @@
         void HandleViewDeactivation ( 
             const TVwsViewId& aViewIdToBeDeactivated,
             const TVwsViewId& aNewlyActivatedViewId );
-            
-        /**
-        * From MEikListBoxObserver
-        * See base class.
-        */
-        void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
         
     public: // New
 
@@ -215,11 +207,6 @@
         TBool iClosing;
         // Previous view
         TVwsViewId iPSUIGSPrevViewId; 
-        
-#ifdef _DEBUG
-    friend class UT_CPSUIGSPlugin;
-    friend class UT_CPSUIGSPluginContainer;
-#endif
     };
 
 #endif // PSUIGSPLUGIN_H
--- a/presencesettingsui/inc/psuigsplugincontainer.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/inc/psuigsplugincontainer.h	Fri Mar 19 09:37:41 2010 +0200
@@ -22,7 +22,6 @@
 #define PSUIGSPLUGINCONTAINER_H
 
 // INCLUDES
-#include <eikmobs.h>
 #include <GSBaseContainer.h>
 
 // FORWARD DECLARATIONS
@@ -34,8 +33,7 @@
 * CPSUIGSPluginContainer container class
 * @since Series60_3.2
 */
-class CPSUIGSPluginContainer : public CGSBaseContainer,
-                               public MEikMenuObserver
+class CPSUIGSPluginContainer : public CGSBaseContainer
     {
     public: // Constructors and destructor
         
@@ -71,17 +69,6 @@
         */ 
         void GetHelpContext( TCoeHelpContext& aContext ) const;
         
-        /**
-         * From MEikMenuObserver
-         */
-        void SetEmphasis( CCoeControl* /*aMenuControl*/, TBool /*aEmphasis*/ ){};
-      
-        
-        /**
-         * From MEikMenuObserver
-         */
-        void ProcessCommandL( TInt /*aCommandId*/ ){};
-        
     private: // New
 
         /**
@@ -104,16 +91,6 @@
     
         // Handle to view        
         CPSUIGSPlugin* iView; // not owned
-        
-        /**
-         * Menubar.
-         * Own.
-         */
-        CEikMenuBar* iEikMenuBar;
-        
-#ifdef _DEBUG
-    friend class UT_CPSUIGSPluginContainer;
-#endif
     };
 
 #endif //PSUIGSPLUGINCONTAINER_H   
--- a/presencesettingsui/inc/psuisipxdmsettingitem.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/inc/psuisipxdmsettingitem.h	Fri Mar 19 09:37:41 2010 +0200
@@ -27,7 +27,6 @@
 // FORWARD DECLARATIONS
 
 // CLASS DECLARATION
-class CPSUIGSPluginModel;
 
 /**
 * CPSUISipXdmSettingItem setting class
--- a/presencesettingsui/src/psuigsplugin.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/src/psuigsplugin.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -505,30 +505,10 @@
 // 
 void CPSUIGSPlugin::UpdateMSK()
     {
-    if ( !Cba() )
-        {
-        return;
-        }
-    
     TBool showEdit = ( 0 < Container()->iListBox->Model()->NumberOfItems());
     CEikCba* cba = static_cast< CEikCba* >( Cba()->ButtonGroup() );
     cba->MakeCommandVisible( EPSUICmdEdit, showEdit );
     cba->DrawNow();
     }
-    
-// ---------------------------------------------------------------------------
-// CPSUIGSPlugin::HandleListBoxEventL()
-// ---------------------------------------------------------------------------
-//
-void CPSUIGSPlugin::HandleListBoxEventL(
-	  CEikListBox* /*aListBox*/, TListBoxEvent aListBoxEvent)
-    {
-    // if the Select Key has been pressed
-    if ((aListBoxEvent == MEikListBoxObserver::EEventEnterKeyPressed) ||
-    (aListBoxEvent == MEikListBoxObserver::EEventItemSingleClicked))
-        {
-        HandleListBoxSelectionL();   
-        }
-    }
 
 // End of file
--- a/presencesettingsui/src/psuigsplugincontainer.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/presencesettingsui/src/psuigsplugincontainer.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -49,9 +49,6 @@
     {
     iListBox = new ( ELeave ) CAknSingleStyleListBox();// base needs the iListBox to be prepared 1st
     BaseConstructL( aRect, R_PSUI_MAINVIEW_TITLE, 0 );// last parameter 0, since dynamic listbox
-    
-    iEikMenuBar = new ( ELeave ) CEikMenuBar();
-    iEikMenuBar->ConstructL( this, NULL, R_PSUI_MAINVIEW_MENUBAR );
     }
 
 // ---------------------------------------------------------------------------
@@ -61,7 +58,6 @@
 //
 CPSUIGSPluginContainer::~CPSUIGSPluginContainer()
     {
-    delete iEikMenuBar;
     }
 
 // ---------------------------------------------------------------------------
@@ -116,8 +112,7 @@
     TEventCode aType )
     {
     if ( iView && aType == EEventKey 
-        && aKeyEvent.iCode == EKeyBackspace && 
-        iEikMenuBar->ItemSpecificCommandsEnabled() )
+        && aKeyEvent.iCode == EKeyBackspace )
         {
         iView->DeleteSettingsL();
         return EKeyWasConsumed;
--- a/pressrv_plat/registration_api/inc/simplefactory.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/pressrv_plat/registration_api/inc/simplefactory.h	Fri Mar 19 09:37:41 2010 +0200
@@ -162,15 +162,6 @@
     IMPORT_C static MSimpleContent* NewContentL( 
         const TDesC8& aContentID, const TDesC8& aContentType );    
 
-    /**
-     * Create new simple engine Connection entity.
-     * @since S60 3.2
-     * @param aObserver client callback observer
-     * @param aServiceId serviceId of current service
-     * @return MSimpleConnection, ownership is transferred.
-     */
-    IMPORT_C static MSimpleConnection* NewConnectionL(
-        MSimpleConnectionObserver& aObserver, TInt32 aServiceId );
     };
 
 #endif
--- a/pressrv_plat/xdm_api/inc/XdmDocument.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/pressrv_plat/xdm_api/inc/XdmDocument.h	Fri Mar 19 09:37:41 2010 +0200
@@ -40,9 +40,7 @@
     EXdmIetfCommonPolicy,
     EXdmOmaCommonPolicy,
     EXdmIetfPresenceRules,
-    EXdmOmaPresenceRules,
-    EXdmPresContent,
-    EXdmPresContentNSN
+    EXdmOmaPresenceRules
     };
 
 //Helper class for searching documents; 16-bit 
--- a/pressrv_plat/xdm_api/inc/XdmProtocolUidList.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/pressrv_plat/xdm_api/inc/XdmProtocolUidList.h	Fri Mar 19 09:37:41 2010 +0200
@@ -43,8 +43,6 @@
 const TInt KXdmOmaCommonPolicyUsageUid    = 0x10275082;
 const TInt KXdmIetfPresRulesUsageUid      = 0x10275083;
 const TInt KXdmOmaPresRulesUsageUid       = 0x102750AB;
-const TInt KXdmUsageUid                   = 0x20028701;
-const TInt KXdmNSNUsageUid                = 0x20028702;
 
 #endif      //__XDMPROTOCOLUIDLIST__
             
--- a/simpledatamodeladapter/group/10275464.rss	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/group/10275464.rss	Fri Mar 19 09:37:41 2010 +0200
@@ -52,4 +52,4 @@
                 };
             }
         };
-    }
+    }
\ No newline at end of file
--- a/simpledatamodeladapter/group/bld.inf	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/group/bld.inf	Fri Mar 19 09:37:41 2010 +0200
@@ -22,15 +22,15 @@
 DEFAULT
 
 PRJ_EXPORTS
-#ifdef GC_AREA_PARTIAL_INCLUDE_CHANGE_ON
-#else
-#endif
+//#ifdef GC_AREA_PARTIAL_INCLUDE_CHANGE_ON
+//#else
+//#endif
 
-../rom/simpledatamodeladapter.iby CORE_MW_LAYER_IBY_EXPORT_PATH(simpledatamodeladapter.iby)
+//../rom/simpledatamodeladapter.iby CORE_MW_LAYER_IBY_EXPORT_PATH(simpledatamodeladapter.iby)
 
 PRJ_MMPFILES
-presenceplugin.mmp
-#include "../simpleimplugin/group/bld.inf"
+//presenceplugin.mmp
+//#include "../simpleimplugin/group/bld.inf"
 
 PRJ_TESTMMPFILES
 //../internal/tsrc/group/T_SIMPLEDataModelAdapter.mmp
--- a/simpledatamodeladapter/group/presenceplugin.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/group/presenceplugin.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -50,14 +50,6 @@
 SOURCE          presencepluginvirtualgroup.cpp
 SOURCE          presenceconnectioninfo.cpp
 SOURCE          presencepluginutility.cpp
-SOURCE          presenceplugincontacts.cpp
-SOURCE          presenceplugincontactstatehandler.cpp
-SOURCE          presenceplugincontactstate.cpp
-SOURCE          presenceplugincontactstateopen.cpp
-SOURCE          presenceplugincontactstateresolve.cpp
-SOURCE          presenceplugincontactstatesearch.cpp
-SOURCE          presenceplugincontactstateend.cpp
-SOURCE          presensepluginlocalstore.cpp
 
 USERINCLUDE     .
 USERINCLUDE     ../inc
@@ -78,10 +70,6 @@
 LIBRARY         xdmsettingsapi.lib
 LIBRARY         presencesettingsapi.lib
 
-LIBRARY         efsrv.lib
-LIBRARY         edbms.lib 
-LIBRARY         avkon.lib
-
 //presence cache
 LIBRARY         presencecacheclient2.lib
 LIBRARY         presencecacheutils.lib
@@ -91,8 +79,4 @@
 
 // access to uiservicetabsettings
 LIBRARY         vimpstsettings.lib
-
-// access to Virtual Phonebook contact database
-LIBRARY         vpbkeng.lib
-
 // End of file
--- a/simpledatamodeladapter/inc/presencecontactscontextbase.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 20010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef M_MPRESENCECONTACTSCONTEXTBASE_H
-#define M_MPRESENCECONTACTSCONTEXTBASE_H
-
-
-class MVPbkContactLinkArray;
-class MVPbkContactLink;
-
-
-/**
- *  Base class to state context
- *
- *  @lib presenceplugin.dll
- *  @since S60 v5.0
- */
-class MPresenceContactsContextBase
-    {
-
-public:
-
-    /**
-     * Open virtual phonebook contact stores
-     *
-     * @since S60 v5.0
-     */
-    virtual void OpenL() = 0;
-
-    /**
-     * Start virtual phonebook contacts search
-     *
-     * @since S60 v5.0
-     */
-    virtual void SearchL() = 0;
-
-    /**
-     * Return virtual phonebook contact links
-     *
-     * @since S60 v5.0
-     * @return virtual phonebook contact links
-     */
-    virtual const MVPbkContactLinkArray& ContactLinkArrayL() = 0;
-    
-    /**
-     * Resolve virtual phonebook contact from contact link
-     *
-     * @since S60 v5.0
-     * @param aContactLink contact link to resolve
-     */
-    virtual void RetrieveContactL(
-            const MVPbkContactLink& aContactLink ) = 0;
-
-    };
-
-
-#endif // M_MPRESENCECONTACTSCONTEXTBASE_H
--- a/simpledatamodeladapter/inc/presencepluginauthorization.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/inc/presencepluginauthorization.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -23,7 +23,6 @@
 #include <ximpbase.h>
 #include <protocolpresenceauthorization.h>
 #include "mpresencepluginconnectionobs.h"
-#include "presenceplugincontactsobs.h"
 #include "presencelogger.h"
 
 class TXIMPRequestId;
@@ -32,7 +31,6 @@
 class MProtocolPresenceAuthorizationDataHost;
 class MSimpleWinfo;
 class CPresencePluginData;
-class CPresencePluginContacts;
 
 /**
  * CPresencePluginAuthorization
@@ -42,10 +40,8 @@
  * @lib presenceplugin.dll
  * @since S60 v3.2
  */
-NONSHARABLE_CLASS( CPresencePluginAuthorization ) :
-    public CActive,
-    public MProtocolPresenceAuthorization,
-    public MPresencePluginContactsObs
+NONSHARABLE_CLASS( CPresencePluginAuthorization ) : public CActive,
+    public MProtocolPresenceAuthorization
     {
     public: // Constructor and destructor
 
@@ -75,7 +71,6 @@
             EStateIdle,
             EStateBlocked,
             EStateDoBlock,
-            EStateIsContactBlockedBuddyRequest,
             EStateDoUnBlock,
             EStatePresenceGranted,
             EStateRemovePresentityFromGranted,
@@ -184,20 +179,7 @@
          void DoPerformCancelPresenceBlockFromPresentityL(
             const MXIMPIdentity& aPresentityId,
             TRequestStatus& aClientStatus );
-
-         /**
-          * Resolve is blocked contact a blocked friend request
-          *
-          * @since S60 5.0
-          * @param aPresenceId, identity to be resolved
-          * @param aObserver, Returns results
-          * @param aStatus, client status
-          */
-         void IsBlockedContactFriendRequestL(
-             const TDesC& aPresenceId,
-             MPresencePluginContactsObs& aObserver,
-             TRequestStatus& aStatus );
-
+           
     private:
 
         /**
@@ -207,8 +189,6 @@
         CPresencePluginAuthorization(
             MPresencePluginConnectionObs& aObs,
             CPresencePluginData* aPresenceData );
-        
-        void ConstructL();
 
     public:	 // from base class MXIMPBase
 
@@ -348,20 +328,6 @@
             const MXIMPIdentity& aPresentityId,
             TXIMPRequestId aReqId );
 
-    public: // MPresencePluginContactsObs
-	
-        /**
-         * Request Complete 
-         *
-         * @param aResult Result data returned, ownership changed to client.
-         *                In operation EOperationIsPresenceStoredToContacts
-         *                return type is TBool*.
-         * @param aOperation Operation type
-         * @param aError Completion error code
-         */
-        void RequestComplete( TAny* aResult,
-                TPresenceContactsOperation aOperation,  TInt aError );
-    
     protected: // from base class CActive
 
         /**
@@ -626,7 +592,7 @@
          * Presence Data
          * Not Own
          */
-        CPresencePluginData* iPresenceData;
+        CPresencePluginData* iPresenceData;       
         
         /**
          * client statutus.
@@ -640,17 +606,6 @@
          */
         TPluginAuthState iAuthState;
         
-        /*
-         * Virtual phone book contact database operations
-         * Own.
-         */
-        CPresencePluginContacts* iContacts;
-        
-        /*
-         * Data Returned by CPresencePluginContacts
-        */
-        TBool iContactIsStored;
-        
         SIMPLE_UNIT_TEST( T_CPresencePluginAuthorization )
         SIMPLE_UNIT_TEST( T_CPresencePluginXdmUtils )
          
--- a/simpledatamodeladapter/inc/presenceplugincontacts.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,344 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTS_H
-#define C_CPRESENCEPLUGINCONTACTS_H
-
-
-#include <e32base.h>
-#include <mvpbkcontactfindobserver.h>
-#include <mvpbksinglecontactoperationobserver.h>
-#include <mvpbkcontactstorelistobserver.h>
-#include "presencecontactscontextbase.h"
-#include "presencelogger.h"
-
-class CVPbkContactManager;
-class MVPbkContactOperationBase;
-class MVPbkContactLinkArray;
-class MVPbkStoreContact;
-class CVPbkFieldTypeRefsList;
-class CPresencePluginContactStateHandler;
-class MPresencePluginContactsObs;
-
-
-/**
- * CPrecensePluginContacts Operation states
- */
-enum TPresenceContactsOperation
-    {
-    EOperationIsPresenceStoredToContacts
-    };
-
-
-/**
- * Access to virtual phonebook contacts database
- *
- * @lib presenceplugin.dll
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( CPresencePluginContacts ) :
-    public CActive,
-    public MVPbkContactStoreListObserver,
-    public MVPbkContactFindObserver,
-    public MVPbkSingleContactOperationObserver,
-    public MPresenceContactsContextBase
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     * @param aServiceId Service ID.
-     * @param aServiceName Service name
-     * @param aObserver Callback results
-     */
-    static CPresencePluginContacts* NewL(
-        TInt aServiceId,
-        const TDesC& aServiceName,
-        MPresencePluginContactsObs& aObserver );
-    
-    /**
-     * Two-phased constructor.
-     * @param aServiceId Service ID.
-     * @param aServiceName Service name
-     * @param aObserver Callback results
-     */
-    static CPresencePluginContacts* NewLC(
-        TInt aServiceId,
-        const TDesC& aServiceName,
-        MPresencePluginContactsObs& aObserver );
-    
-    /**
-    * Destructor.
-    */
-    virtual ~CPresencePluginContacts();
-    
-    /**
-     * Query to virtual bhonebook contacts database
-     * to ensure is the presence service stored to database
-     *
-     * Calls MPresencePluginContactsObs::RequestComplete() when comlete
-     *
-     * @since S60 v5.0
-     * @param aPresenceId Presence ID.
-     * @param aStatus Client status
-     */
-    void IsPresenceIdStoredL( const TDesC16& aPresenceId,
-	    TRequestStatus& aStatus );
-    
-protected:
-
-// from base class CActive
-    
-    void RunL();
-    
-    void DoCancel();
-
-    TInt RunError( TInt aError );
-    
-// from base class MVPbkContactStoreListObserver
-     
-    /**
-     * Called when the opening process is complete. 
-     *
-     * Before this all stores have sent StoreReady or StoreUnavailable 
-     * event. The client can not trust that all stores are available
-     * for use when this is called.
-     */
-    void OpenComplete();
-    
-// from base class MVPbkContactStoreObserver ( from MVPbkContactStoreListObserver )
-     
-    /**
-     * Called when a contact store is ready to use.
-     *
-     * @param aContactStore The store that is ready.
-     */
-    void StoreReady( MVPbkContactStore& aContactStore );
-
-    /**
-     * Called when a contact store becomes unavailable.
-     *
-     * Client may inspect the reason of the unavailability and decide
-     * whether or not it will keep the store opened (ie. listen to 
-     * the store events).
-     *
-     * @param aContactStore The store that became unavailable.
-     * @param aReason The reason why the store is unavailable.
-     *                This is one of the system wide error codes.
-     */
-    void StoreUnavailable( MVPbkContactStore& aContactStore, 
-            TInt aReason );
-
-    /**
-     * Called when changes occur in the contact store.
-     *
-     * @see TVPbkContactStoreEvent
-     * @param aContactStore A store whose event it is.
-     * @param aStoreEvent The event that has occurred.
-     */
-    void HandleStoreEventL(
-             MVPbkContactStore& aContactStore, 
-             TVPbkContactStoreEvent aStoreEvent );
-    
-// from base class MVPbkContactFindObserver
-
-    /**
-     * Called when find is complete. Caller takes ownership of the results
-     * In case of an error during find, the aResults may contain only 
-     * partial results of the find
-     *
-     * @param aResults Array of contact links that matched the find
-     *                 Callee must take ownership of this object in
-     *                 the start of the function, ie. in case the 
-     *                 function leaves the results must be destroyed. 
-     *                 The find operation can be destroyed at the end 
-     *                  of this callback.
-     */
-    void FindCompleteL( MVPbkContactLinkArray* aResults );
-    
-    /**
-    * Called in case the find fails for some reason. The find operation
-    * can be destroyed at the end of this callback.
-    * 
-    * @param aError One of the system wide error codes.
-    *        KErrNotReady if store is not ready (not open or unavailable)
-    */
-    void FindFailed( TInt aError );
-    
-// from base class MVPbkSingleContactOperationObserver
-
-    /**
-     * Called when the operation is completed.
-     *
-     * A client has the operation as a member and it can delete the operation
-     * instance in this function call. If the implementation of the store
-     * calls the function from the operation instance it must not handle
-     * any member data after calling it.
-     *
-     * @param aOperation The completed operation.
-     * @param aContact The contact returned by the operation.
-     *                 A client must take the ownership immediately.
-     *
-     *                  NOTE:
-     *                  If you use CleanupStack for MVPbkStoreContact
-     *                  Use MVPbkStoreContact::PushL or
-     *                  CleanupDeletePushL from e32base.h.
-     *                  (Do Not Use CleanupStack::PushL(TAny*) because
-     *                  then the virtual destructor of the M-class
-     *                  won't be called when the object is deleted).
-     */
-    void VPbkSingleContactOperationComplete(
-            MVPbkContactOperationBase& aOperation,
-            MVPbkStoreContact* aContact );
-
-    /**
-     * Called if the operation fails.
-     *
-     * A client has the operation as a member and it can delete the operation
-     * instance in this function call. If the implementation of the store
-     * calls the function from the operation instance it must not handle
-     * any member data after calling it.
-     *
-     * @param aOperation The failed operation.
-     * @param aError An error code of the failure.
-     */
-    void VPbkSingleContactOperationFailed(
-            MVPbkContactOperationBase& aOperation, 
-            TInt aError );
-    
-// from base class MPresenceContactsContextBase
-
-    /**
-     * Open virtual phonebook contact stores
-     *
-     * @since S60 v5.0
-     */
-    void OpenL();
-
-    /**
-     * Start virtual phonebook contacts search
-     *
-     * @since S60 v5.0
-     */
-    void SearchL();
-
-    /**
-     * Return virtual phonebook contact links
-     *
-     * @since S60 v5.0
-     * @return virtual phonebook contact links
-     */
-    const MVPbkContactLinkArray& ContactLinkArrayL();
-
-    /**
-    * Resolve virtual phonebook contact from contact link
-    *
-    * @since S60 v5.0
-    * @param aContactLink contact link to resolve
-    */
-    void RetrieveContactL(
-        const MVPbkContactLink& aContactLink );
-
-private:
-
-    CPresencePluginContacts( TInt aServiceId, MPresencePluginContactsObs& aObserver );
-
-    void ConstructL( const TDesC& aServiceName );
-
-    HBufC* ContactStoreNameL();
-    
-private: //data
-    
-    /**
-     * Service id.
-     */
-    TInt iServiceId;
-    
-    /**
-     * Service name.
-     * Own.
-     */
-    HBufC* iServiceName;
-
-    /**
-     * Text used in search
-     * Own.
-     */
-    HBufC* iSearchText;
-    
-    /**
-     * Observer.
-     * Not own.
-     */
-    MPresencePluginContactsObs* iObserver;
-    
-    /**
-     * Presence Plugin Contacts Operation
-     */
-    TPresenceContactsOperation iOperation;
-    
-    /**
-     * Virtual Phonebook field types
-     * Own.
-     */
-    CVPbkFieldTypeRefsList* iFieldTypeRefList;
-
-    /**
-     * Virtual Phonebook contact manager
-     * Own.
-     */
-    CVPbkContactManager* iContactManager;
-
-    /**
-     * VPbk operation
-     * Own.
-     */
-    MVPbkContactOperationBase* iContactOperation;
-    
-    /**
-     * VPbk contact links
-     * Own.
-     */
-    MVPbkContactLinkArray* iContactLinkArray;
-
-    /**
-     * VPbk Store contact array
-     * Own.
-     */
-    RPointerArray<MVPbkStoreContact> iStoreContactArray;
-    
-    /**
-     * state handler
-     * Own.
-     */
-    CPresencePluginContactStateHandler* iStateHandler;
-    
-    /**
-     * Client status
-     * Not own.
-     */
-    TRequestStatus* iClientStatus;
-
-    
-    SIMPLE_UNIT_TEST( UT_CPresencePluginContacts )
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTS_H
--- a/simpledatamodeladapter/inc/presenceplugincontactsobs.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef M_MPRESENCEPLUGINCONTACTSOBS_H
-#define M_MPRESENCEPLUGINCONTACTSOBS_H
-
-
-#include <e32std.h>
-#include "presenceplugincontacts.h"
-
-
-/**
- *  Callback from virtual phonebook contacts handler
- *
- *  @lib presenceplugin.dll
- *  @since S60 v5.0
- */
-class MPresencePluginContactsObs
-    {
-
-public:
-
-    /**
-     * Informs the observer that the operation is completed
-     *
-     * @param aResult Result data returned,ownership is
-     *                transferred to the client.
-     *                In operation EOperationIsPresenceStoredToContacts
-     *                return type is TBool*.
-     * @param aOperation Operation type
-     * @param aError Completion error code
-     */
-    virtual void RequestComplete( TAny* aResult,
-        TPresenceContactsOperation aOperation, TInt aError ) = 0;
-    
-    };
-
-
-#endif // M_PRESENCEPLUGINCONTACTSOBS_H
-
-// End of File
--- a/simpledatamodeladapter/inc/presenceplugincontactstate.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATE_H
-#define C_CPRESENCEPLUGINCONTACTSTATE_H
-
-#include <e32base.h>
-
-class CPresencePluginContactStateHandler;
-class MPresenceContactsContextBase;
-
-/**
- *  Base class for presenceplugin contacts states
- * 
- *  @lib presenceplugin.dll
- *  @since S60 V5.0
- */
-class CPresencepluginContactState : public CBase
-    {
-
-public:
-
-    CPresencepluginContactState( MPresenceContactsContextBase& aContext,
-        CPresencePluginContactStateHandler& aStateHandler );
-    
-    virtual ~CPresencepluginContactState();
-
-    virtual void HandleL() = 0;
-    
-    virtual void Complete();
-    
-    virtual void Error( TInt aError );
-    
-protected: // data
-    
-    /**
-     * Context
-     * Not own.
-     */
-    MPresenceContactsContextBase* iContext;
-    
-    /**
-     * State handler
-     * Not own.
-     */
-    CPresencePluginContactStateHandler* iStateHandler;
-    
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATE_H
--- a/simpledatamodeladapter/inc/presenceplugincontactstateend.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATEEND_H
-#define C_CPRESENCEPLUGINCONTACTSTATEEND_H
-
-
-#include "presenceplugincontactstate.h"
-
-/**
- *  CPresencePluginContactStateEnd
- */
-class CPresencePluginContactStateEnd :
-    public CPresencepluginContactState
-    {
-
-public:
-
-    /**
-     * Constructor
-     */
-    CPresencePluginContactStateEnd( MPresenceContactsContextBase& aContext,
-        CPresencePluginContactStateHandler& aStateHandler );
-
-    virtual ~CPresencePluginContactStateEnd();
-
-    void HandleL();
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATEEND_H
--- a/simpledatamodeladapter/inc/presenceplugincontactstatehandler.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H
-#define C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H
-
-
-#include <e32base.h>
-
-class CPresencepluginContactState;
-
-/**
- * States handler
- *
- * @lib presenceplugin.dll
- * @since S60 v5.0
- */
-class CPresencePluginContactStateHandler : public CBase
-    {
-
-public:
-
-    static CPresencePluginContactStateHandler* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~CPresencePluginContactStateHandler();
-    
-    /**
-     * Add states to queue
-     *
-     * @since S60 v5.0
-     * @param aState State to add, ownership is transferred.
-     */
-    void AddStateL( CPresencepluginContactState* aState );
-    
-    /**
-     * Start State machine.
-     * States must be added before
-     *
-     * @since S60 v5.0
-     * @param aStatus Client status
-     */
-    void Start( TRequestStatus* aStatus );
-
-    /**
-     * States are progressed to end
-     * or error occured
-     *
-     * @since S60 v5.0
-     * @param aError Possible error
-     */
-    void Complete( TInt aError );
-    
-    /**
-     * State getter
-     *
-     * @since S60 v5.0
-     * @return State
-     */
-    CPresencepluginContactState* State();
-    
-    /**
-     * Order statehandler to move next state
-     *
-     * @since S60 v5.0
-     */
-    void ProgressToNextState();
-    
-private:
-
-    CPresencePluginContactStateHandler();
-
-    void HandleNextState();
-
-private: // data
-    
-    /**
-     * Current state index
-     * own.
-     */
-    TInt iCurrentStateIndex;
-    
-    /**
-     * States to process
-     * own.
-     */
-    RPointerArray< CPresencepluginContactState > iStateArray;
-    
-    /**
-     * Client status
-     * Not own.
-     */
-    TRequestStatus* iClientStatus;
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATEHANDLER_H
--- a/simpledatamodeladapter/inc/presenceplugincontactstateopen.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATEOPEN_H
-#define C_CPRESENCEPLUGINCONTACTSTATEOPEN_H
-
-
-#include "presenceplugincontactstate.h"
-
-/**
- *  CPresencePluginContactStateOpen
- * 
- */
-class CPresencePluginContactStateOpen :
-    public CPresencepluginContactState
-    {
-
-public:
-
-    /**
-     * Constructor
-     */
-    CPresencePluginContactStateOpen( MPresenceContactsContextBase& aContext,
-        CPresencePluginContactStateHandler& aStateHandler );
-
-
-    virtual ~CPresencePluginContactStateOpen();
-
-    void HandleL();
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATEOPEN_H
--- a/simpledatamodeladapter/inc/presenceplugincontactstateresolve.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATERESOLVE_H
-#define C_CPRESENCEPLUGINCONTACTSTATERESOLVE_H
-
-
-#include "presenceplugincontactstate.h"
-
-/**
- *  CPresencePluginContactStateResolve
- * 
- */
-class CPresencePluginContactStateResolve :
-    public CPresencepluginContactState
-    {
-
-public:
-
-    /**
-     * Constructor
-     */
-    CPresencePluginContactStateResolve( MPresenceContactsContextBase& aContext,
-            CPresencePluginContactStateHandler& aStateHandler );
-
-    virtual ~CPresencePluginContactStateResolve();
-
-    void HandleL();
-    
-    void Complete();
-    
-private: // Data
-    
-    TInt iContactLinkIndex;
-
-    TInt iContactLinkCount;
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATERESOLVE_H
--- a/simpledatamodeladapter/inc/presenceplugincontactstatesearch.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINCONTACTSTATESEARCH_H
-#define C_CPRESENCEPLUGINCONTACTSTATESEARCH_H
-
-
-#include "presenceplugincontactstate.h"
-
-/**
- *  CPresencePluginContactStateSearch
- * 
- */
-class CPresencePluginContactStateSearch :
-    public CPresencepluginContactState
-    {
-
-public:
-
-    /**
-     * Constructor
-     */
-    CPresencePluginContactStateSearch( MPresenceContactsContextBase& aContext,
-            CPresencePluginContactStateHandler& aStateHandler );
-
-    virtual ~CPresencePluginContactStateSearch();
-
-    void HandleL();
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINCONTACTSTATESEARCH_H
--- a/simpledatamodeladapter/inc/presenceplugindata.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/inc/presenceplugindata.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -38,7 +38,6 @@
 class MPresenceInfoField;
 class MSimpleElement;
 class MPresenceCacheWriter2;
-class MPresenceCacheReader2;
 
 /**
  * CPresencePluginData
@@ -278,15 +277,6 @@
         TInt ServiceId();            
         
         /**
-         * Resolve service name
-         * 
-         * @since   S60 5.0
-         * @param   aServiceId Service Id.
-         * @return  resolved service name, ownership returned to caller
-         */
-        HBufC* ServiceNameLC( TInt aServiceId ) const;
-        
-        /**
          * Writes status to presence cache
          *
          * @since S60 5.0
@@ -332,6 +322,19 @@
             const TUint aServiceId, 
             NPresenceInfo::TAvailabilityValues aAvailability,
             const TDesC& aStatusMessage );
+
+        /**
+         * Stores own presence document id to permanent storage.
+         *
+         * @since S60 5.0
+         * @param aServiceId, service id
+         * @param aAvailability, availability enumeration
+         * @param aDocumentId, document id
+         * @return None
+         */                                            
+        void StoreDocumentIdL(
+            const TUint aServiceId, 
+            const TDesC8& aDocumentId );
             
         /**
          * Reads document id from permanent storage.
@@ -398,41 +401,7 @@
             MSimpleElement* aActivitiesElement,
             MSimpleElement* aNoteElement,
             MPresenceInfoFieldCollection& aCollection );
-        
-        /**
-         * Returns <note> element or NULL if no <note> is found in the given 
-         * element list. <note> element which matches best current locale is 
-         * returned.
-         * 
-         * @since   S60 5.1
-         * @param   aElements   Element array.
-         * @return  Best matching <note> or NULL.
-         */
-        MSimpleElement* ResolveNoteElementL( 
-            const RPointerArray<MSimpleElement>& aElements ) const;
-        
-        /**
-         * Checks if element has language attribute compatible with the 
-         * current locale.
-         *
-         * @since   S60 5.1
-         * @param   aElement    Simple element containing language attribute.
-         * @return  ETrue if compatible language attribute is found, 
-         *          EFalse otherwise.
-         */ 
-        TBool IsElementLanguageValidForCurrentLocaleL( 
-            MSimpleElement& aElement ) const;
-        
-        /**
-         * Resolve cache used identifier
-         * 
-         * @since   S60 5.0
-         * @param   aIdentity presence id without prefix
-         * @return  resolved cache identifier, ownership returned to caller
-         */
-        HBufC* ResolveCacheXspIdentifierL( const TDesC& aIdentity ) const;
-        
-        
+
     private: // data
 
         /**
@@ -456,13 +425,7 @@
          * Writes service status to presence cache.
          * Own.
          */        
-        MPresenceCacheWriter2* iPresenceCacheWriter;
-              
-        /**
-         * Reads service status from presence cache.
-         * Own.
-         */        
-        MPresenceCacheReader2* iPresenceCacheReader;  
+        MPresenceCacheWriter2* iPresenceCacheWriter;          
         
         SIMPLE_UNIT_TEST( T_CPresencePluginData )
     };
--- a/simpledatamodeladapter/inc/presencepluginlanguagecodes.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +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 T_PRESENCEPLUGINLANGUAGECODES_H
-#define T_PRESENCEPLUGINLANGUAGECODES_H
-
-#include <e32base.h>
-
-/** ISO 639-1 language code length. */
-const TInt KIsoLanguageCodeLength = 2;
-
-/**
- *  Maps Symbian and ISO 639 language codes.
- *
- *  @since S60 v5.1
- */
-class TLanguageCodeMapping
-    {
-
-public:
-
-    /**
-     * Returns Symbian language code.
-     * 
-     * @since   S60 5.1
-     * @return  Symbian language code.
-     */
-    TInt SymbianLanguageCode() const 
-        { return iSymbianLanguageCode; }
-    
-    /**
-     * Returns ISO language code.
-     * 
-     * @since   S60 5.1
-     * @return  ISO language code.
-     */
-    TPtrC8 IsoLanguageCode() const
-        { return TPtrC8( iIsoLanguageCode ); }
-    
-public: // data
-
-    /**
-     * Symbian language code as specified in e32lang.h.
-     */
-    TInt iSymbianLanguageCode;
-    
-    /**
-     * ISO 639 language code.
-     */
-    TText8 iIsoLanguageCode[__Align8( KIsoLanguageCodeLength + sizeof( "" ) )];
-    };
-
-/** Mapping table for Symbian and ISO 639 language codes. */
-static const TLanguageCodeMapping KLanguageCodeMappings[] =
-    {
-        { ELangEnglish,             "en" },
-        { ELangFrench,              "fr" },
-        { ELangGerman,              "de" },
-        { ELangSpanish,             "es" },
-        { ELangItalian,             "it" },
-        { ELangSwedish,             "sv" },
-        { ELangDanish,              "da" },
-        { ELangNorwegian,           "no" },
-        { ELangFinnish,             "fi" },
-        { ELangAmerican,            "en" },
-        { ELangSwissFrench,         "fr" },
-        { ELangSwissGerman,         "de" },
-        { ELangPortuguese,          "pt" },
-        { ELangTurkish,             "tr" },
-        { ELangIcelandic,           "is" },
-        { ELangRussian,             "ru" },
-        { ELangHungarian,           "hu" },
-        { ELangDutch,               "nl" },
-        { ELangBelgianFlemish,      "nl" },
-        { ELangAustralian,          "en" },
-        { ELangBelgianFrench,       "fr" },
-        { ELangAustrian,            "de" },
-        { ELangNewZealand,          "en" },
-        { ELangInternationalFrench, "fr" },
-        { ELangCzech,               "cs" },
-        { ELangSlovak,              "sk" },
-        { ELangPolish,              "pl" },
-        { ELangSlovenian,           "sl" },
-        { ELangTaiwanChinese,       "zh" },
-        { ELangHongKongChinese,     "zh" },
-        { ELangPrcChinese,          "zh" },
-        { ELangJapanese,            "ja" },
-        { ELangThai,                "th" },
-        { ELangArabic,              "ar" },
-        { ELangAfrikaans,           "af" },
-        { ELangAlbanian,            "sq" },
-        { ELangAmharic,             "am" },
-        { ELangArabic,              "ar" },
-        { ELangArmenian,            "hy" },
-        { ELangTagalog,             "tl" },
-        { ELangBelarussian,         "be" },
-        { ELangBengali,             "bn" },
-        { ELangBulgarian,           "bg" },
-        { ELangBurmese,             "my" },
-        { ELangCatalan,             "ca" },
-        { ELangCroatian,            "hr" },
-        { ELangCanadianEnglish,     "en" },
-        { ELangInternationalEnglish,"en" },
-        { ELangSouthAfricanEnglish, "en" },
-        { ELangEstonian,            "et" },
-        { ELangFarsi,               "fa" },
-        { ELangCanadianFrench,      "fr" },
-        { ELangScotsGaelic,         "gd" },
-        { ELangGeorgian,            "ka" },
-        { ELangGreek,               "el" },
-        { ELangCyprusGreek,         "el" },
-        { ELangGujarati,            "gu" },
-        { ELangHebrew,              "he" },
-        { ELangHindi,               "hi" },
-        { ELangIndonesian,          "id" },
-        { ELangIrish,               "ga" },
-        { ELangSwissItalian,        "it" },
-        { ELangKannada,             "kn" },
-        { ELangKazakh,              "kk" },
-        { ELangKhmer,               "km" },
-        { ELangKorean,              "ko" },
-        { ELangLao,                 "lo" },
-        { ELangLatvian,             "lv" },
-        { ELangLithuanian,          "lt" },
-        { ELangMacedonian,          "mk" },
-        { ELangMalay,               "ms" },
-        { ELangMalayalam,           "ml" },
-        { ELangMarathi,             "mr" },
-        { ELangMoldavian,           "mo" },
-        { ELangMongolian,           "mn" },
-        { ELangNorwegianNynorsk,    "no" },
-        { ELangBrazilianPortuguese, "pt" },
-        { ELangPunjabi,             "pa" },
-        { ELangRomanian,            "ro" },
-        { ELangSerbian,             "sr" },
-        { ELangSinhalese,           "si" },
-        { ELangSomali,              "so" },
-        { ELangInternationalSpanish,"es" },
-        { ELangLatinAmericanSpanish,"es" },
-        { ELangSwahili,             "sw" },
-        { ELangFinlandSwedish,      "sv" },
-        { ELangTamil,               "ta" },
-        { ELangTelugu,              "te" },
-        { ELangTibetan,             "bo" },
-        { ELangTigrinya,            "ti" },
-        { ELangCyprusTurkish,       "tr" },
-        { ELangTurkmen,             "tk" },
-        { ELangUkrainian,           "uk" },
-        { ELangUrdu,                "ur" },
-        { ELangVietnamese,          "vi" },
-        { ELangWelsh,               "cy" },
-        { ELangZulu,                "zu" },
-        { ELangManufacturerEnglish, "en" },
-        { ELangSouthSotho,          "st" },
-        { ELangBasque,              "eu" },
-        { ELangGalician,            "gl" },
-        { ELangEnglish_Apac,        "en" },
-        { ELangEnglish_Taiwan,      "en" },
-        { ELangEnglish_HongKong,    "en" },
-        { ELangEnglish_Prc,         "en" },
-        { ELangEnglish_Japan,       "en" },
-        { ELangEnglish_Thailand,    "en" },
-        { ELangMalay_Apac,          "ms" }
-    };
-
-/** Number of language code mappings. */
-static const TInt KLanguageCodeMappingsCount =
-    sizeof ( KLanguageCodeMappings ) / sizeof ( TLanguageCodeMapping );
-
-#endif // T_PRESENCEPLUGINLANGUAGECODES_H
--- a/simpledatamodeladapter/inc/presencepluginlocalstore.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#ifndef C_CPRESENCEPLUGINLOCALSTORE_H
-#define C_CPRESENCEPLUGINLOCALSTORE_H
-
-
-#include <e32base.h>
-#include <d32dbms.h>
-#include <s32file.h>
-
-
-/**
- * Service contacts local store reader
- *
- * @lib presenceplugin.dll
- * @since S60 v5.0
- */
-class CPresencePluginLocalstore : public CBase
-    {
-
-public:
-
-    /**
-     * Two-phased constructor.
-     * @param aServiceName Service name
-     */
-    static CPresencePluginLocalstore* NewL( const TDesC& aServiceName );
-
-    /**
-     * Two-phased constructor.
-     * @param aServiceName Service name
-     */
-    static CPresencePluginLocalstore* NewLC( const TDesC& aServiceName );
-
-    /**
-    * Destructor.
-    */
-    virtual ~CPresencePluginLocalstore();
-
-    /**
-     * Seeks given id at contact column
-     *
-     * @since S60 v5.0
-     * @param aIdentifier Id. to search
-     * @return ETrue if found
-     */
-    TBool SeekRowAtContactColL( TInt32& aIdentifier );
-
-private:
-	  
-    CPresencePluginLocalstore();
-	  
-    void ConstructL( const TDesC& aServiceName );
-
-    TBool DbExists();
-
-    void OpenDbL();
-
-private: // data
-
-    /**
-     * File stream
-     */
-    RFs iFs;
-    
-    /**
-     * Store database
-     */
-    RDbStoreDatabase iDb;
-    
-    /**
-     * Table
-     */
-    RDbTable iTable;
-    
-    /**
-     * Column definitions
-     * Own.
-     */
-    CDbColSet* iColset;
-
-    /**
-     * DB Store
-     * Own.
-     */
-    CPermanentFileStore* iFileStore;
-
-    /**
-     * Local database name
-     * Own.
-     */
-    HBufC* iLocalDBName;
-
-    };
-
-
-#endif // C_CPRESENCEPLUGINLOCALSTORE_H
--- a/simpledatamodeladapter/inc/presencepluginpublisher.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/inc/presencepluginpublisher.h	Fri Mar 19 09:37:41 2010 +0200
@@ -132,15 +132,6 @@
          * @return none
          */
         void StopPublishL( TRequestStatus& aStatus ); 
-        
-        /**
-         * Published()
-         *
-         * @since S60 3.2 
-         * @param none
-         * @return none
-         */
-        TBool Published();
 
     public:  // from MSimpleETagObserver
 
--- a/simpledatamodeladapter/inc/presencepluginxdmpresrules.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/inc/presencepluginxdmpresrules.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -316,17 +316,6 @@
         TBool CheckIfOneExistL(
             const TDesC& aRule,
             const TDesC& aUri );
-        
-        /**
-         * Compare uri to attribute without prefix. Returns ETrue if match.
-         *
-         * @since S60 5.0
-         * @param aUri, entity url
-         * @parram aAttribute url attribute
-         * @return TBool
-         */
-        TBool CompareUriWithoutPrefixL( 
-            const TDesC& aUri, const TDesC& aAttribute );
                 
     protected: // from base class CActive
 
--- a/simpledatamodeladapter/inc/presencepluginxdmutils.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/inc/presencepluginxdmutils.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -25,7 +25,6 @@
 #include "presenceplugincommon.h"
 #include "mpresrulesasynchandler.h"
 #include "presencelogger.h"
-#include "presenceplugincontactsobs.h"
 
 class CPresencePluginXdmPresRules;
 class TXIMPRequestId;
@@ -46,8 +45,7 @@
  * @since S60 v3.2
  */
 NONSHARABLE_CLASS( CPresencePluginXdmUtils ) : public CActive,
-    public MPresRulesAsyncHandler,
-    public MPresencePluginContactsObs
+    public MPresRulesAsyncHandler
     {
     public: // Constructor and destructor
 
@@ -85,8 +83,7 @@
             ECreateXdmRules,
             /** Subscripe block list */
             ESubsBlockList,
-            EGetResourceListFromServer,
-            EUpdateBlockedContactPresenceCache
+            EGetResourceListFromServer
             };
 
         /**
@@ -307,14 +304,6 @@
          */
         void DoCancel();
 
-    protected: // from MPresencePluginContactsObs
-
-        /**
-         * Defined in a base class
-         */
-        void RequestComplete( TAny* aResult,
-            TPresenceContactsOperation aOperation, TInt aError );
-
     private:
     
         /**
@@ -517,26 +506,6 @@
          */
         void UpdateFromServerL();
         
-        /**
-         * Compare uri to attribute without prefix. Returns ETrue if match.
-         *
-         * @since S60 5.0
-         * @param aUri, entity url
-         * @parram aAttribute url attribute
-         * @return TBool
-         */
-        TBool CompareUriWithoutPrefixL( 
-            const TDesC& aUri, const TDesC& aAttribute );
-        
-        /**
-         * Update blocked contact status to Presence Cache
-         *
-         * @since S60 5.0
-         * @param aMyStatus, error status
-         */
-        void DoUpdateBlockedContactPresenceCacheL(
-            TInt aMyStatus );
-
     private: // Data
 
         /**
@@ -635,17 +604,6 @@
          */
         TBool iLocalMode;
         
-        /**
-         * Request results.
-         * Is contact blocked request
-         */
-        TBool iPresenceContactsAsyncReqResult;
-
-        /*
-         * Initial blocked contact list
-         */
-        RPointerArray<HBufC> iBlockedContacts;
-
         SIMPLE_UNIT_TEST( T_CPresencePluginGroups )
         SIMPLE_UNIT_TEST( T_CPresencePluginWatcher )
         SIMPLE_UNIT_TEST( T_CPresencePluginAuthorization )
--- a/simpledatamodeladapter/src/presenceplugin.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presenceplugin.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -202,8 +202,6 @@
                 CleanupStack::Pop( connection ); 
                 tmp = connection;
                 connected = ETrue;
-                
-                iConnectionArray[i]->IncreaseClientCount();
                 }
 			else if ( CPresencePluginConnection::EActive == status )
 			    {
--- a/simpledatamodeladapter/src/presencepluginauthorization.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginauthorization.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -47,7 +47,6 @@
 #include "presencepluginutility.h"
 #include "presenceplugingroup.h"
 #include "presencepluginvirtualgroup.h"
-#include "presenceplugincontacts.h"
 
 
 // ======== MEMBER FUNCTIONS ========
@@ -61,11 +60,10 @@
     CPresencePluginData* aPresenceData )
     : CActive( CActive::EPriorityStandard ),
     iConnObs(aObs), iSubscribed( EFalse ),
-    iOperation( ENoOperation ), iXdmOk( EFalse ),
-    iComplete( EFalse ), iPresenceData( aPresenceData ),
-    iContactIsStored( ETrue )
+    iOperation( ENoOperation ),
+    iXdmOk( EFalse ), iComplete( EFalse ),iPresenceData( aPresenceData )
     {
-    CActiveScheduler::Add(this);
+    CActiveScheduler::Add(this); 
     }
 
 // ---------------------------------------------------------------------------
@@ -79,33 +77,16 @@
     DP_SDA("CPresencePluginAuthorization::NewL ");
     CPresencePluginAuthorization* self =
         new( ELeave ) CPresencePluginAuthorization( aObs, aPresenceData );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
     return self;
     }
 
 // ---------------------------------------------------------------------------
-// CPresencePluginAuthorization::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginAuthorization::ConstructL()
-    {
-    HBufC* serviceName =
-        iPresenceData->ServiceNameLC( iPresenceData->ServiceId() );
-    iContacts = CPresencePluginContacts::NewL(
-        iPresenceData->ServiceId(), *serviceName, *this );
-    CleanupStack::PopAndDestroy( serviceName );
-    }
-
-// ---------------------------------------------------------------------------
 // CPresencePluginAuthorization::~CPresencePluginAuthorization()
 // ---------------------------------------------------------------------------
 //
 CPresencePluginAuthorization::~CPresencePluginAuthorization()
     {
     delete iPresIdentity;
-    delete iContacts;
     }
 
 // ---------------------------------------------------------------------------
@@ -466,45 +447,24 @@
             
             case EStateBlocked:
                 {
-                DP_SDA( "CPresencePluginAuthorization::RunL - Blocked" );
                 SetPresentityBlockedToXIMPL();
                 iAuthState = EStateIdle;
                 CompleteXIMPReq( myStatus );
                 }
                 break;
-
-            case EStateIsContactBlockedBuddyRequest:
-                {
-                DP_SDA( "CPresencePluginAuthorization::RunL - Resolve contact type" );
-                // resolve is contact blocked friend request
-                HBufC* withoutPrefix = iPresenceData->RemovePrefixLC( *iPresIdentity );
-                IsBlockedContactFriendRequestL( *withoutPrefix, *this, iStatus );
-                CleanupStack::PopAndDestroy( withoutPrefix );
-                SetActive();
-                iAuthState = EStateDoUnBlock;
-                }
-                break;
                 
             case EStateDoUnBlock:
                 {
-                if ( iContactIsStored )
-                    {
-                    DP_SDA( "CPresencePluginAuthorization::RunL - Grant presence for presentity" );
-                    GrantPresenceForPresentityL();
-                    iAuthState = EStatePresenceGranted;
-                    }
-                else
-                    {
-                    DP_SDA( "CPresencePluginAuthorization::RunL - Complete unblock" );
-                    iAuthState = EStateIdle;
-                    CompleteXIMPReq( myStatus );
-                    }
+                DP_SDA( "CPresencePluginAuthorization::RunL - Grant presence for presentity" );  
+                GrantPresenceForPresentityL();
+                iAuthState = EStatePresenceGranted;
                 }
                 break;
-            
+                
             case EStatePresenceGranted:
                 {
                 DP_SDA( "CPresencePluginAuthorization::RunL -Subscribe presentity presence" );  
+                
                 MXIMPIdentity* identity = iConnObs.ObjectFactory().NewIdentityLC();
                 identity->SetIdentityL( iPresIdentity->Des() ); 
                 iConnObs.WatcherHandlerL()->DoPerformSubscribePresentityPresenceL( *identity, iStatus );
@@ -1266,63 +1226,10 @@
     CleanupStack::PopAndDestroy( withoutPrefix );
     iDataHost->HandlePresenceBlockCanceledL( identity );
     CleanupStack::Pop();// >> identity
-    iAuthState = EStateIsContactBlockedBuddyRequest;
+    iAuthState = EStateDoUnBlock;
     SetActive();
     
     DP_SDA( "CPresencePluginAuthorization::UnblockPresentityL -Exit" );
     }
 
-
-// ---------------------------------------------------------------------------
-// CPresencePluginAuthorization::IsBlockedContactFriendRequest()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginAuthorization::IsBlockedContactFriendRequestL(
-    const TDesC& aPresenceId,
-    MPresencePluginContactsObs& aObserver,
-    TRequestStatus& aStatus )
-    {
-    DP_SDA( "CPresencePluginAuthorization::IsBlockedContactFriendRequest" );
-
-    delete iContacts;
-    iContacts = NULL;
-
-    HBufC* serviceName =
-        iPresenceData->ServiceNameLC( iPresenceData->ServiceId() );
-
-    iContacts = CPresencePluginContacts::NewL(
-        iPresenceData->ServiceId(), *serviceName, aObserver );
-
-    CleanupStack::PopAndDestroy( serviceName );
-
-    iContacts->IsPresenceIdStoredL( aPresenceId, aStatus );
-
-    DP_SDA( "CPresencePluginAuthorization::IsBlockedContactFriendRequest -exit" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From base class MPresencePluginContactsObs
-// CPresencePluginAuthorization::RequestComplete()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginAuthorization::RequestComplete( TAny* aResult,
-    TPresenceContactsOperation aOperation, TInt aError )
-    {
-    DP_SDA( "CPresencePluginAuthorization::RequestComplete" );
-    
-    switch( aOperation )
-        {
-        case EOperationIsPresenceStoredToContacts:
-            if ( aResult != NULL && KErrNone == aError  )
-                {
-                iContactIsStored = *static_cast<TBool*>( aResult );
-                }
-            break;
-        default:
-            break;
-        }
-    DP_SDA2( "CPresencePluginAuthorization::RequestComplete - iContactIsStored = %d", iContactIsStored );
-    }
-
 // End of file
--- a/simpledatamodeladapter/src/presencepluginconnection.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginconnection.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -195,38 +195,37 @@
 CPresencePluginConnection::~CPresencePluginConnection()
     {
     DP_SDA("CPresencePluginConnection::~CPresencePluginConnection");
-    
+
     delete iSipPresentity;
     iSipPresentity = NULL;
-    
+
     delete iPluginWinfo;
     iPluginWinfo = NULL;
-    
+
     delete iWatcher;
     iWatcher = NULL;
-    
+
     delete iPublisher;
     iPublisher = NULL;
-    
+
     delete iAuth;
     iAuth = NULL;
-    
+
     delete iGroups;
     iGroups = NULL;
-    
+
     delete iSession;
     iSession = NULL;
     
     delete iImFeatures;
-    
     REComSession::FinalClose();
-    
+
     delete iSubscribedBuddys;
     delete iPresenceData;
-    
+
     delete iETag;
     iETag = NULL;
-    DP_SDA("CPresencePluginConnection::~CPresencePluginConnection end");
+    DP_SDA("CPresencePluginConnection::~CPresencePluginConnection end");          
     }
 
 // ---------------------------------------------------------------------------
@@ -462,43 +461,22 @@
     TXIMPRequestId aReqId )
     {
     DP_SDA("CPresencePluginConnection::CloseSession begin");
-    
-    TBool completeXimpRequestNow( EFalse );
     iConnectionArray->DecreaseClientCount();
     iXIMPId = aReqId;
-        
-    // Client count can´t be negative. Increase if goes negative.
-    // This happens for example in network lost case.
-    // This method is called then because connection is terminated and
-    // for all clients which have done unbind. But here we cannot tell
-    // if this method is called by clients unbind or connection termination
-    // therefore this workaround needed.
-    if ( iConnectionArray->ClientCount() < 0 )
-        {        
-        completeXimpRequestNow = ETrue;
-        iConnectionArray->IncreaseClientCount();
-        }
     
-    // In case there is no more clients we cannot complete Ximp request
-    // right away. We have to stop publish first, Ximp request completion is
-    // handled in RunL after that is done.
+    //If last client closesSession call
     if( KErrNone == iConnectionArray->ClientCount() && 
         (EActive == iConnectionArray->GetConnectionStatus()) )
-        {       
-        completeXimpRequestNow = EFalse; // request is completed later in RunL
-        iGrantListSubs = EFalse;
-        
-        //Start stopPublish request
-        DeRegister();
-        }
-        
-    if ( !iStopPublishCall )
-       {
-       completeXimpRequestNow = ETrue;
-       }
+    	{
+    	iGrantListSubs = EFalse;
+    	//Start stopPublish request
+    	DeRegister();
+    	}
     
-    if ( completeXimpRequestNow )
+    //Allways complete Ximp request
+    if (  !iStopPublishCall )
         {
+        DP_SDA("stopPublish is not called");
         CompleteReq( iXIMPId, KErrNone );
         }
 
@@ -518,10 +496,10 @@
     using namespace NXIMPFeature::Presence;    
     aFeatures.AppendL( KPublish );
     aFeatures.AppendL( KSubscribe );    
-    aFeatures.AppendL( KUnsubscribe );  
-    aFeatures.AppendL( KAddContact );
-    aFeatures.AppendL( KDeleteContact );
-    aFeatures.AppendL( KFetch );
+    aFeatures.AppendL( KUnsubscribe  );  
+    aFeatures.AppendL( KAddContact  );
+    aFeatures.AppendL( KDeleteContact  );
+    aFeatures.AppendL( KFetch  );
     aFeatures.AppendL( KBlock );
     aFeatures.AppendL( KUnBlock );
     
@@ -822,15 +800,10 @@
     DP_SDA(" -> CloseSession, delete permanent pres data");
     TRAP_IGNORE( iPresenceData->DeletePresenceVariablesL( ServiceId() ) );
     
-    // Try to stop publish only if we have successfully published
-    if ( iPublisher->Published() )
-        {
-        DP_SDA("CloseSession call stopPublish");
-        TRAP_IGNORE( iPublisher->StopPublishL( iStatus ) );
-        iStopPublishCall = ETrue;
-        SetActive();
-        }
-    
+    DP_SDA("CloseSession call stopPublish");
+    TRAP_IGNORE( iPublisher->StopPublishL( iStatus ) );
+    iStopPublishCall = ETrue;
+    SetActive();
     DP_SDA("CPresencePluginConnection::Deregister Done");
     }
 
@@ -894,19 +867,14 @@
     TInt status = iStatus.Int();
     DP_SDA2("CPresencePluginConnection::RunL status %d", status );
     
-    if ( iStopPublishCall )
+    if( !status && iStopPublishCall )
         {
         DP_SDA("CPresencePluginConnection::RunL complete");     
-        
-        iStopPublishCall = EFalse;
-        CompleteReq( iXIMPId, status );      
-        
-        DP_SDA("CPresencePluginConnection::RunL --> REMOVE CACHE");
-        iPresenceData->RemoveCacheL();
-        
+        CompleteReq( iXIMPId, KErrNone );
         DP_SDA("CPresencePluginConnection::RunL --> Delete im plugin");
         DeleteImFeaturesPlugin();
         }
+
     }
 
 // ---------------------------------------------------------------------------
--- a/simpledatamodeladapter/src/presenceplugincontacts.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,507 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include <vpbkcontactstoreuris.h>
-#include <spsettings.h>
-#include <spproperty.h>
-#include <cvpbkcontactmanager.h>
-#include <cvpbkcontactstoreuriarray.h>
-#include <tvpbkcontactstoreuriptr.h>
-#include <mvpbkcontactoperationbase.h>
-#include <mvpbkcontactstorelist.h>
-#include <mvpbkcontactlinkarray.h>
-#include <mvpbkcontactlink.h>
-#include <mvpbkstorecontact.h>
-#include <mvpbkcontactfielddata.h>
-#include <mvpbkcontactfieldtextdata.h>
-#include <mvpbkcontactfielduridata.h>
-#include <cvpbkcontactidconverter.h>
-#include <mvpbkstorecontactfieldcollection.h>
-#include <cvpbkfieldtyperefslist.h>
-#include <vpbkeng.rsg>
-
-#include "presenceplugincontacts.h" 
-#include "presencelogger.h"
-#include "presenceplugincontactsobs.h"
-#include "presenceplugincontactstatehandler.h"
-#include "presencepluginlocalstore.h"
-// States
-#include "presenceplugincontactstate.h"
-#include "presenceplugincontactstateopen.h"
-#include "presenceplugincontactstateresolve.h"
-#include "presenceplugincontactstatesearch.h"
-#include "presenceplugincontactstateend.h"
-
-const TInt KSDMASPSMaxPropertyLength = 512;
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::CPresencePluginContacts()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContacts::CPresencePluginContacts( TInt aServiceId,
-    MPresencePluginContactsObs& aObserver )
-    : CActive( CActive::EPriorityStandard ),
-    iServiceId( aServiceId ),
-    iObserver( &aObserver )
-    {
-    CActiveScheduler::Add(this);
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::ConstructL( const TDesC& aServiceName )
-    {
-    DP_SDA( "CPresencePluginContacts::ConstructL()" );
-    
-    iServiceName = aServiceName.AllocL();
-    CVPbkContactStoreUriArray* uriArray = CVPbkContactStoreUriArray::NewLC();
-    HBufC* storeName = ContactStoreNameL();
-
-    if ( NULL != storeName )
-        {
-        DP_SDA2( "CPresencePluginContacts::ConstructL() %S", storeName );
-        CleanupStack::PushL( storeName );
-        uriArray->AppendL( TVPbkContactStoreUriPtr( *storeName ) );
-        CleanupStack::PopAndDestroy( storeName );
-        }
-    else
-        {
-        DP_SDA( "CPresencePluginContacts::ConstructL() Use default contact store uri" );
-        uriArray->AppendL( TVPbkContactStoreUriPtr(
-            VPbkContactStoreUris::DefaultCntDbUri() ) );
-        }
-    iContactManager = CVPbkContactManager::NewL( *uriArray );
-    CleanupStack::PopAndDestroy( uriArray );
-    
-    DP_SDA( "CPresencePluginContacts::ConstructL() -exit" );
-    }
-    
-    
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::NewL()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContacts* CPresencePluginContacts::NewL( TInt aServiceId,
-    const TDesC& aServiceName, MPresencePluginContactsObs& aObserver )
-    {
-    CPresencePluginContacts* self =
-        CPresencePluginContacts::NewLC( aServiceId, aServiceName, aObserver );
-    CleanupStack::Pop( self );
-    return self;
-    }
-    
-    
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::NewLC()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContacts* CPresencePluginContacts::NewLC( TInt aServiceId,
-        const TDesC& aServiceName, MPresencePluginContactsObs& aObserver )
-    {
-    CPresencePluginContacts* self =
-        new( ELeave ) CPresencePluginContacts( aServiceId, aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL( aServiceName );
-    return self;
-    }
-    
-    
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::~CPresencePluginContacts()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContacts::~CPresencePluginContacts()
-    {
-    DP_SDA("CPresencePluginContacts::~CPresencePluginContacts");
-    
-    delete iServiceName;
-    delete iSearchText;
-    delete iContactOperation;
-    iStoreContactArray.ResetAndDestroy();
-    delete iStateHandler;
-    delete iFieldTypeRefList;
-    delete iContactLinkArray;
-    if( iContactManager )
-        {
-        TRAP_IGNORE( iContactManager->ContactStoresL().CloseAll( *this ) );
-        }
-    delete iContactManager;
-    iClientStatus = NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::PresenceIdStoredL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::IsPresenceIdStoredL(
-    const TDesC16& aPresenceId, TRequestStatus& aStatus )
-    {
-    DP_SDA( "CPresencePluginContacts::IsPresenceIdStoredL -Enter" );
-    
-    iOperation = EOperationIsPresenceStoredToContacts;
-    
-    aStatus = KRequestPending;
-    iClientStatus = &aStatus;
-    
-    iSearchText = HBufC::NewL(
-        iServiceName->Length() + aPresenceId.Length() + 1 );
-    TPtr searchTextPtr = iSearchText->Des();
-    searchTextPtr.Copy( *iServiceName );
-    searchTextPtr.Append( ':' );
-    searchTextPtr.Append( aPresenceId );
-    
-    iFieldTypeRefList = CVPbkFieldTypeRefsList::NewL();
-    iFieldTypeRefList->AppendL(
-        *iContactManager->FieldTypes().Find( R_VPBK_FIELD_TYPE_IMPP  ) );
-    
-    iStateHandler = CPresencePluginContactStateHandler::NewL();
-    
-    iStateHandler->AddStateL( new( ELeave ) CPresencePluginContactStateOpen(
-        *this, *iStateHandler ) );
-    iStateHandler->AddStateL( new( ELeave ) CPresencePluginContactStateSearch(
-        *this, *iStateHandler ) );
-    iStateHandler->AddStateL( new( ELeave ) CPresencePluginContactStateResolve(
-        *this, *iStateHandler ) );
-    iStateHandler->AddStateL( new( ELeave ) CPresencePluginContactStateEnd(
-        *this, *iStateHandler ) );
-    
-    iStateHandler->Start( &iStatus );
-    SetActive();
-    
-    DP_SDA( "CPresencePluginContacts::IsPresenceIdStoredL - exit" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContacts::ContactStoreNameL
-// ---------------------------------------------------------------------------
-//
-HBufC* CPresencePluginContacts::ContactStoreNameL()
-    {
-    DP_SDA( "CPresencePluginContacts::ContactStoreNameL()" );
-    
-    HBufC* storeName = NULL;
-    CSPSettings* spSettings = CSPSettings::NewLC();
-    CSPProperty* property = CSPProperty::NewLC();
-    
-    TInt err = spSettings->FindPropertyL( iServiceId,
-                                EPropertyContactStoreId,      
-                                *property );
-    
-    if ( KErrNone == err )
-        {
-        storeName = HBufC::NewL( KSDMASPSMaxPropertyLength );
-        TPtr16 storeNamePtr = storeName->Des();
-        err = property->GetValue( storeNamePtr );
-        }
-    
-    CleanupStack::PopAndDestroy( property );
-    CleanupStack::PopAndDestroy( spSettings );
-    
-    return storeName;
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MPresenceContactsContextBase. 
-// CPresencePluginContacts::Open
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::OpenL()
-    {
-    DP_SDA( "CPresencePluginContacts::Open()" );
-    iContactManager->ContactStoresL().OpenAllL( *this );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MPresenceContactsContextBase.
-// CPresencePluginContacts::Search
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::SearchL()
-    {
-    DP_SDA( "CPresencePluginContacts::Search()" );
-    iContactOperation = iContactManager->FindL(
-        *iSearchText, *iFieldTypeRefList, *this );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MPresenceContactsContextBase. 
-// CPresencePluginContacts::ContactLinkArray
-// ---------------------------------------------------------------------------
-//
-const MVPbkContactLinkArray& CPresencePluginContacts::ContactLinkArrayL()
-    {
-    if ( NULL == iContactLinkArray )
-        {
-        User::Leave( KErrNotReady );
-        }
-    return *iContactLinkArray;
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MPresenceContactsContextBase.
-//CPresencePluginContacts::RetrieveContactL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::RetrieveContactL(
-    const MVPbkContactLink& aContactLink )
-    {
-    DP_SDA( "CPresencePluginContacts::RetrieveContactL()" );
-    iContactOperation =
-        iContactManager->RetrieveContactL( aContactLink, *this );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactStoreListObserver.
-// CPresencePluginContacts::OpenComplete
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::OpenComplete()
-    {
-    DP_SDA( "CPresencePluginContacts::OpenComplete()" );
-    iStateHandler->State()->Complete();
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactStoreObserver.
-// CPresencePluginContacts::StoreReady
-// ---------------------------------------------------------------------------
-// 
-void CPresencePluginContacts::StoreReady(
-    MVPbkContactStore& /*aContactStore*/ )
-     {
-     DP_SDA( "CPresencePluginContacts::StoreReady()" );
-     }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactStoreObserver.
-// CPresencePluginContacts::StoreUnavailable
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::StoreUnavailable(
-    MVPbkContactStore& /*aContactStore*/, TInt /*aReason*/ )
-    {
-    DP_SDA( "CPresencePluginContacts::StoreUnavailable()" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactStoreObserver.
-// CPresencePluginContacts::HandleStoreEventL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::HandleStoreEventL(
-         MVPbkContactStore& /*aContactStore*/, 
-         TVPbkContactStoreEvent /*aStoreEvent*/ )
-    {
-    DP_SDA( "CPresencePluginContacts::HandleStoreEventL()" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactFindObserver.
-// CPresencePluginContacts::FindCompleteL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::FindCompleteL( MVPbkContactLinkArray* aResults )
-    {
-    DP_SDA( "CPresencePluginContacts::FindCompleteL()" );
-    
-    delete iContactLinkArray;
-    iContactLinkArray = NULL;
-    iContactLinkArray = aResults;
-    
-    delete iContactOperation;
-    iContactOperation = NULL;
-
-    iStateHandler->State()->Complete();
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkContactFindObserver.
-// CPresencePluginContacts::FindFailed
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::FindFailed( TInt aError )
-    {
-    DP_SDA( "CPresencePluginContacts::FindFailed()" );
-    
-    delete iContactOperation;
-    iContactOperation = NULL;
-    
-    iStateHandler->State()->Error( aError );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkSingleContactOperationObserver.
-// CPresencePluginContacts::VPbkSingleContactOperationComplete
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::VPbkSingleContactOperationComplete(
-        MVPbkContactOperationBase& aOperation,
-        MVPbkStoreContact* aContact )
-    {
-    DP_SDA( "CPresencePluginContacts::VPbkSingleContactOperationComplete()" );
-    
-    if ( iContactOperation == &aOperation )
-        {
-        delete iContactOperation;
-        iContactOperation = NULL;
-        }
-    
-    TInt error = iStoreContactArray.Append( aContact );
-    if ( KErrNone != error )
-        {
-        delete aContact;
-        aContact = NULL;
-        iStateHandler->State()->Error( error );
-        }
-    else
-        {
-        iStateHandler->State()->Complete();
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MVPbkSingleContactOperationObserver.
-// CPresencePluginContacts::VPbkSingleContactOperationFailed
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::VPbkSingleContactOperationFailed(
-        MVPbkContactOperationBase& aOperation, 
-        TInt aError )
-    {
-    DP_SDA( "CPresencePluginContacts::VPbkSingleContactOperationFailed()" );
-    
-    if ( iContactOperation == &aOperation )
-        {
-        delete iContactOperation;
-        iContactOperation = NULL;
-        }
-    
-    iStateHandler->State()->Error( aError);
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// CPresencePluginContacts::RunL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::RunL()
-    {
-    DP_SDA2( "CPresencePluginContacts::RunL - status %d", iStatus.Int() );
-    
-    TBool result( EFalse );
-    TBool found( EFalse );
-    CPresencePluginLocalstore* localStore = NULL;
-    TInt error = iStatus.Int();
-    
-    switch( iOperation )
-        {
-        case EOperationIsPresenceStoredToContacts:
-            DP_SDA( "CPresencePluginContacts::RunL -EOperationIsPresenceStoredToContacts" );
-            
-            if ( KErrNone == error )
-                {
-                localStore = CPresencePluginLocalstore::NewLC( *iServiceName );
-                
-                for ( TInt i( 0 ); ( i < iStoreContactArray.Count() ) && !found; i++ )
-                    {
-                    MVPbkContactLink* link = iStoreContactArray[ i ]->CreateLinkLC();
-                    CVPbkContactIdConverter* converter =
-                        CVPbkContactIdConverter::NewL( link->ContactStore() );
-                    CleanupStack::PushL( converter );
-    
-                    TInt32 id = converter->LinkToIdentifier( *link );
-                    if ( localStore->SeekRowAtContactColL( id ) )
-                        {
-                        found = ETrue;
-                        result = ETrue;
-                        }
-                    CleanupStack::PopAndDestroy( converter );
-                    CleanupStack::PopAndDestroy(); // link
-                    }
-                 
-                CleanupStack::PopAndDestroy( localStore );
-                }
-            if ( KErrNotFound == error )
-                {
-                error = KErrNone;
-                }
-            iObserver->RequestComplete( &result, iOperation, error );
-            break;
-        default:
-            break;
-        }
-    // Operation completed.
-    // State handler not needet anymore
-    delete iStateHandler;
-    iStateHandler = NULL;
-    // Close contact stores
-    iContactManager->ContactStoresL().CloseAll( *this );
-    
-    User::RequestComplete( iClientStatus, error );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// CPresencePluginContacts::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContacts::DoCancel()
-    {
-    if ( iClientStatus && *iClientStatus == KRequestPending )
-        {
-        User::RequestComplete( iClientStatus, KErrCancel );
-        }
-    iStateHandler->Complete( KErrCancel );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// CPresencePluginContacts::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CPresencePluginContacts::RunError( TInt aError )
-    {
-    DP_SDA2( "CPresencePluginContacts::RunError - status %d", aError );
-    User::RequestComplete( iClientStatus, aError );
-    return KErrNone;
-    }
-
-// End of file
--- a/simpledatamodeladapter/src/presenceplugincontactstate.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include "presenceplugincontactstate.h"
-#include "PresencePluginContactStateHandler.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencepluginContactState::CPresencepluginContactState
-// ---------------------------------------------------------------------------
-//
-CPresencepluginContactState::CPresencepluginContactState(
-    MPresenceContactsContextBase& aContext,
-    CPresencePluginContactStateHandler& aStateHandler )
-    : iContext( &aContext ), iStateHandler( &aStateHandler )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencepluginContactState::~CPresencepluginContactState
-// ---------------------------------------------------------------------------
-//
-CPresencepluginContactState::~CPresencepluginContactState()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencepluginContactState::Complete
-// ---------------------------------------------------------------------------
-//
-void CPresencepluginContactState::Complete()
-    {
-    iStateHandler->ProgressToNextState();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencepluginContactState::Complete
-// ---------------------------------------------------------------------------
-//
-void CPresencepluginContactState::Error( TInt aError )
-    {
-    iStateHandler->Complete( aError );
-    }
--- a/simpledatamodeladapter/src/presenceplugincontactstateend.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include "presenceplugincontactstateend.h"
-#include "presenceplugincontactstatehandler.h"
-#include "presencecontactscontextbase.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateEnd::CPresencePluginContactStateEnd
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateEnd::CPresencePluginContactStateEnd(
-    MPresenceContactsContextBase& aContext,
-    CPresencePluginContactStateHandler& aStateHandler )
-    : CPresencepluginContactState( aContext, aStateHandler )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateEnd::~CPresencePluginContactStateEnd
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateEnd::~CPresencePluginContactStateEnd()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateEnd::HandleL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateEnd::HandleL()
-    {
-    iStateHandler->Complete( KErrNone );
-    }
--- a/simpledatamodeladapter/src/presenceplugincontactstatehandler.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include "presenceplugincontactstatehandler.h"
-#include "presenceplugincontactstate.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::CPresencePluginContactStateHandler
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateHandler::CPresencePluginContactStateHandler()
-    : iCurrentStateIndex( 0 )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::~CPresencePluginContactStateHandler
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateHandler::~CPresencePluginContactStateHandler()
-    {
-    iStateArray.ResetAndDestroy();
-    iClientStatus = NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateHandler* CPresencePluginContactStateHandler::NewL()
-    {
-    CPresencePluginContactStateHandler* self =
-            new (ELeave) CPresencePluginContactStateHandler();
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::Start
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateHandler::Start( TRequestStatus* aStatus )
-    {
-    iClientStatus = aStatus;
-    *iClientStatus = KRequestPending;
-    iCurrentStateIndex = 0;
-    HandleNextState();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::Complete
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateHandler::Complete( TInt aError )
-    {
-    if( iClientStatus && *iClientStatus == KRequestPending )
-        {
-        User::RequestComplete( iClientStatus, aError );
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::ProgressToNextState
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateHandler::ProgressToNextState()
-    {
-    iCurrentStateIndex++;
-    HandleNextState();
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::HandleNextState
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateHandler::HandleNextState()
-    {
-    TRAPD( error, State()->HandleL() );
-    if ( KErrNone != error )
-        {
-        Complete( error );
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::AddStateL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateHandler::AddStateL(
-    CPresencepluginContactState* aState )
-    {
-    CleanupStack::PushL( aState );
-    iStateArray.AppendL( aState );
-    CleanupStack::Pop( aState );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateHandler::State
-// ---------------------------------------------------------------------------
-//
-CPresencepluginContactState* CPresencePluginContactStateHandler::State()
-    {
-    return iStateArray[ iCurrentStateIndex ];
-    }
--- a/simpledatamodeladapter/src/presenceplugincontactstateopen.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include "presenceplugincontactstateopen.h"
-#include "presencecontactscontextbase.h"
-#include "presenceplugincontactstatehandler.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateOpen::CPresencePluginContactStateOpen
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateOpen::CPresencePluginContactStateOpen(
-    MPresenceContactsContextBase& aContext,
-    CPresencePluginContactStateHandler& aStateHandler )
-    : CPresencepluginContactState( aContext, aStateHandler )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateOpen::~CPresencePluginContactStateOpen
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateOpen::~CPresencePluginContactStateOpen()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateOpen::HandleL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateOpen::HandleL()
-    {
-    iContext->OpenL();
-    }
--- a/simpledatamodeladapter/src/presenceplugincontactstateresolve.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include <mvpbkcontactlinkarray.h>
-#include <mvpbkcontactlink.h>
-#include "presenceplugincontactstateresolve.h"
-#include "presencecontactscontextbase.h"
-#include "presenceplugincontactstatehandler.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateResolve::PresencePluginContactStateResolve
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateResolve::CPresencePluginContactStateResolve(
-    MPresenceContactsContextBase& aContext,
-    CPresencePluginContactStateHandler& aStateHandler )
-    : CPresencepluginContactState( aContext, aStateHandler ),
-      iContactLinkIndex( NULL ),
-    iContactLinkCount( NULL )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateResolve::~CPresencePluginContactStateResolve
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateResolve::~CPresencePluginContactStateResolve()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateResolve::HandleL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateResolve::HandleL()
-    {
-    iContactLinkCount = iContext->ContactLinkArrayL().Count();
-    if ( NULL == iContactLinkCount )
-        {
-        Error( KErrNotFound );
-        }
-    else
-        {
-        iContext->RetrieveContactL(
-            iContext->ContactLinkArrayL().At( iContactLinkIndex ) );
-        iContactLinkIndex++;
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateResolve::Complete
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateResolve::Complete()
-    {
-    if ( iContactLinkIndex < iContactLinkCount )
-        {
-        TRAPD( error, HandleL() );
-        if ( KErrNone != error )
-            {
-            Error( error );
-            }
-        }
-    else
-        {
-        iStateHandler->ProgressToNextState();
-        }
-    }
--- a/simpledatamodeladapter/src/presenceplugincontactstatesearch.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include "presenceplugincontactstatesearch.h"
-#include "presencecontactscontextbase.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateSearch::CPresencePluginContactStateSearch
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateSearch::CPresencePluginContactStateSearch(
-    MPresenceContactsContextBase& aContext,
-    CPresencePluginContactStateHandler& aStateHandler )
-    : CPresencepluginContactState( aContext, aStateHandler )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateSearch::~CPresencePluginContactStateSearch
-// ---------------------------------------------------------------------------
-//
-CPresencePluginContactStateSearch::~CPresencePluginContactStateSearch()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginContactStateSearch::HandleL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginContactStateSearch::HandleL()
-    {
-    iContext->SearchL();
-    }
--- a/simpledatamodeladapter/src/presenceplugindata.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presenceplugindata.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
+* 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"
@@ -40,7 +40,6 @@
 #include <msimplemeta.h>
 #include <simpleutils.h>
 #include <presencecachewriter2.h>
-#include <presencecachereader2.h>
 #include <presencebuddyinfo.h>
 #include <spsettings.h>
 #include <spentry.h>
@@ -49,11 +48,9 @@
 #include <avabilitytext.h>
 #include <cvimpstsettingsstore.h>
 
-
 #include "presenceplugindata.h"
 #include "presenceplugincommon.h"
 #include "presencepluginvirtualgroup.h"
-#include "presencepluginlanguagecodes.h"
 
 // ---------------------------------------------------------------------------
 // CPresencePluginData::CPresencePluginData
@@ -64,8 +61,7 @@
 	TInt aServiceId ):
 	iConnObs( aObs ), 
 	iServiceId( aServiceId ),
-	iPresenceCacheWriter( NULL ),
-	iPresenceCacheReader( NULL )
+	iPresenceCacheWriter( NULL )
     {
     }
 
@@ -77,7 +73,6 @@
     {
     DP_SDA("CPresencePluginData::~CPresencePluginData");
     delete iPresenceCacheWriter;
-    delete iPresenceCacheReader;
     }
 
 // ---------------------------------------------------------------------------
@@ -103,7 +98,6 @@
     {
     DP_SDA("CPresencePluginData::ConstructL");
     iPresenceCacheWriter =  MPresenceCacheWriter2::CreateWriterL();
-    iPresenceCacheReader = MPresenceCacheReader2::CreateReaderL();
     }
 
 // ---------------------------------------------------------------------------
@@ -423,7 +417,7 @@
              	        }
              	    
                     //FIND ACTIVITIES ELEMENT
-             	    if ( basicElementFound && !activitiesElementFound &&
+             	    if ( basicElementFound  && 
              	        !elem2->LocalName().CompareF( KPresenceActivities8 ) )
              	        {
              	        DP_SDA("NotifyToPrInfoL activities found outside basic");
@@ -436,17 +430,18 @@
 			                DP_SDA("CPresencePluginData::NotifyToPrInfoL 6");
 			                }
              	        }
-                    }
-                
-                if ( basicElementFound && !noteSimpleElem )
-                    {
-                    noteSimpleElem = ResolveNoteElementL( elems2 );
-                    }
-                
+             	    // Check note field    
+             	    if ( basicElementFound  && 
+             	        !elem2->LocalName().CompareF( KPresenceNote8 ) )
+             	        {
+             	        DP_SDA("NotifyToPrInfoL note field found inside tuple");
+			            noteSimpleElem = elem2;
+             	        }             	    
+                    }   
                 DP_SDA("NotifyToPrInfoL ALL DONE"); 
                 CleanupStack::PopAndDestroy( &elems2 );
                 
-                if ( basicElementFound && activitiesElementFound && noteElemFound )
+                if( basicElementFound && activitiesElementFound && noteElemFound )
                     {
                     DP_SDA("NotifyToPrInfoL ALL DONE break out"); 
                     //Just handle first status information from document
@@ -487,7 +482,6 @@
     DP_SDA("CPresencePluginData::NotifyToPrInfoL end");        
     }
 
-
 // ---------------------------------------------------------------------------
 // CPresencePluginData::CacheEntriesFromPrInfo
 // ---------------------------------------------------------------------------
@@ -714,21 +708,19 @@
                 }
             }
         
-        field->SetFieldValue( enumField );
+        field->SetFieldValue( enumField );        
         aCollection.AddOrReplaceFieldL( field );
         
-        CleanupStack::Pop( 2 );            // >> field, enumField
+        CleanupStack::Pop( 2 );            // >> field, enumField      
         
         DP_SDA(" CPresencePluginData::SingleUserStatusToXIMPL check for note");
-        
-        // Handle note field if found and buddy is "available".
-        if ( aNoteElement && 
-             NPresenceInfo::EOffline != enumField->Value() &&
-             NPresenceInfo::ENotAvailable != enumField->Value() )
+        // Handle notes field if found
+        if ( aNoteElement )
             {
             DP_SDA(" CPresencePluginData::SingleUserStatusToXIMPL note elems found");
             // consider mapping note text to enum value if value not mapped
-            UserNoteToXIMPL( aPresenceFactory, aNoteElement, aCollection );
+            UserNoteToXIMPL( aPresenceFactory, aNoteElement, 
+                aCollection );
             }
         }
     CleanupStack::PopAndDestroy( nodeContent );
@@ -985,7 +977,7 @@
         TInt len = aPresentityUri.Length() + KMyLenSipPrefix;
         buf = buf->ReAllocL( len );
         //update pointer after realloc
-        CleanupStack::Pop( 1 );
+        CleanupStack::Pop( buf );
         CleanupStack::PushL( buf );
         // Since realloc may have changed the location in memory
         // we must also reset ptr
@@ -1388,58 +1380,7 @@
     {
     return iServiceId;
     }
-
-// ---------------------------------------------------------------------------
-// CPresencePluginData::ServiceNameLC()
-// ---------------------------------------------------------------------------
-//
-HBufC* CPresencePluginData::ServiceNameLC( TInt aServiceId ) const
-    {
-    CSPSettings* spSettings = CSPSettings::NewLC();
-    CSPEntry* entry = CSPEntry::NewLC();
-    HBufC* serviceName = NULL;
     
-    User::LeaveIfError( spSettings->FindEntryL( aServiceId, *entry ) );
-    
-    serviceName = entry->GetServiceName().AllocL();
-    
-    CleanupStack::PopAndDestroy( entry );
-    CleanupStack::PopAndDestroy( spSettings );
-    CleanupStack::PushL( serviceName );
-    return serviceName;
-    }
-
-// ---------------------------------------------------------------------------
-// CPresencePluginData::ResolveCacheXspIdentifierL()
-// ---------------------------------------------------------------------------
-//
-HBufC* CPresencePluginData::ResolveCacheXspIdentifierL(
-    const TDesC& aIdentity ) const
-    {
-    DP_SDA( "CPresencePluginData::ResolveCacheXspIdentifierL" ); 
-    
-    CSPSettings* spSettings = CSPSettings::NewLC();
-    CSPEntry* entry = CSPEntry::NewLC();
-    
-    User::LeaveIfError( spSettings->FindEntryL( iServiceId, *entry ) );
-
-    TInt cacheUriLength = ( entry->GetServiceName().Length() + 
-            aIdentity.Length() + 1 );
-    
-    HBufC* cacheUri = HBufC::NewL( cacheUriLength );
-    TPtr cacheUriPtr( cacheUri->Des() );
-    
-    cacheUriPtr.Append( entry->GetServiceName() );
-    cacheUriPtr.Append( ':' );
-    cacheUriPtr.Append( aIdentity );
-    
-    CleanupStack::PopAndDestroy( entry );
-    CleanupStack::PopAndDestroy( spSettings );
-    
-    DP_SDA2( "CPresencePluginData::ResolveCacheXspIdentifierL returns: %S", cacheUri );
-    return cacheUri;
-    }
-
 // ---------------------------------------------------------------------------
 // CPresencePluginData::WriteBlockItemsToCacheL()
 // ---------------------------------------------------------------------------
@@ -1457,102 +1398,76 @@
         &aAvailabilityText );
     DP_SDA2( "CPresencePluginData::WriteStatusToCacheL, statusMessage: %S", 
         &aStatusMessage );
-
-    TBool updateCache( ETrue );
-    
-    HBufC* cacheUri = ResolveCacheXspIdentifierL( aPresentityId );
-    CleanupStack::PushL( cacheUri );
     
-    DP_SDA(" -> WriteStatusToCacheL - read previous values from cache"); 
+    CSPSettings* spSettings = CSPSettings::NewL();
+    CleanupStack::PushL( spSettings );
+    // Resolve service name (cache xsp identifier)
+    CSPEntry* entry = CSPEntry::NewLC();
+    spSettings->FindEntryL( ServiceId(), *entry );
+
+    TInt cacheUriLength = ( entry->GetServiceName().Length() + 
+        aPresentityId.Length() + 1 );
     
-    // Read previous values from cache
-    MPresenceBuddyInfo2* previousPresInfo = 
-        iPresenceCacheReader->PresenceInfoLC( *cacheUri );
+    DP_SDA2(" -> cache uri length: %d", cacheUriLength );    
+    
+    HBufC* cacheUri = HBufC::NewLC( cacheUriLength );
+    TPtr cacheUriPtr( cacheUri->Des() );
     
-    if ( previousPresInfo )
-        {
-        DP_SDA(" -> WriteStatusToCacheL - get availability value"); 
-        
-        MPresenceBuddyInfo2::TAvailabilityValues availability = 
-            previousPresInfo->Availability();
-        
-        DP_SDA(" -> WriteStatusToCacheL - get availability text"); 
-        
-        TPtrC availabilityText = previousPresInfo->AvailabilityText();
-        
-        DP_SDA(" -> WriteStatusToCacheL - get status message"); 
-        
-        TPtrC statusMessage = previousPresInfo->StatusMessage();
-        CleanupStack::PopAndDestroy(); //previousPresInfo 
-        
-        DP_SDA2( "CPresencePluginData::WriteStatusToCacheL, OLD STATUS: %d", 
-                availability );
-        DP_SDA2( "CPresencePluginData::WriteStatusToCacheL, OLD AVAILABILITY TEXT: %S", 
-            &availabilityText );
-        DP_SDA2( "CPresencePluginData::WriteStatusToCacheL, OLD STATUS MESSAGE: %S", 
-            &statusMessage );
-        
-        if ( ( aAvailability == availability ) && 
-            ( aAvailabilityText.Compare( availabilityText ) == 0 ) &&
-            ( aStatusMessage.Compare( statusMessage ) == 0 ))
-            {
-            DP_SDA(" -> WriteStatusToCacheL - no need to update cache");    
-            updateCache = EFalse;
-            } 
-        }
-        
-    if ( updateCache )
+    DP_SDA(" -> WriteStatusToCacheL - form cache entry");
+    cacheUriPtr.Append( entry->GetServiceName() );
+    cacheUriPtr.Append( ':' );
+    cacheUriPtr.Append( aPresentityId );
+    
+    MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
+    buddyPresInfo->SetIdentityL( cacheUriPtr );
+
+    TBuf<20> buf;
+    TBool handled = EFalse;
+    
+    buf.Copy( KBlockedExtensionValue );
+   
+    if( aAvailabilityText.Compare( buf ) == 0 )
         {
-        MPresenceBuddyInfo2* newPresInfo = MPresenceBuddyInfo2::NewLC();
-        newPresInfo->SetIdentityL( *cacheUri );
-        
-        DP_SDA(" -> WriteStatusToCacheL - update cache");
-        
-        TBuf<KBufSize20> buf;
-        TBool handled = EFalse;
-           
-        buf.Copy( KBlockedExtensionValue );
-          
-        if( aAvailabilityText.Compare( buf ) == 0 )
-            {
-            DP_SDA( " -> WriteStatusToCacheL - set Blocked" );
-            newPresInfo->SetAnyFieldL( KExtensionKey, KBlockedExtensionValue );
-            handled = ETrue;
-            }
-           
-        buf.Copy( KPendingRequestExtensionValue );
-           
-        if ( aAvailabilityText.Compare( buf ) == 0 )
-            {
-            DP_SDA( " -> WriteStatusToCacheL - set Pending request" );
-            newPresInfo->SetAnyFieldL( KExtensionKey, KPendingRequestExtensionValue );
-            handled = ETrue;
-            }
-           
-        if ( !handled )
-            {
-            DP_SDA2( " -> WriteStatusToCacheL - set availability text: %S", &aAvailabilityText );
-            newPresInfo->SetAvailabilityL( aAvailability, aAvailabilityText );
-            }
-           
-        if ( aStatusMessage.Length() )
-            {
-            DP_SDA2( " -> WriteStatusToCacheL - set status message: %S", &aStatusMessage ); 
-            newPresInfo->SetStatusMessageL( aStatusMessage );
-            }
-
-        DP_SDA( " -> WriteStatusToCacheL - write presence to cache" );    
-        TInt cacheError = iPresenceCacheWriter->WritePresenceL( newPresInfo );
-        DP_SDA2( "CPresencePluginEntityWatcher::WriteStatusToCacheL error: %d", 
-            cacheError );
-           
-        DP_SDA( " -> destroy buddy info" );    
-        CleanupStack::PopAndDestroy(); // newPresInfo            
+        DP_SDA( " -> WriteStatusToCacheL - set Blocked" );
+        buddyPresInfo->SetAnyFieldL( KExtensionKey, KBlockedExtensionValue );
+        handled = ETrue;
         }
     
+    buf.Copy( KPendingRequestExtensionValue );
+    
+    if ( aAvailabilityText.Compare( buf ) == 0 )
+        {
+        DP_SDA( " -> WriteStatusToCacheL - set Pending request" );
+        buddyPresInfo->SetAnyFieldL( KExtensionKey, KPendingRequestExtensionValue );
+        handled = ETrue;
+        }
+    
+    if ( !handled )
+        {
+        DP_SDA( " -> WriteStatusToCacheL - set availability text" );
+            buddyPresInfo->SetAvailabilityL( aAvailability, aAvailabilityText );
+        }
+    
+    if ( aStatusMessage.Length() )
+        {
+        DP_SDA( " -> WriteStatusToCacheL - set status message" ); 
+        buddyPresInfo->SetStatusMessageL( aStatusMessage );
+        }
+
+    DP_SDA( " -> WriteStatusToCacheL - write presence to cache" );    
+    TInt cacheError = iPresenceCacheWriter->WritePresenceL( buddyPresInfo );
+    DP_SDA2( "CPresencePluginEntityWatcher::WriteStatusToCacheL error: %d", 
+        cacheError );
+    
+    DP_SDA( " -> destroy buddy info" );    
+    CleanupStack::PopAndDestroy(); // buddyPresInfo
     DP_SDA(" -> destroy uri");    
     CleanupStack::PopAndDestroy( cacheUri );
 
+    DP_SDA(" -> destroy sp entry");        
+    CleanupStack::PopAndDestroy( entry );        
+    DP_SDA(" -> destroy sp");        
+    CleanupStack::PopAndDestroy( spSettings );
     DP_SDA("CPresencePluginData::WriteStatusToCacheL end");
     }     
     
@@ -1567,7 +1482,6 @@
     // Resolve service name (cache xsp identifier)
     CSPSettings* spSettings = CSPSettings::NewL();
     CleanupStack::PushL( spSettings );
-    
     CSPEntry* entry = CSPEntry::NewLC();
     DP_SDA2(" -> RemoveCacheL look for service: %d", ServiceId() );
     spSettings->FindEntryL( ServiceId(), *entry );
@@ -1630,7 +1544,6 @@
     CleanupStack::PopAndDestroy( spSettings );
     DP_SDA("CPresencePluginData::DeletePresenceL out");
     }    
-
     
 // ---------------------------------------------------------------------------
 // CPresencePluginData::StorePresenceOwnPresenceL()
@@ -1646,7 +1559,7 @@
         
     DP_SDA2(" -> SAVE AVAILABILITY VALUE: %d", aAvailability );
     DP_SDA2(" -> SAVE STATUS MESSAGE: %S", &aStatusMessage );
-        
+       
     MVIMPSTSettingsStore* settings = CVIMPSTSettingsStore::NewLC();
     
     DP_SDA("CPresencePluginData::StorePresenceOwnPresenceL 1");
@@ -1676,7 +1589,7 @@
     TDes8& aDocumentId )
     {  
     DP_SDA("CPresencePluginData::ReadDocumentIdL IN");
-        
+    
     DP_SDA2(" -> aServiceId: %d", aServiceId );
     
     MVIMPSTSettingsStore* settings = CVIMPSTSettingsStore::NewLC();
@@ -1745,80 +1658,5 @@
     
     DP_SDA("CPresencePluginData::DeletePresenceVariablesL OUT");
     }   
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginData::ResolveNoteElementL
-// Returns <note> element corresponding current locale or first <note> 
-// element if better match is not found.
-// ---------------------------------------------------------------------------
-//
-MSimpleElement* CPresencePluginData::ResolveNoteElementL( 
-        const RPointerArray<MSimpleElement>& aElements ) const
-    {
-    DP_SDA("CPresencePluginData::ResolveNoteElementL" )
-    
-    MSimpleElement* bestMatch = NULL;
-    MSimpleElement* secondBestMatch = NULL;
-    
-    for ( TInt i = aElements.Count() - 1; i >= 0 && NULL == bestMatch; i-- )
-        {
-        MSimpleElement* element = aElements[i];
         
-        using namespace NPresencePlugin::NPresence;
-        if ( 0 == element->LocalName().CompareF( KPresenceNote8 ) )
-            {
-            if ( IsElementLanguageValidForCurrentLocaleL( *element ) )
-                {
-                DP_SDA("CPresencePluginData::ResolveNoteElementL, BEST MATCH.")
-                bestMatch = element;
-                }
-            else
-                {
-                secondBestMatch = element;
-                }
-            }
-        }
-    
-    return ( bestMatch ? bestMatch : secondBestMatch );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginData::IsElementLanguageValidForCurrentLocaleL
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginData::IsElementLanguageValidForCurrentLocaleL( 
-        MSimpleElement& aElement ) const
-    {
-    DP_SDA( "CPresencePluginData::IsElementLanguageValidForCurrentLocaleL" )
-    
-    TBool isLanguageResolved = EFalse;
-    _LIT8( KLanguageAttribute, "xml:lang" );
-    
-    TLanguage language = User::Language();
-    RPointerArray<MSimpleAttribute> attributes;
-    CleanupClosePushL( attributes );
-    aElement.SimpleAttributesL( attributes );
-    for ( TInt i = attributes.Count() - 1; i >= 0 && !isLanguageResolved; i-- )
-        {
-        if ( 0 == KLanguageAttribute().CompareF( attributes[i]->Name() ) )
-            {
-            const TDesC8& attributeValue = attributes[i]->Value();
-            for ( TInt index = 0; index < KLanguageCodeMappingsCount; index++ )
-                {
-                if ( language == KLanguageCodeMappings[index].SymbianLanguageCode() &&
-                     0 == attributeValue.CompareF( 
-                         KLanguageCodeMappings[index].IsoLanguageCode() ) )
-                    {
-                    isLanguageResolved = ETrue;
-                    }
-                }
-            }
-        }
-    CleanupStack::Pop( &attributes );
-    
-    return isLanguageResolved;
-    }
-
 // End of file
--- a/simpledatamodeladapter/src/presencepluginentitywatcher.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginentitywatcher.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -395,13 +395,7 @@
         MXIMPIdentity* identity2 = iConnObs.ObjectFactory().NewIdentityLC();    
         
         HBufC* withoutPrefix = iPresenceData->RemovePrefixLC( aIdentity );
-        identity2->SetIdentityL( *withoutPrefix );
-        
-        DP_SDA("SetTerminatedToXIMPL, write offline status to cache");
-        iPresenceData->WriteStatusToCacheL( *withoutPrefix,
-            MPresenceBuddyInfo2::ENotAvailable,
-            KNullDesC(),
-            KNullDesC() );
+        identity2->SetIdentityL( *withoutPrefix );   
         
         // XIMP Host API callback 
         watcherHost.HandleSubscribedPresentityPresenceL( identity2, prInfo );
--- a/simpledatamodeladapter/src/presencepluginpublisher.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginpublisher.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -356,6 +356,7 @@
             TBuf8<KBufSize255> buf;
             buf.Copy( iPublisher->SIPETag() );
             iConnObs.SetETag( buf );
+            iPresenceData->StoreDocumentIdL( iConnObs.ServiceId(), buf );
             }
     	//Do not complete if error republish is true. XIMPFW is not knowing we 
     	//are sending republish.
@@ -374,7 +375,6 @@
             if( iConnObs.IsStopPublishCalled() )
                 {
                 DP_SDA("PublishReqCompleteL complete closeSession"); 
-                iPresenceData->DeletePresenceVariablesL( iConnObs.ServiceId() );
                 // successfull Online / others: store status to cache
                 StoreOwnStatusToCacheL( );
                 //Complete close session
@@ -388,12 +388,7 @@
            CreatePublisherL();        
            iSimpleId = iPublisher->StartPublishL( *iDocument, ETrue );
            }
-        else if( EFalse == iRePublish && ( KErrTimedOut == aStatus  ) )
-            {
-            DP_SDA("PublishReqCompleteL KErrTimedOut"); 
-            iPublisher->StopPublishL();
-            CompleteXIMPReq( KXIMPErrServicRequestTimeouted );
-            }
+        
         else
         	{
         	//Set rePublish flag back to false.
@@ -730,30 +725,13 @@
     
     aStatus = KRequestPending;
     iClientStatus = &aStatus;
-    
-    TInt err1( 0 );
-    TInt err2( 0 );
-    
-    // get stored document id if available
-    HBufC8* oldDocumentId = HBufC8::NewLC( KBufSize255 );
-    TPtr8 oldDocumentIdPtr( oldDocumentId->Des() );
-    TRAP( err1, iPresenceData->ReadDocumentIdL( 
-            iConnObs.ServiceId(), oldDocumentIdPtr ) );
-    
+    	
     if ( iConnObs.GetStopPublishState() && iPublished )
         {
         DP_SDA("CPresencePluginPublisher::StopPublish really Stop");
-        if ( !err1 )
-            {
-            TRAP( err2, iPublisher->StopPublishL( oldDocumentIdPtr ) );
-            }
-        else 
-            {
-            // if stored document id is not available try with this
-            TRAP( err2, iPublisher->StopPublishL( iConnObs.GetETag() ) );
-            }
-        DP_SDA2("StopPublish iPublisher->StopPublishL : error = %d ", err2 );
-        if ( KErrNone != err2 )
+        TRAPD( error, iPublisher->StopPublishL( iConnObs.GetETag() ););
+        DP_SDA2("StopPublish iPublisher->StopPublishL : error = %d ", error );
+        if ( KErrNone != error )
             {            
             if( iPublisher )
                 {
@@ -764,35 +742,24 @@
                 iPublisher =
                 	TSimpleFactory::NewPublisherL( iConnection, *this ); 
                 DP_SDA("StopPublish really Stop try again 2 ");
-                err2 = KErrGeneral;
-                TRAP( err2, iPublisher->StopPublishL( iConnObs.GetETag() ););
-                DP_SDA2("StopPublishL 2nd try : error = %d ", err2 );
-                if ( KErrNone != err2 )
+                error = KErrGeneral;
+                TRAP( error, iPublisher->StopPublishL( iConnObs.GetETag() ););
+                DP_SDA2("StopPublishL 2nd try : error = %d ", error );
+                if ( KErrNone != error )
                     {
                     DP_SDA("StopPublish TWO TIME Error, last try without tag ");
-                    TRAP( err2, iPublisher->StopPublishL(); );
-                    DP_SDA2("StopPublishL 3rd try : error = %d ", err2 );
+                    TRAP( error, iPublisher->StopPublishL(); );
+                    DP_SDA2("StopPublishL 3rd try : error = %d ", error );
                     }
                 }
             }
         iConnObs.SetStopPublishState( ETrue );
         iPublished = EFalse;
         }
-    CleanupStack::PopAndDestroy( oldDocumentId );
-    
     DP_SDA("CPresencePluginPublisher::StopPublish- end");        
     }
     
 // ---------------------------------------------------------------------------
-// CPresencePluginPublisher::Published()
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginPublisher::Published()
-    {
-    return iPublished;
-    }
-
-// ---------------------------------------------------------------------------
 // CPresencePluginPublisher::MakePublishReqL()
 // ---------------------------------------------------------------------------
 //
@@ -800,16 +767,16 @@
     {
     DP_SDA("CPresencePluginPublisher::MakePublishReqL");
     
+    if ( !iPublished )
+        {
+        DP_SDA("CPresencePluginPublisher::MakePublishReqL 1");       
+        CreatePublisherL();
+        
         DP_SDA(" -> MakePublishReqL, check for old doc id");       
         HBufC8* oldDocumentId = HBufC8::NewLC( KBufSize255 );
         TPtr8 oldDocumentIdPtr( oldDocumentId->Des() );
         TRAPD( error, iPresenceData->ReadDocumentIdL( 
             iConnObs.ServiceId(), oldDocumentIdPtr ) );
-    if ( !iPublished )
-        {
-        DP_SDA("CPresencePluginPublisher::MakePublishReqL 1");       
-        CreatePublisherL();
-        
         DP_SDA2(" -> MakePublishReqL, doc id error: %d", error );
         if ( !error )
             {
@@ -822,28 +789,19 @@
             DP_SDA(" -> MakePublishReqL, publish with new id");       
             iSimpleId = iPublisher->StartPublishL( *iDocument, ETrue );    
             }
+        CleanupStack::PopAndDestroy( oldDocumentId );
         }
     else
         {
         DP_SDA("CPresencePluginPublisher::MakePublishReqL 2");
         CreatePublisherL();
         DP_SDA("CPresencePluginPublisher::MakePublishReqL Continue Publish");
-        if ( !error )
-            {
-            DP_SDA(" -> MakePublishReqL, publish with stored id");
-            iSimpleId = iPublisher->ContinuePublishL( 
-                *iDocument ,ETrue, oldDocumentIdPtr );
-            }
-        else
-            {
-            DP_SDA(" -> MakePublishReqL, stored id not found" );
-            DP_SDA(", publish with old id");
-            iSimpleId = iPublisher->ContinuePublishL( 
-                            *iDocument ,ETrue, iConnObs.GetETag() );
-            }
+        iSimpleId =
+            iPublisher->ContinuePublishL( 
+                *iDocument ,ETrue, iConnObs.GetETag() );
 		DP_SDA("CPresencePluginPublisher::MakePublishReqL modifyed");
         }
-    CleanupStack::PopAndDestroy( oldDocumentId );
+                
     DP_SDA("CPresencePluginPublisher::MakePublishReqL end");     
     } 
 
--- a/simpledatamodeladapter/src/presencepluginsession.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginsession.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -81,7 +81,7 @@
     iServiceId = aService.IapId();
     
     //Create connection
-    iConnection = TSimpleFactory::NewConnectionL( *this, aService.IapId() );
+    iConnection = TSimpleFactory::NewConnectionL( *this );
     
     //Check here is xdm settings ok
     CheckXDMSettingsL( aService.IapId() );
@@ -446,7 +446,7 @@
     }
 
 // ---------------------------------------------------------------------------
-// CPresencePluginSession::DoCancel()
+// CPresencePluginPublisher::DoCancel()
 // ---------------------------------------------------------------------------
 //
 void CPresencePluginSession::DoCancel(  )
@@ -490,7 +490,7 @@
 //
 TInt CPresencePluginSession::RunError( TInt /*aError*/ )
     {
-    DP_SDA("CPresencePluginSession::RunError"); 
+    DP_SDA("CPresencePluginPublisher::RunError"); 
     return KErrNone;
     }
 
--- a/simpledatamodeladapter/src/presencepluginxdmpresrules.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginxdmpresrules.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -564,11 +564,7 @@
                 {
                 CXdmDocumentNode* currNode = nodes[i];
                 attr = ( currNode )->Attribute( KPresenceId );
-                
-                TBool uriMatch = CompareUriWithoutPrefixL( 
-                    aUri, attr->AttributeValue() );
-                 
-                if ( attr && uriMatch )
+                if ( attr && !attr->AttributeValue().CompareF( aUri ))
                     {
                     DP_SDA("RemoveOneFromRule Remove");
                     //First remove currNode form model
@@ -651,21 +647,21 @@
             ruleNode->Find( KPresenceIdentity, identityNode ) );
             if ( identityNode[0] )    
                 {
-                if ( identityNode[0]->IsEmptyNode() )
-                    {
-                    DP_SDA("DoOneAddUserL rule node empty");
-                    identityNode[0]->SetEmptyNode( EFalse );
-                    }
-                
-                // create new one node inside identity
-                CXdmDocumentNode* newNode =
+                    if ( identityNode[0]->IsEmptyNode() )
+                        {
+                        DP_SDA("DoOneAddUserL rule node empty");
+                        identityNode[0]->SetEmptyNode( ETrue );
+                        }
+                    // create new one node inside identity
+                    CXdmDocumentNode* newNode =
                     identityNode[0]->CreateChileNodeL( KPresenceOne );
-                CXdmNodeAttribute* attributeOneId =
+                    newNode->SetEmptyNode( ETrue );
+                    CXdmNodeAttribute* attributeOneId =
                     newNode->CreateAttributeL( KPresenceId );
-                
-                attributeOneId->SetAttributeValueL( aUri );
-                iPresRulesDoc->AppendL();
-                DP_SDA("DoOneAddUserL added");
+
+                    attributeOneId->SetAttributeValueL( aUri );
+                    iPresRulesDoc->AppendL();
+                    DP_SDA("DoOneAddUserL added");
                 }
             }
         }
@@ -874,12 +870,7 @@
                 {
                 CXdmDocumentNode* currNode = nodes[i];
                 attr = ( currNode )->Attribute( KPresenceId );
-                
-                TBool uriMatch( EFalse );                
-                uriMatch = CompareUriWithoutPrefixL( 
-                    aUri, attr->AttributeValue() );
-                
-                if ( attr && uriMatch )
+                if ( attr && !attr->AttributeValue().CompareF( aUri ))
                     {
                     DP_SDA("CheckIfOneExistL entity exists");
                     //Enity is exist
@@ -1067,7 +1058,7 @@
 
     if ( !aParent )
         {
-        DP_SDA("CPresencePluginXdmPresRules::SearchListUnderParentL return NULL");
+        DP_SDA("CPresencePluginXdmUtils::SearchListUnderParentL return NULL");
         return NULL;
         }
 
@@ -1102,54 +1093,8 @@
 
     CleanupStack::PopAndDestroy(); // clItem
     CleanupStack::PopAndDestroy(); // clItem2
-    DP_SDA("CPresencePluginXdmPresRules::SearchListUnderParentL return");
+    DP_SDA("CPresencePluginXdmUtils::SearchListUnderParentL return");
     return currNode;
     }
    
-
-// ---------------------------------------------------------------------------
-// CPresencePluginXdmPresRules::SearchListUnderParentL
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginXdmPresRules::CompareUriWithoutPrefixL( 
-    const TDesC& aUri, const TDesC& aAttribute )
-    {
-    DP_SDA("CPresencePluginXdmPresRules::CompareUriWithoutPrefixL");
-    
-    TBool match( EFalse );
-    
-    RBuf uriWithoutPrefix;
-    CleanupClosePushL( uriWithoutPrefix );
-    uriWithoutPrefix.CreateL( aUri );
-    TInt prefixLocation = uriWithoutPrefix.Locate( ':' );
-                   
-    if ( KErrNotFound != prefixLocation )
-        {
-        uriWithoutPrefix.Delete( 0, ( prefixLocation + 1 ) );
-        }
-        
-     RBuf attributeWithoutprefix;
-     CleanupClosePushL( attributeWithoutprefix );
-     attributeWithoutprefix.CreateL( aAttribute );
-     prefixLocation = attributeWithoutprefix.Locate( ':' );
-                   
-     if ( KErrNotFound != prefixLocation )
-         {
-         attributeWithoutprefix.Delete( 0, ( prefixLocation + 1 ) );
-         }
-                    
-     DP_SDA2("    --> uri without prefix=%S", &uriWithoutPrefix );
-     DP_SDA2("    --> attribute without prefix=%S", &attributeWithoutprefix );                 
-                
-     if ( uriWithoutPrefix.Compare( attributeWithoutprefix ) == 0 )
-         {
-         match = ETrue;
-         }
-                   
-    CleanupStack::PopAndDestroy( &attributeWithoutprefix );
-    CleanupStack::PopAndDestroy( &uriWithoutPrefix );
-    
-    return match;
-    }
-
 // End of file
--- a/simpledatamodeladapter/src/presencepluginxdmutils.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpledatamodeladapter/src/presencepluginxdmutils.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -123,8 +123,6 @@
     delete iEntityUri;
     iEntityUri = NULL;
 
-    iBlockedContacts.ResetAndDestroy();
-
     DP_SDA("CPresencePluginXdmUtils::~CPresencePluginXdmUtils end"); 
     }
 
@@ -393,11 +391,7 @@
             DoUpdateXdmListsL( myStatus, origState );
             }
         break;
-
-        case EUpdateBlockedContactPresenceCache:
-            DoUpdateBlockedContactPresenceCacheL( myStatus );
-            break;
-
+         
         default:
             {
             DP_SDA("CPresencePluginXdmUtils::RunL last else");        
@@ -550,7 +544,7 @@
             iXdmOk = ETrue;
             if ( !iPresXdmOk && !iLocalMode && aOrigState == EGetXdmLists )
                 {
-                DP_SDA("CPresencePluginXdmUtils::DoGetXdmLists GetXDM");
+                DP_SDA("CPresencePluginXdmUtils::RunL GetXDM");
                 GetXdmRulesL();
                 }
             else
@@ -782,12 +776,7 @@
                 {
                 CXdmDocumentNode* currNode = nodes[i];
                 attr = ( currNode )->Attribute( KPresenceUri );
-                
-                TBool uriMatch( EFalse );
-                uriMatch = CompareUriWithoutPrefixL( 
-                    aUri, attr->AttributeValue() );
-                
-                if ( attr && uriMatch )
+                if ( attr && !attr->AttributeValue().CompareF( aUri ))
                     {
                     DP_SDA("CheckIfEnityExist entity exists");
                     //Enity is exist
@@ -947,17 +936,11 @@
         TInt nodeCount = nodes.Count();
         for ( TInt i = 0; i < nodeCount; i++ )
             {
-            CXdmDocumentNode* currNode = nodes[i];         
+            CXdmDocumentNode* currNode = nodes[i];
             attr = ( currNode )->Attribute( KPresenceUri );
-            
-            TBool uriMatch( EFalse );
-            uriMatch = CompareUriWithoutPrefixL( 
-                aUri, attr->AttributeValue() );
-            
-            if ( attr && uriMatch )
+            if ( attr && !attr->AttributeValue().CompareF( aUri ))
                 {
-                DP_SDA(" DoRemoveUserFromListL Node Found, do delete");	
-            
+                DP_SDA(" DoRemoveUserFromListL Node Found, do delete");		
                 // This is the user we are looking for deletion.
                 //First remove currNode form model
                 iXdmDoc->RemoveFromModelL( currNode );
@@ -1302,11 +1285,6 @@
 	DP_SDA("CPresencePluginXdmUtils::AddIdentityToVirtualListL ");
 	using namespace NPresencePlugin::NPresence;
 
-	if ( aList.Compare( KPresenceBlockedList ) == NULL )
-	    {
-	    iBlockedContacts.ResetAndDestroy();
-	    }
-
     CXdmDocumentNode* buddylist = DoGetBuddyListL( aList );
 
     // make a collection of MXIMPPresentityGroupMemberInfo
@@ -1335,11 +1313,26 @@
             else if ( !aList.CompareF( KPresenceBlockedList ) )
                 {
                 DP_SDA("AddIdentityToVirtualListL add to blocked");
+                
+                HBufC* uniBuffer = attr->AttributeValue().AllocLC();
+                DP_SDA("AddIdentityToVirtualListL, identity ok");
+                
+                DP_SDA("AddIdentityToVirtualListL, strip prefix");
                 HBufC* withoutPrefix = 
                     iConnObs.InternalPresenceAuthorization().
-                        PluginData().RemovePrefixLC( attr->AttributeValue() );
-                CleanupStack::Pop( withoutPrefix );
-                iBlockedContacts.AppendL( withoutPrefix );
+                        PluginData().RemovePrefixLC( *uniBuffer );
+                
+                TBuf<20> buf;
+                buf.Copy( KBlockedExtensionValue );
+                
+                iConnObs.InternalPresenceAuthorization().PluginData().
+                    WriteStatusToCacheL( *withoutPrefix, 
+                            MPresenceBuddyInfo2::EUnknownAvailability,
+                            buf,
+                            KNullDesC() );
+                
+                CleanupStack::PopAndDestroy( withoutPrefix );
+                CleanupStack::PopAndDestroy( uniBuffer );
                 }
             }
         }
@@ -1489,25 +1482,10 @@
             {
             DP_SDA("DoHandlePresUpdateDocumentL EGetXdmRules SEND COMPLETE ");
             // Complete with ok or error the last initial opreration
-
-            // update presence cache if needed before complete client req.
             iPresXdmOk = ETrue;
+            CompleteClientReq( aErrorCode );
+            } 
 
-            if ( iBlockedContacts.Count() > 0 )
-                {
-                iConnObs.InternalPresenceAuthorization().
-                    IsBlockedContactFriendRequestL(
-                         *iBlockedContacts[ iBlockedContacts.Count() - 1 ],
-                         *this, iStatus );
-
-                iXdmState = EUpdateBlockedContactPresenceCache;
-                SetActive();
-                }
-            else
-                {
-                CompleteClientReq( aErrorCode );
-                }
-            }
         }
     else if ( iXdmState == EUpdateXdmRules )
         {
@@ -1574,112 +1552,4 @@
         }
     }
     
-// ---------------------------------------------------------------------------
-// CPresencePluginXdmUtils::SearchListUnderParentL
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginXdmUtils::CompareUriWithoutPrefixL( 
-    const TDesC& aUri, const TDesC& aAttribute )
-    {
-    DP_SDA("CPresencePluginXdmUtils::CompareUriWithoutPrefixL");
-    
-    TBool match( EFalse );
-    
-    RBuf uriWithoutPrefix;
-    CleanupClosePushL( uriWithoutPrefix );
-    uriWithoutPrefix.CreateL( aUri );
-    TInt prefixLocation = uriWithoutPrefix.Locate( ':' );
-                   
-    if ( KErrNotFound != prefixLocation )
-        {
-        uriWithoutPrefix.Delete( 0, ( prefixLocation + 1 ) );
-        }
-        
-     RBuf attributeWithoutprefix;
-     CleanupClosePushL( attributeWithoutprefix );
-     attributeWithoutprefix.CreateL( aAttribute );
-     prefixLocation = attributeWithoutprefix.Locate( ':' );
-                   
-     if ( KErrNotFound != prefixLocation )
-         {
-         attributeWithoutprefix.Delete( 0, ( prefixLocation + 1 ) );
-         }
-                    
-     DP_SDA2("    --> uri without prefix=%S", &uriWithoutPrefix );
-     DP_SDA2("    --> attribute without prefix=%S", &attributeWithoutprefix );                 
-                
-     if ( uriWithoutPrefix.Compare( attributeWithoutprefix ) == 0 )
-         {
-         match = ETrue;
-         }
-                   
-    CleanupStack::PopAndDestroy( &attributeWithoutprefix );
-    CleanupStack::PopAndDestroy( &uriWithoutPrefix );
-    
-    return match;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginXdmUtils::DoUpdateBlockedContactPresenceCacheL()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginXdmUtils::DoUpdateBlockedContactPresenceCacheL(
-    TInt aMyStatus )
-    {
-    DP_SDA( "CPresencePluginXdmUtils::DoUpdateBlockedContactPresenceCache" );
-
-    const TInt KTextBufferSize = 10;
-    TInt contactsCount = iBlockedContacts.Count();
-
-    if ( contactsCount > 0 )
-        {
-        if ( iPresenceContactsAsyncReqResult )
-            {
-            DP_SDA(" RunL  -write blocked status to cache" );
-            TBuf<KTextBufferSize> buf;
-            buf.Copy( KBlockedExtensionValue );
-            iConnObs.InternalPresenceAuthorization().PluginData().
-                WriteStatusToCacheL( *iBlockedContacts[ contactsCount - 1 ],
-                     MPresenceBuddyInfo2::EUnknownAvailability,
-                     buf,
-                     KNullDesC() );
-           }
-       delete iBlockedContacts[ contactsCount - 1 ];
-       iBlockedContacts.Remove( contactsCount - 1 );
-
-       if ( iBlockedContacts.Count() > 0 )
-           {
-            iConnObs.InternalPresenceAuthorization().
-                IsBlockedContactFriendRequestL(
-                    *iBlockedContacts[ iBlockedContacts.Count() - 1 ],
-                    *this, iStatus );
-
-           iXdmState = EUpdateBlockedContactPresenceCache;
-           SetActive();
-           }
-       else
-           {
-           CompleteClientReq( aMyStatus );
-           }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// From MPresencePluginContactsObs
-// CPresencePluginXdmUtils::RequestComplete
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginXdmUtils::RequestComplete( TAny* aResult,
-    TPresenceContactsOperation /*aOperation*/, TInt aError )
-    {
-    iPresenceContactsAsyncReqResult = EFalse;
-    if ( NULL != aResult && KErrNone == aError )
-        {
-        iPresenceContactsAsyncReqResult =
-            *static_cast<TBool*>( aResult );
-        }
-    }
-
 // End of file
--- a/simpledatamodeladapter/src/presensepluginlocalstore.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IETF SIMPLE Protocol implementation for XIMP Framework
-*
-*/
-
-
-#include <aknutils.h>
-#include "presencepluginlocalstore.h"
-#include "presencelogger.h"
-
-_LIT( KContactId, "ContactId" );
-_LIT( KContactTable, "Contacts" );
-_LIT( KStorageExtn, ".db");
-_LIT( KDbPath, "c:\\" );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::CPresencePluginLocalstore
-// ---------------------------------------------------------------------------
-//
-CPresencePluginLocalstore::CPresencePluginLocalstore()
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginLocalstore::ConstructL( const TDesC& aServiceName )
-    {
-    DP_SDA( "CPresencePluginLocalstore::ConstructL -Start" );
-
-    iLocalDBName =
-        HBufC::NewL( aServiceName.Length()+ KStorageExtn().Length() );
-    TPtr localDBNamePtr = iLocalDBName->Des();
-    localDBNamePtr.Append( aServiceName );
-
-    _LIT( KSpecialChar, "/\\:*?<>\"" );
-    AknTextUtils::StripCharacters( localDBNamePtr, KSpecialChar );
-    localDBNamePtr.Append( KStorageExtn() );
-
-    DP_SDA2( "CPresencePluginLocalstore::ConstructL -localDBName: %S" , &localDBNamePtr );
-
-    User::LeaveIfError( iFs.Connect() );
-    if ( DbExists() )
-        {
-        DP_SDA( "CPresencePluginLocalstore::ConstructL -DB exists" );
-        OpenDbL();
-        }
-    else
-        {
-        DP_SDA( "CPresencePluginLocalstore::ConstructL -DB does not exists LEAVE!" );
-        User::Leave( KErrNotReady );
-        }
-
-    User::LeaveIfError( iTable.Open( iDb, KContactTable ) );
-    iColset = iDb.ColSetL( KContactTable );
-
-    DP_SDA( "CPresencePluginLocalstore::ConstructL -End" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::NewL()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginLocalstore* CPresencePluginLocalstore::NewL(
-    const TDesC& aServiceName )
-    {
-    CPresencePluginLocalstore* self =
-        CPresencePluginLocalstore::NewLC( aServiceName );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::NewLC()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginLocalstore* CPresencePluginLocalstore::NewLC(
-    const TDesC& aServiceName )
-    {
-    CPresencePluginLocalstore* self =
-        new( ELeave ) CPresencePluginLocalstore();
-    CleanupStack::PushL( self );
-    self->ConstructL( aServiceName );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::~CPresencePluginLocalstore()
-// ---------------------------------------------------------------------------
-//
-CPresencePluginLocalstore::~CPresencePluginLocalstore()
-    {
-    DP_SDA( "CPresencePluginLocalstore::~CPresencePluginLocalstore -Start" );
-
-    delete iLocalDBName;
-    delete iFileStore;
-    delete iColset;
-
-    iTable.Close();
-    iDb.Close();
-    iFs.Close();
-
-    DP_SDA( "CPresencePluginLocalstore::~CPresencePluginLocalstore -End" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::OpenDbL
-// ---------------------------------------------------------------------------
-//
-void CPresencePluginLocalstore::OpenDbL()
-    {
-    DP_SDA( "CPresencePluginLocalstore::OpenDbL() Start" );
-
-    TBuf< KMaxPath > storagePath;
-    storagePath.Append( KDbPath );
-    storagePath.Append( *iLocalDBName );
-    iFileStore = CPermanentFileStore::OpenL( iFs, storagePath,
-        EFileShareReadersOrWriters|EFileWrite );
-    iFileStore->SetTypeL( iFileStore->Layout() );
-    iDb.OpenL( iFileStore, iFileStore->Root() );
-
-    DP_SDA( "CPresencePluginLocalstore::OpenDbL() End" );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::DbExists
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginLocalstore::DbExists()
-    {
-    DP_SDA( "CPresencePluginLocalstore::DbExists() Start" );
-
-    TBool ret( ETrue );
-    RFile temp;
-    TBuf< KMaxPath > storagePath;
-    storagePath.Append( KDbPath );
-    storagePath.Append( *iLocalDBName );
-
-    TInt err( temp.Open( iFs, *( &storagePath ),
-        EFileShareReadersOrWriters|EFileRead ) );
-    TInt size( 0 );
-
-    if ( KErrNone == err )
-        {
-        temp.Size( size );
-        }
-
-    temp.Close();
-
-    if ( ( 0 == size ) || ( KErrNone != err ) )
-        {
-        ret = EFalse;
-        }
-
-    DP_SDA( "CPresencePluginLocalstore::DbExists() End" );
-    return ret;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresencePluginLocalstore::SeekRowL()
-// ---------------------------------------------------------------------------
-//
-TBool CPresencePluginLocalstore::SeekRowAtContactColL(
-    TInt32& aIdentifier )
-    {
-    DP_SDA( "CPresencePluginLocalstore::SeekRowAtContactColL() Start" );
-
-    TBool ret( EFalse );
-    TDbColNo colNo = iColset->ColNo( KContactId );
-    iTable.BeginningL();
-
-    while ( iTable.NextL() )
-        {
-        DP_SDA( "CPresencePluginLocalstore::SeekRowAtContactColL() - next found" );
-        iTable.GetL();
-        if ( iTable.ColInt32( colNo ) == aIdentifier )
-            {
-            ret = ETrue;
-            break;
-            }
-        }
-
-    DP_SDA2( "CPresencePluginLocalstore::SeekRowAtContactColL() End - ret = %d", ret );
-    return ret;
-    }
--- a/simpleengine/engine/BWINS/simpleengineU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/BWINS/simpleengineU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -13,5 +13,4 @@
 	?NsPrefixL@TSimpleUtils@@SA?AVTPtrC8@@ABVTDesC8@@@Z @ 12 NONAME ; class TPtrC8 TSimpleUtils::NsPrefixL(class TDesC8 const &)
 	?NsUriL@TSimpleUtils@@SA?AVTPtrC8@@ABVTDesC8@@@Z @ 13 NONAME ; class TPtrC8 TSimpleUtils::NsUriL(class TDesC8 const &)
 	?NewInstantMessageL@TSimpleFactory@@SAPAVMSimpleInstantMessage@@AAVMSimpleConnection@@AAVMSimpleInstantMsgObserver@@@Z @ 14 NONAME ; class MSimpleInstantMessage * TSimpleFactory::NewInstantMessageL(class MSimpleConnection &, class MSimpleInstantMsgObserver &)
-	?NewConnectionL@TSimpleFactory@@SAPAVMSimpleConnection@@AAVMSimpleConnectionObserver@@J@Z @ 15 NONAME ; class MSimpleConnection * TSimpleFactory::NewConnectionL(class MSimpleConnectionObserver &, long)
 
--- a/simpleengine/engine/EABI/simpleengineU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/EABI/simpleengineU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -29,5 +29,4 @@
 	_ZN14TSimpleFactory18NewInstantMessageLER17MSimpleConnectionR25MSimpleInstantMsgObserver @ 28 NONAME
 	_ZTI22CSimpleEngineImHandler @ 29 NONAME ; #<TI>#
 	_ZTV22CSimpleEngineImHandler @ 30 NONAME ; #<VT>#
-	_ZN14TSimpleFactory14NewConnectionLER25MSimpleConnectionObserverl @ 31 NONAME
 
--- a/simpleengine/engine/inc/simpleconnection.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/inc/simpleconnection.h	Fri Mar 19 09:37:41 2010 +0200
@@ -53,8 +53,6 @@
      */
     static CSimpleConnection* NewL( MSimpleConnectionObserver& aObserver );
 
-    static CSimpleConnection* NewL( MSimpleConnectionObserver& aObserver, TInt32 aServiceId );
-    
     /**
      * Destructor.
      */
@@ -136,7 +134,7 @@
     /**
      * Two-phase constructor
      */
-    void ConstructL( TInt32 aServiceId );
+    void ConstructL( );
 
     /**
      * constructor
--- a/simpleengine/engine/inc/simpleengineimhandler.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/inc/simpleengineimhandler.h	Fri Mar 19 09:37:41 2010 +0200
@@ -11,10 +11,11 @@
 *
 * Contributors:
 *
-* Description:    SIMPLE Engine IM Handler
+* Description:  SIMPLE Engine IM Handler
 *
 */
 
+
 #ifndef C_SIMPLEENGINEIMHANDLER_H
 #define C_SIMPLEENGINEIMHANDLER_H
 
--- a/simpleengine/engine/src/simpleconnection.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/src/simpleconnection.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -65,7 +65,7 @@
 // CSimpleConnection::ConstructL
 // ----------------------------------------------------------
 //
-void CSimpleConnection::ConstructL( TInt32 aServiceId )
+void CSimpleConnection::ConstructL()
     {
     // Create CSimpleSipConnection entity in simplesiputils.dll
     iConnection = CSimpleSipConnection::NewL();
@@ -79,10 +79,6 @@
     CSimpleEngineRequest* req = CSimpleEngineRequest::NewL(
         *this, MSimpleEngineRequest::EListenEvents, iOpId );
     CleanupStack::PushL( req );
-    if ( aServiceId )
-        {
-        iConnection->SetServiceId( aServiceId );
-        }
     iConnection->DispatchReqL( *req );
     iRequestList.AddLast( *req );
     CleanupStack::Pop( req );
@@ -100,24 +96,7 @@
 #endif
     CSimpleConnection* self = new (ELeave) CSimpleConnection( aObserver );
     CleanupStack::PushL( self );
-    self->ConstructL( NULL );
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CSimpleConnection::NewL
-// ----------------------------------------------------------
-//
-CSimpleConnection* CSimpleConnection::NewL(
-    MSimpleConnectionObserver& aObserver, TInt32 aServiceId )
-    {
-#ifdef _DEBUG
-    TSimpleLogger::Log(_L("SimpleConnection: NewL" ));
-#endif
-    CSimpleConnection* self = new (ELeave) CSimpleConnection( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL( aServiceId );
+    self->ConstructL();
     CleanupStack::Pop( self );
     return self;
     }
--- a/simpleengine/engine/src/simpleengineimhandler.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/src/simpleengineimhandler.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -11,10 +11,11 @@
 *
 * Contributors:
 *
-* Description:    SIMPLE Engine IM Handler
+* Description:  SIMPLE ENGINE IM Handler
 *
 */
 
+
 #include "simpleengineimhandler.h"
 #include "simpleenginerequest.h"
 #include "simpleinstantmsgobserver.h"
--- a/simpleengine/engine/src/simplefactory.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/engine/src/simplefactory.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -47,10 +47,6 @@
 #include "msimplewinfowatcher.h"
 #include "simpleinstantmessage.h"
 
-#ifdef _DEBUG
-#include "simpledebugutils.h"
-#endif
-
 class MSimpleConnectionObserver;
 class MSimplePublishObserver;
 class MSimpleWatcherObserver;
@@ -95,9 +91,6 @@
 EXPORT_C MSimpleConnection* TSimpleFactory::NewConnectionL(
     MSimpleConnectionObserver& aObserver)
     {
-    #ifdef _DEBUG
-    TSimpleLogger::Log(_L("TSimpleFactory::NewConnectionL" ) );
-    #endif
     return CSimpleConnection::NewL( aObserver );
     }
 
@@ -141,11 +134,7 @@
         aContentID, aContentType );    
     }
       
-EXPORT_C MSimpleConnection* TSimpleFactory::NewConnectionL(
-    MSimpleConnectionObserver& aObserver, TInt32 aServiceId )
-    {
-    return CSimpleConnection::NewL( aObserver, aServiceId );
-    }
 
 
 
+
--- a/simpleengine/inc/simplecommon.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/inc/simplecommon.h	Fri Mar 19 09:37:41 2010 +0200
@@ -28,7 +28,6 @@
 const TInt KRangeSize = 100;  // range of operation ids for each client handle
     
 const TUint KSimpleOK = 200;  // return code for SIP
-const TUint KCreatedOK = 201; // return code for SIP
 const TUint KSimpleAccepted = 202;  // return code for SIP
 
 _LIT8 ( KSimpleApplicationType, "application");
--- a/simpleengine/presencedm/src/presencedmadapter.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/presencedm/src/presencedmadapter.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -14,6 +14,9 @@
 * Description:    OMA Presence Settings Device Management Adapter's source file 
 *
 */
+
+
+
  
 #include <implementationproxy.h>
 #include <nsmldmuri.h>
@@ -359,7 +362,6 @@
     TPresSettingsProperty property;
 
     HBufC8* luid = Callback().GetLuidAllocL( aUri );
-    PRES_DM_LOG(LOG_LIT8("   GetLuidAllocL() => '%S'"), luid );
     TInt settingsId = DesToInt( *luid );
     
     PRES_DM_LOG(LOG_LIT("   settingsId after callback:%d"), settingsId);
@@ -368,16 +370,12 @@
     if (!IsPresIDValidL(settingsId))
         {
         //try to find it another way
-        if( NSmlDmURI::NumOfURISegs( aUri ) > 1 )
-            {
-            TPtrC8 idSegment = NSmlDmURI::URISeg( aUri, 2 );
-            settingsId = DesToInt(idSegment);
-            if(!IsPresIDValidL(settingsId))
-                {
-                status = CSmlDmAdapter::ENotFound;
-                }
-            PRES_DM_LOG(LOG_LIT("   settingsId found local way:%d"), settingsId);
-            }
+        TPtrC8 removedLastSeg = NSmlDmURI::RemoveLastSeg(aUri);
+        TPtrC8 idSegment = NSmlDmURI::LastURISeg(removedLastSeg);
+        TInt settingsId = DesToInt(idSegment);
+        if (!IsPresIDValidL(settingsId))
+            status = CSmlDmAdapter::ENotFound;
+        PRES_DM_LOG(LOG_LIT("   settingsId found local way:%d"), settingsId);
         }
     
     // if previous settings id processing was ok
@@ -521,16 +519,12 @@
     if (!IsPresIDValidL(settingsId))
         {
         //try to find it another way
-        if( NSmlDmURI::NumOfURISegs( aUri ) > 1 )
-            {
-            TPtrC8 idSegment = NSmlDmURI::URISeg( aUri, 2 );
-            settingsId = DesToInt(idSegment);
-            if (!IsPresIDValidL(settingsId))
-                {
-                status = CSmlDmAdapter::ENotFound;
-                }
-            PRES_DM_LOG(LOG_LIT("   settingsId found local way:%d"), settingsId);
-            }
+        TPtrC8 removedLastSeg = NSmlDmURI::RemoveLastSeg(aUri);
+        TPtrC8 idSegment = NSmlDmURI::LastURISeg(removedLastSeg);
+        TInt settingsId = DesToInt(idSegment);
+        if (!IsPresIDValidL(settingsId))
+            status = CSmlDmAdapter::ENotFound; 
+        PRES_DM_LOG(LOG_LIT("   settingsId found local way:%d"), settingsId);
         }
     
     // if previous settings id processing was ok
@@ -728,7 +722,6 @@
                                          const TInt aStatusRef )
     {
     // Not supported 
-    PRES_DM_LOG(LOG_LIT("ExecuteCommandL"));    
     Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
     }
 
@@ -743,7 +736,6 @@
                                          const TInt aStatusRef )
     {
     // Not supported
-    PRES_DM_LOG(LOG_LIT("ExecuteCommandL"));
     Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
     }
 
@@ -759,7 +751,6 @@
                                       TInt aStatusRef )
     {
     // Not supported
-    PRES_DM_LOG(LOG_LIT("CopyCommandL"));    
     Callback().SetStatusL( aStatusRef, CSmlDmAdapter::EError );
     }
 
@@ -769,7 +760,6 @@
 //
 void CPresenceDMAdapter::StartAtomicL()
     {
-    PRES_DM_LOG(LOG_LIT("StartAtomicL"));
     // Not supported
     }
 
@@ -779,7 +769,6 @@
 //
 void CPresenceDMAdapter::CommitAtomicL()
     {
-    PRES_DM_LOG(LOG_LIT("CommitAtomicL"));
     // Not supported
     }
 
@@ -789,7 +778,6 @@
 //
 void CPresenceDMAdapter::RollbackAtomicL()
     {
-    PRES_DM_LOG(LOG_LIT("RollbackAtomicL"));
     // Not supported
     }
 
@@ -799,7 +787,6 @@
 //
 TBool CPresenceDMAdapter::StreamingSupport( TInt& /*aItemSize*/ )
     {
-    PRES_DM_LOG(LOG_LIT("StreamingSupport"));    
     return EFalse;
     }
 
@@ -809,7 +796,6 @@
 //
 void CPresenceDMAdapter::StreamCommittedL()
     {
-    PRES_DM_LOG(LOG_LIT("StreamCommittedL"));    
     // Not supported
     }
     
@@ -891,10 +877,10 @@
         aObject.InsertL( 0, *utfValue );
         CleanupStack::PopAndDestroy(utfValue);  // >>> utfValue
         CleanupStack::PopAndDestroy(value);  // >>> value
-        PRES_DM_LOG(LOG_LIT(" return( EOk )"));  
+        PRES_DM_LOG(LOG_LIT(" return(%d)"),CSmlDmAdapter::EOk);  
         return CSmlDmAdapter::EOk;
         }
-    PRES_DM_LOG(LOG_LIT(" return( ENotFound )"));      
+    PRES_DM_LOG(LOG_LIT(" return(%d)"),CSmlDmAdapter::ENotFound);      
     return CSmlDmAdapter::ENotFound;
     }
     
@@ -1070,7 +1056,7 @@
 CSmlDmAdapter::TError CPresenceDMAdapter::GetConRefFromSipIDL( TInt aSipID,
                                                       CBufBase& aObject)
     {
-    PRES_DM_LOG(LOG_LIT(" GetConRefFromSipIDL(aSipId:%d)"),aSipID);
+    PRES_DM_LOG(LOG_LIT(" GetConRefFromSipIDL(%d)"),aSipID);
 
     CSmlDmAdapter::TError status = CSmlDmAdapter::EOk;
     
@@ -1083,14 +1069,12 @@
         
         // Request all the sip settings identifiers 
         Callback().FetchLinkL( KPresDMSipDMNode, *result, status);
-        PRES_DM_LOG(LOG_LIT("   FetchLinkL(SIP) status : %d"), status );
         
         if( status == EOk )
             {
             TPtr8 uriSeg8Ptr = result->Ptr(0);
             
-            HBufC8* uriSegBuffer = uriSeg8Ptr.AllocLC(); // << uriSegBuffer
-            PRES_DM_LOG(LOG_LIT8("   uri : '%S'"), uriSegBuffer );
+            HBufC8* uriSegBuffer = uriSeg8Ptr.AllocLC();
             
             TPtr8 uriSegBufferPtr = uriSegBuffer->Des();
             
@@ -1103,7 +1087,7 @@
                      
             // Check if given SIP set id match with any of found
             // SIP settings identifiers
-            while( numOfUriSegs > 0 )
+            while( numOfUriSegs > 1)
                 {
                 idLinkBuffer = NSmlDmURI::LastURISeg(uriSegBufferPtr);
                 uriSegBufferPtr = NSmlDmURI::RemoveLastSeg(uriSegBufferPtr);
@@ -1118,20 +1102,17 @@
                 //Reqest the ID
                 result->Reset();
                 Callback().FetchLinkL( finalLink, *result, status);
-                PRES_DM_LOG(LOG_LIT8("   FetchLinkL(%S) status : %d"), &idLinkBuffer, status );                        
-                if( status == EOk )
+                        
+                foundId = DesToInt(result->Ptr(0));
+                        
+                if (foundId == aSipID)
                     {
-                    foundId = DesToInt(result->Ptr(0));
-                    PRES_DM_LOG(LOG_LIT("   foundId : %d"), foundId );                        
-                    if (foundId == aSipID)
-                        {
-                        found = ETrue;
-                        aObject.InsertL(0, NSmlDmURI::RemoveLastSeg(finalLink));
+                    found = ETrue;
+                    aObject.InsertL(0, NSmlDmURI::RemoveLastSeg(finalLink));
                         break;
                         }
-                    }
                 
-                numOfUriSegs--;  
+                numOfUriSegs -= 1;  
                 }
             CleanupStack::PopAndDestroy( uriSegBuffer );    // >>> uriSegBuffer
             }
@@ -1156,7 +1137,7 @@
 CSmlDmAdapter::TError CPresenceDMAdapter::GetConRefFromXdmIDL( TInt aXdmID,
                                                       CBufBase& aObject)
     {
-    PRES_DM_LOG(LOG_LIT(" GetConRefFromXdmIDL(aXdmId:%d)"),aXdmID);
+    PRES_DM_LOG(LOG_LIT(" GetConRefFromXdmIDL(%d)"),aXdmID);
 
     CSmlDmAdapter::TError status = CSmlDmAdapter::ENotFound;
     
@@ -1167,7 +1148,6 @@
         
         // Request all the XDM settings identifiers 
         Callback().FetchLinkL( KPresDMXdmDMNode, *result, status);
-        PRES_DM_LOG(LOG_LIT("   FetchLinkL(XDM) status : %d"), status );
         TInt id(KErrNotFound);
         
         TPtrC8 lastUriSegXdm;
@@ -1231,7 +1211,6 @@
     TPresSettingsSet tempSet;
     if ((PresSettingsApi::SettingsSetL(aSetId,tempSet)) == KErrNone)
         return ETrue;
-    PRES_DM_LOG(LOG_LIT8(" IsPresIDValidL - Invalid settings : %d"), aSetId );
     return EFalse;   
     }
     
@@ -1269,7 +1248,8 @@
         
     if( status == EOk )
         {
-        TUint32 id = DesToInt( result->Ptr( 0 ) );
+        TUint32 id(NULL);
+        id = DesToInt( result->Ptr( 0 ) );
         returnId = (TInt)id;       
         }
     CleanupStack::PopAndDestroy( result );   // >>> result   
--- a/simpleengine/siputils/BWINS/simplesiputilsU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/BWINS/simplesiputilsU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -5,5 +5,5 @@
 	?NewL@CSimpleSipConnection@@SAPAV1@XZ @ 4 NONAME ; class CSimpleSipConnection * CSimpleSipConnection::NewL(void)
 	?SIPState@CSimpleSipConnection@@QAE?AW4TSimpleSipState@@XZ @ 5 NONAME ; enum TSimpleSipState CSimpleSipConnection::SIPState(void)
 	?SIPStatus@CSimpleSipConnection@@QAEIHAAH@Z @ 6 NONAME ; unsigned int CSimpleSipConnection::SIPStatus(int, int &)
-	?SetServiceId@CSimpleSipConnection@@QAEXJ@Z @ 7 NONAME ; void CSimpleSipConnection::SetServiceId(long)
-	?SipSubscriptionState@CSimpleSipConnection@@QAE?AW4TSimpleSipSubscriptionState@MSimpleEngineRequest@@AAV3@@Z @ 8 NONAME ; enum MSimpleEngineRequest::TSimpleSipSubscriptionState CSimpleSipConnection::SipSubscriptionState(class MSimpleEngineRequest &)
+	?SipSubscriptionState@CSimpleSipConnection@@QAE?AW4TSimpleSipSubscriptionState@MSimpleEngineRequest@@AAV3@@Z @ 7 NONAME ; enum MSimpleEngineRequest::TSimpleSipSubscriptionState CSimpleSipConnection::SipSubscriptionState(class MSimpleEngineRequest &)
+
--- a/simpleengine/siputils/EABI/simplesiputilsU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/EABI/simplesiputilsU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -1,28 +1,25 @@
 EXPORTS
 	_ZN20CSimpleSipConnection12DispatchReqLER20MSimpleEngineRequest @ 1 NONAME
-	_ZN20CSimpleSipConnection12SetServiceIdEl @ 2 NONAME
-	_ZN20CSimpleSipConnection19CurrentSIPIdentityLEv @ 3 NONAME
-	_ZN20CSimpleSipConnection20SipSubscriptionStateER20MSimpleEngineRequest @ 4 NONAME
-	_ZN20CSimpleSipConnection4NewLEv @ 5 NONAME
-	_ZN20CSimpleSipConnection8SIPStateEv @ 6 NONAME
-	_ZN20CSimpleSipConnection9SIPStatusEiRi @ 7 NONAME
-	_ZN20CSimpleSipConnectionD0Ev @ 8 NONAME
-	_ZN20CSimpleSipConnectionD1Ev @ 9 NONAME
-	_ZN20CSimpleSipConnectionD2Ev @ 10 NONAME
-	_ZTI14CSimpleRequest @ 11 NONAME ; #<TI>#
-	_ZTI18CSimpleExpiryTimer @ 12 NONAME ; #<TI>#
-	_ZTI18CSimpleSettingFile @ 13 NONAME ; #<TI>#
-	_ZTI19CSimpleRefreshTimer @ 14 NONAME ; #<TI>#
-	_ZTI20CSimpleSipConnection @ 15 NONAME ; #<TI>#
-	_ZTI25CSimpleSipProfileObserver @ 16 NONAME ; #<TI>#
-	_ZTI28CSimpleSipConnectionObserver @ 17 NONAME ; #<TI>#
-	_ZTV14CSimpleRequest @ 18 NONAME ; #<VT>#
-	_ZTV18CSimpleExpiryTimer @ 19 NONAME ; #<VT>#
-	_ZTV18CSimpleSettingFile @ 20 NONAME ; #<VT>#
-	_ZTV19CSimpleRefreshTimer @ 21 NONAME ; #<VT>#
-	_ZTV20CSimpleSipConnection @ 22 NONAME ; #<VT>#
-	_ZTV25CSimpleSipProfileObserver @ 23 NONAME ; #<VT>#
-	_ZTV28CSimpleSipConnectionObserver @ 24 NONAME ; #<VT>#
+	_ZN20CSimpleSipConnection19CurrentSIPIdentityLEv @ 2 NONAME
+	_ZN20CSimpleSipConnection4NewLEv @ 3 NONAME
+	_ZN20CSimpleSipConnection8SIPStateEv @ 4 NONAME
+	_ZN20CSimpleSipConnection9SIPStatusEiRi @ 5 NONAME
+	_ZN20CSimpleSipConnectionD0Ev @ 6 NONAME
+	_ZN20CSimpleSipConnectionD1Ev @ 7 NONAME
+	_ZN20CSimpleSipConnectionD2Ev @ 8 NONAME
+	_ZTI14CSimpleRequest @ 9 NONAME ; #<TI>#
+	_ZTI18CSimpleExpiryTimer @ 10 NONAME ; #<TI>#
+	_ZTI18CSimpleSettingFile @ 11 NONAME ; #<TI>#
+	_ZTI19CSimpleRefreshTimer @ 12 NONAME ; #<TI>#
+	_ZTI20CSimpleSipConnection @ 13 NONAME ; #<TI>#
+	_ZTI25CSimpleSipProfileObserver @ 14 NONAME ; #<TI>#
+	_ZTI28CSimpleSipConnectionObserver @ 15 NONAME ; #<TI>#
+	_ZTV14CSimpleRequest @ 16 NONAME ; #<VT>#
+	_ZTV18CSimpleExpiryTimer @ 17 NONAME ; #<VT>#
+	_ZTV18CSimpleSettingFile @ 18 NONAME ; #<VT>#
+	_ZTV19CSimpleRefreshTimer @ 19 NONAME ; #<VT>#
+	_ZTV20CSimpleSipConnection @ 20 NONAME ; #<VT>#
+	_ZTV25CSimpleSipProfileObserver @ 21 NONAME ; #<VT>#
+	_ZTV28CSimpleSipConnectionObserver @ 22 NONAME ; #<VT>#
+	_ZN20CSimpleSipConnection20SipSubscriptionStateER20MSimpleEngineRequest @ 23 NONAME
 
-
-
--- a/simpleengine/siputils/group/simplesiputils.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/group/simplesiputils.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -42,7 +42,7 @@
 USERINCLUDE                     ../../inc
 
 // default system include paths for middleware layer modules
-APP_LAYER_SYSTEMINCLUDE
+MW_LAYER_SYSTEMINCLUDE
 
 DEBUGLIBRARY                    flogger.lib
 DEBUGLIBRARY                    efsrv.lib   // file server
@@ -56,5 +56,3 @@
 LIBRARY                         bafl.lib  // string pool
 LIBRARY                         centralrepository.lib
 LIBRARY                         presencesettingsapi.lib
-// access to uiservicetabsettings
-LIBRARY         				vimpstsettings.lib
--- a/simpleengine/siputils/inc/simplesipconncallback.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/inc/simplesipconncallback.h	Fri Mar 19 09:37:41 2010 +0200
@@ -53,13 +53,6 @@
      */
     virtual void ConnectionStateChange( 
         TSimpleSipState aState, TInt aSipError) = 0;
-    
-    /**
-     * Connection method has changed (Roaming). 
-     * 
-     * @since S60 3.2.3
-     */
-    virtual void ConnectionChanged() = 0;
 
     /**
      * Time to refresh a request
--- a/simpleengine/siputils/inc/simplesipconnection.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/inc/simplesipconnection.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -120,12 +120,6 @@
         MSimpleEngineRequest& aReq );	   
     
     /**
-     * Set service id
-     * @param aServiceId new service id 
-     */
-    IMPORT_C void SetServiceId( TInt32 aServiceId );
-    
-    /**
      * Search the corresponding client request
      *
      * @since S60 v3.2      
@@ -247,13 +241,6 @@
      */
     TInt HandleReceivedMessage( const TDesC8& aFrom,
         const TDesC8& aContent );
-    
-    /**
-     * Connection method has changed (Roaming). 
-     * 
-     * @since S60 3.2.3
-     */
-    void ConnectionChanged();  
 
 protected:
 
@@ -373,15 +360,7 @@
      * @since S60 v3.2       
      */
     void DeleteRequests();
-    
-    /**
-     * Delete all pending specified type of requests.
-     *
-     * @since S60 5.0 
-     * @param aRequestType request type
-     */
-    void DeleteRequests( CSimpleRequest::TSimpleSipReqType aRequestType );
-    
+
     /**
      * Destroy the request
      *
@@ -580,13 +559,6 @@
      */
     void DoHandleReceivedMessageL( const TDesC8& aFrom,
         const TDesC8& aContent, CSimpleRequest& aRequest );
-    
-    /**
-     * Stores ETag to vimpstsettingstore
-     *
-     * @since S60 5.0       
-     */
-    void StoreETagL( HBufC8& aTag );
 
 private:    // Data
 
@@ -639,11 +611,6 @@
      * Current number of subscriptions
      */
     TUint iCurrentNbrSubs;
-    
-    /**
-     * Service id of current service
-     */
-    TInt32 iServiceId;
 
 #ifdef _DEBUG
     friend class T_CSimpleSipConnection;
--- a/simpleengine/siputils/inc/simplesipconnectionobserver.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/inc/simplesipconnectionobserver.h	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -85,15 +85,7 @@
      * @param aSipError SIP error code
      */
     void ProfileStateChanged( 
-        CSIPConnection::TState aState, TInt aSipError );   
-    
-    /**
-     * SIP Profile has updated. 
-     * 
-     * @see MSIPProfileRegistryObserver::EProfileUpdated
-     * @since S60 3.2.3
-     */
-    void ProfileUpdated();
+        CSIPConnection::TState aState, TInt aSipError );             
 
 // from base class MSIPConnectionObserver
 
@@ -120,6 +112,7 @@
     /**
      * A SIP response received from the network.
      * @param aTransaction contains response elements.
+     * The ownership is transferred.
      */
     void IncomingResponse( CSIPClientTransaction& aTransaction );
 
@@ -288,6 +281,7 @@
     /**
      * A SIP response received from the network.
      * @param aTransaction contains response elements.
+     * The ownership is transferred.
      */
     void DoIncomingResponse( CSIPClientTransaction& aTransaction );
     
--- a/simpleengine/siputils/src/simpledebugutils.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/src/simpledebugutils.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -57,9 +57,6 @@
     _LIT(KLogFile, "simple.txt");
     // Write to log file
     RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, buf);
-    
-    _LIT( KSimplePrefix,  "[simple] ");    
-    buf.Insert( 0, KSimplePrefix );
     RDebug::RawPrint( buf );
 
     }
--- a/simpleengine/siputils/src/simplesettings.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/src/simplesettings.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -127,8 +127,8 @@
     TRAP_IGNORE( repository = CRepository::NewL( KCRUIDSimpleVariation ));
     if ( repository )
         {
-        //TRAP_IGNORE( iExpiryPuhlish = GetCenRepIntValueL(
-        //    repository, KSimplePublishRefresh ));
+        TRAP_IGNORE( iExpiryPuhlish = GetCenRepIntValueL(
+            repository, KSimplePublishRefresh ));
         TRAP_IGNORE( iExpiryWatcher = GetCenRepIntValueL(
             repository, KSimpleSubscribeRefresh ));
         TRAP_IGNORE( iExpiryWinfo = GetCenRepIntValueL(
--- a/simpleengine/siputils/src/simplesipconnection.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/src/simplesipconnection.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -36,7 +36,6 @@
 #include <siprefresh.h>
 #include <sipmessageelements.h>
 #include <sipsubscribedialogassoc.h>
-#include <sipregistrationcontext.h>
 
 // sip codec api
 #include <sipfromheader.h>
@@ -52,8 +51,6 @@
 #include <sipsupportedheader.h>
 #include <sipacceptheader.h>
 
-#include <cvimpstsettingsstore.h>
-
 // own simple
 #include "simplesipconnection.h"
 #include "simplesipconnectionobserver.h"
@@ -83,6 +80,10 @@
 _LIT8 ( KSimpleNoresource, "Noresource" );
 _LIT8 ( KSipPrefix, "sip:" );
 
+// UID given for CSIP class. SIP Utils listens to new SIP requests 
+// (when receiving IM) outside SIP dialogs.
+const TUid KSimpleSIPUtilsUID = { 0x10281EEC };
+
 // ================= MEMBER FUNCTIONS =======================
 //
 
@@ -113,7 +114,6 @@
     delete iConnectionObserver;
     delete iSip;
     DeleteRequests();
-    DeleteRequests( CSimpleRequest::EReqReceiveIM );
     SIPStrings::Close();
     }
 
@@ -140,8 +140,11 @@
     TSimpleLogger::Log(
         _L("SipConnection: ConstructL 20-01-07 this=%d" ), (TInt)this );
 #endif
-    
+    // initialize members
+    iSip = CSIP::NewL( KSimpleSIPUtilsUID, *this );
     iConnectionObserver = CSimpleSipConnectionObserver::NewL( *this);
+    iProfileObserver = 
+        CSimpleSipProfileObserver::NewL( iSip, *iConnectionObserver);
     SIPStrings::OpenL();
     // read static cenrep settings
     iSettings.ReadCentRepSettings();
@@ -442,27 +445,42 @@
         temp->Des().Copy( KSipPrefix() );
         temp->Des().Append( aReq.Recipient() );
         User::LeaveIfError( parser.Parse( *temp ));
-        CUri8* uri = CUri8::NewL( parser );
+        CUri8* uri = CUri8::NewLC( parser );  // CS: 3
         
         // Start to fill header, Remote URI
         CSIPRequestElements* elems = CSIPRequestElements::NewL( uri );
+        CleanupStack::Pop( uri ); // ownership given to elems  // CS: 2
         CleanupStack::PushL( elems );  // CS: 3
-        
+
         TUriParser8 parser3;
         User::LeaveIfError( parser3.Parse( iProfileObserver->
             GiveUserAorL() ));
-        uri = CUri8::NewL( parser3 );
+        uri = CUri8::NewLC( parser3 );  // CS: 4
+        
         CSIPAddress* sipAddress = CSIPAddress::NewL( uri );
+        CleanupStack::Pop( uri ); // ownership given to sipAddress  // CS: 3
+        CleanupStack::PushL( sipAddress );  // CS: 4
         
         // From Header
         CSIPFromHeader* fromH = CSIPFromHeader::NewL( sipAddress );
-        elems->SetFromHeaderL( fromH ); // fromH, ownership given to elems
+        CleanupStack::Pop( sipAddress ); // ownership given to FromH  // CS: 3
+        CleanupStack::PushL( fromH );  // CS: 4
+        elems->SetFromHeaderL( fromH );
+        // fromH, ownership given to elems
+        CleanupStack::Pop( fromH );  // CS: 3
         
-        uri = CUri8::NewL( parser );
+        uri = CUri8::NewLC( parser );  // CS: 4
+        
         CSIPAddress* addr = CSIPAddress::NewL( uri );
+        CleanupStack::Pop( uri );  // CS: 3
+        CleanupStack::PushL( addr );  // CS: 4
+        
         // To Header
         CSIPToHeader* toHeader = CSIPToHeader::NewL( addr );
+        CleanupStack::Pop( addr );  // CS: 3
+        CleanupStack::PushL( toHeader );  // CS: 4   
         elems->SetToHeaderL( toHeader );
+        CleanupStack::Pop( toHeader );  // CS: 3
         
         CSIPMessageElements& mesElems = elems->MessageElements();
         
@@ -480,30 +498,29 @@
             
             mesElems.SetUserHeadersL( headers );
             // headers ownership given to mesElems
-            CleanupStack::Pop( &headers ); // CS: 3
+            CleanupStack::Pop( &headers ); // CS: 3            
             }
         
         // Set content type and content
-        HBufC8* buffer = aContent.AllocLC(); // CS: 4
-        CSIPContentTypeHeader* contTypeH = CSIPContentTypeHeader::NewL(
-            KSimpleMediaType, KSimpleMediaSubType );
-        CleanupStack::Pop( buffer ); // CS: 3
+        CSIPContentTypeHeader* contTypeH = CSIPContentTypeHeader::NewLC(
+            KSimpleMediaType, KSimpleMediaSubType );  // CS: 4
+        HBufC8* buffer = aContent.AllocLC();  // CS: 5
         mesElems.SetContentL( buffer, contTypeH );
         // buffer ownership given to mesElems
+        CleanupStack::Pop( buffer );  // CS: 4
         // contTypeH ownership given to mesElems
+        CleanupStack::Pop( contTypeH );  // CS: 3
         
         // Set method
         elems->SetMethodL( SIPStrings::StringF( SipStrConsts::EMessage ) );
         
-        CleanupStack::Pop( elems ); // CS: 2
         // Send the request transaction
-        // elems, ownership given
         CSIPClientTransaction* sipTrans = iSipConnection->SendRequestL( elems,
             *regContext );
         
         // Save SIP client transaction
         request->SetTransaction( sipTrans );
-        
+        CleanupStack::Pop( elems ); // elems, ownership given  // CS: 2
         CleanupStack::PopAndDestroy( temp ); // CS: 1
         
         // Start refresh timer, it's used for garbage collection too.
@@ -1075,15 +1092,6 @@
             KSimpleMultiType, KSimpleMultipartSubType );
         User::LeaveIfError( headers.Append( acceH ));
         ++popCount;
-
-        // add supported header with value eventlist
-        RPointerArray<CSIPSupportedHeader> suppHs =
-            CSIPSupportedHeader::DecodeL( KSimpleEventlist);
-        for( TInt count=0; count < suppHs.Count(); count++ )
-            {
-            User::LeaveIfError( headers.Append( suppHs[count] ));
-            }
-        suppHs.Close();
         }
     if ( r->Match( CSimpleRequest::EReqSubscribeWinfo ))
         {
@@ -1263,49 +1271,6 @@
     }
 
 // ----------------------------------------------------------
-// CSimpleSipConnection::ConnectionChanged
-// ----------------------------------------------------------
-//
-void CSimpleSipConnection::ConnectionChanged() 
-    {
-#ifdef _DEBUG
-    TSimpleLogger::Log(_L("SipConnection: ConnectionChanged"));
-    if( iSipConnection )
-        {
-        TSimpleLogger::Log(_L("SipConnection: ConnectionChanged : old conn state %d (internal:%d)"), iSipConnection->State(), iSipState );
-        TSimpleLogger::Log(_L("SipConnection: ConnectionChanged : old IAP %d"),  iSipConnection->IapId() );
-        }
-#endif
-
-    iCurrentNbrSubs = 0;
-    CSIPConnection* conn = NULL;
-    TRAPD( err, conn = iProfileObserver->GiveConnectionL() );
-    if( !err )
-        {
-        delete iSipConnection;
-        iSipConnection = conn;
-#ifdef _DEBUG
-        TSimpleLogger::Log(_L("SipConnection: ConnectionChanged : new conn state %d"), iSipConnection->State() );
-        TSimpleLogger::Log(_L("SipConnection: ConnectionChanged : new IAP %d"),  iSipConnection->IapId() );
-#endif
-        }
-#ifdef _DEBUG
-    else
-        {
-        TSimpleLogger::Log(_L("SipConnection: ConnectionChanged : Get SIP connection error %d"), err );        
-        }
-#endif
-    
-    if( iSipConnection )
-        {
-        if( iSipState != iSipConnection->State() )
-            {
-            iConnectionObserver->ConnectionStateChanged( iSipConnection->State() );
-            }
-        }
-    }
-
-// ----------------------------------------------------------
 // CSimpleSipConnection::StartToCheckExpiryL
 // ----------------------------------------------------------
 //
@@ -1406,40 +1371,7 @@
         {
         CSimpleRequest* req = rIter;
         rIter++; //lint !e1757
-        
-        // open request EReqReceiveIM should not be deleted
-        // will be deleted only when im message received
-        // or destructor is called.
-        if ( !req->Match( CSimpleRequest::EReqReceiveIM ) )
-            {
-            req->Destroy();
-            }
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// CSimpleSipConnection::DeleteRequests
-// -----------------------------------------------------------------------------
-void CSimpleSipConnection::DeleteRequests( 
-    CSimpleRequest::TSimpleSipReqType aRequestType )
-    {
-#ifdef _DEBUG
-    TSimpleLogger::Log(_L("SipConnection: DeleteRequests type=%d" ),
-        aRequestType );
-#endif
-    // Delete buffered transaction requests match to the aRequestType
-    TDblQueIter<CSimpleRequest> rIter( iRequestList );
-    rIter.SetToFirst();
-
-    while ( rIter )
-        {
-        CSimpleRequest* req = rIter;
-        rIter++; //lint !e1757
-        
-        if ( req->Match( aRequestType ) )
-            {
-            req->Destroy();
-            }
+        req->Destroy();
         }
     }
 
@@ -1746,8 +1678,6 @@
             HBufC8* hValue = header->ToTextValueL();
             // hValue ownership is transferred
             aReq->SetETag( hValue );
-            // store etag to vimpstsettingstore
-            StoreETagL( *hValue );
             ETagReceived = ETrue;
             }
         else if ( header->Name() == SIPStrings::StringF( SipStrConsts::EExpiresHeader))
@@ -1767,12 +1697,6 @@
         {
         // Remove old ETag if nore received or if the expires header was 0 in our request.
         aReq->SetETag( NULL );
-        //TPtrC8 nullETag = nullETag.Alloc( KNullDesC8 ); 
-        TBufC8<1> nullETag( KNullDesC8 );
-        HBufC8* buf;
-        buf = nullETag.Alloc();
-        StoreETagL( *buf );
-        delete buf;
         }
     // PopAndDestroy calls extensionName.Close()
     CleanupStack::PopAndDestroy( &extensionName );
@@ -2148,19 +2072,7 @@
 #endif
 
     iSettings.ReadOTASettingsL( aReq.Aux() );
-    
-    TInt32 uniqueId = iSettings.SipProfileId();
-    TUid uniqueUid;
-    uniqueUid.iUid = uniqueId;
-        
-    if ( !iSip && !iProfileObserver )
-        {        
-        iSip = CSIP::NewL( uniqueUid, *this );
-        
-        iProfileObserver = CSimpleSipProfileObserver::NewL( 
-            iSip, *iConnectionObserver);        
-        }
-    
+
     iProfileObserver->RegisterGivenProfileL( iSettings.SipProfileId() );
     SetSipState( ESimpleSipIdle );
     TRAPD( err, iSipConnection = iProfileObserver->GiveConnectionL() );
@@ -2667,36 +2579,3 @@
 #endif
     }
 
-// -----------------------------------------------------------------------------
-// CSimpleRequest::SetServiceId
-// -----------------------------------------------------------------------------
-EXPORT_C void CSimpleSipConnection::SetServiceId( TInt32 aServiceId )
-    {
-#ifdef _DEBUG
-    TSimpleLogger::Log( _L(
-               "CSimpleSipConnection::SetServiceId old serviceId = %d, new serviceId = %d" ),
-                   iServiceId, aServiceId );
-#endif
-    iServiceId = aServiceId;
-    }
-
-// -----------------------------------------------------------------------------
-// CSimpleRequest::StoreETag
-// -----------------------------------------------------------------------------
-void CSimpleSipConnection::StoreETagL( HBufC8& aETag )
-    {
-#ifdef _DEBUG
-    TBuf<255> printDocumentId;
-        printDocumentId.Copy( aETag );
-    TSimpleLogger::Log(_L("CSimpleSipConnection: StoreETag ETag = %S, serviceId = %d" ),
-        &printDocumentId, iServiceId );
-#endif
-    MVIMPSTSettingsStore* settings = CVIMPSTSettingsStore::NewLC();
-    
-    // Store ETag to uiservicetabsettings
-    User::LeaveIfError( settings->SetL( 
-        iServiceId, EServicePresenceSessionIdentifier, aETag ) );
-    
-    CleanupStack::PopAndDestroy(); //settings   
-    }
-
--- a/simpleengine/siputils/src/simplesipconnectionobserver.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/src/simplesipconnectionobserver.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -160,18 +160,6 @@
     }     
     
 // -----------------------------------------------------------------------------
-// CSimpleSipConnectionObserver::ProfileUpdated
-// -----------------------------------------------------------------------------
-//
-void CSimpleSipConnectionObserver::ProfileUpdated()
-    {
-#ifdef _DEBUG
-    TSimpleLogger::Log(_L("SipConnectionObserver: ProfileUpdated"));
-#endif
-    iCallback.ConnectionChanged();
-    }
-
-// -----------------------------------------------------------------------------
 // CSimpleSipConnectionObserver::ConnectionStateChanged2
 // -----------------------------------------------------------------------------
 //
@@ -580,15 +568,13 @@
             Extract( EUriUserinfo );
         const TDesC8& host = fromHeader->SIPAddress().Uri8().Uri().
             Extract( EUriHost );
-        
-        CleanupStack::PushL( aTransaction ); // CS: 1
-        
         HBufC8* from = HBufC8::NewLC( user.Length() + KAt().Length() +
             host.Length() ); // CS: 1
         from->Des().Copy( user );
         from->Des().Append( KAt() );
         from->Des().Append( host );
         
+        CleanupStack::PushL( aTransaction ); // CS: 2
         CSIPResponseElements* respElem = CSIPResponseElements::NewLC( // CS: 3
             KSimpleOK, SIPStrings::StringF( SipStrConsts::EPhraseOk ) );
         
@@ -596,10 +582,10 @@
         aTransaction->SendResponseL( respElem );
         
         CleanupStack::Pop( respElem );     // CS: 2
-
+        CleanupStack::Pop( aTransaction ); // CS: 1
+        
         iCallback.HandleReceivedMessage( *from, content );
-        CleanupStack::PopAndDestroy( from ); // CS: 1
-        CleanupStack::Pop( aTransaction ); // CS: 0
+        CleanupStack::PopAndDestroy( from ); // CS: 0
         }
     
     // We no longer need aTransaction. Just delete it.
--- a/simpleengine/siputils/src/simplesipprofileobserver.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/simpleengine/siputils/src/simplesipprofileobserver.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -272,14 +272,7 @@
         }     
     else if ( aEvent == EProfileUpdated )
         {
-#ifdef _DEBUG
-        TSimpleLogger::Log(_L("SipProfileObserver: EProfileUpdated - ProfileEnabled : %d" ), iRegistry->IsEnabled( *iProfile ) );
-        TSimpleLogger::Log(_L("SipProfileObserver: EProfileUpdated - Profile reg er : %d" ), iRegistry->LastRegistrationError( *iProfile ) );
-        TSimpleLogger::Log(_L("SipProfileObserver: EProfileUpdated - IsContextActive : %d" ), iProfile->IsContextActive() );
-#endif
-
-        // Notify observer to refresh SIP connection.
-        iObs.ProfileUpdated();
+        iObs.ProfileStateChanged( CSIPConnection::EUnavailable, KErrNone );
         }           
     else if ( aEvent == EProfileDestroyed )
         {      
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd	Fri Mar 19 09:37:41 2010 +0200
@@ -0,0 +1,88 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+  name CDATA #REQUIRED
+  schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+  name CDATA #REQUIRED
+  levels CDATA #IMPLIED
+  span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+  name CDATA #REQUIRED
+  level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+  unitID ID #REQUIRED
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  bldFile CDATA #REQUIRED
+  priority CDATA #IMPLIED
+  contract CDATA #IMPLIED
+  proFile CDATA #IMPLIED
+  qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+  name CDATA #REQUIRED
+  mrp CDATA #REQUIRED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+  name CDATA #REQUIRED
+  version CDATA #REQUIRED
+  late (Y|N) #IMPLIED
+  filter CDATA #IMPLIED
+  contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+  name ID #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+  name ID #REQUIRED
+  abldTarget CDATA #REQUIRED
+  description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+  name ID #REQUIRED
+  abldOption CDATA #REQUIRED
+  description CDATA #REQUIRED
+  enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+  name ID #REQUIRED
+  description CDATA #REQUIRED
+  filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+  command CDATA #REQUIRED
+  targetList IDREFS #IMPLIED
+  unitParallel (Y | N | y | n) #REQUIRED
+  targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+  name CDATA #REQUIRED
+  cwd CDATA #REQUIRED
+  command CDATA #REQUIRED>  
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/XcapC4/inc/XcapC4.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  CXcapC4
-*
-*/
-
-#ifndef __XCAPRESCONTENT__
-#define __XCAPRESCONTENT__
-
-#include "XcapAppUsage.h"
-
-// CONSTANTS
-#define KC4SettingsCenRepUID     0x20021391
-
-
-// CLASS DECLARATION
-class CXcapC4 : public CXcapAppUsage
-    {
-    public:
-        
-        /**
-        * Symbian OS constructor
-        * @param TXcapAppUsageParams Parameters
-        * @return CXcapC4*
-        */
-        static CXcapC4* NewL( const TXcapAppUsageParams& aParameters );
-        
-        /**
-        * Destructor
-        */
-        virtual ~CXcapC4();
-        
-    public:  // From CXcapAppUsage
-    
-        /**
-        * AUID for this usage
-        * @return AUID
-        */
-        TPtrC8 AUID() const;
-        
-        /**
-        * MIME type for this usage
-        * @return MIME type
-        */
-        TPtrC8 ContentType() const;
-
-        /**
-        * Default namespace for this usage
-        * @return Default namespace definition
-        */
-        TPtrC8 DefaultNamespace() const;
-                        
-        /**
-        * Validate the node in the parameter
-        * Leaves with system wide error codes or
-        * with error defined in XdmErrors.h
-        * @param CXdmDocumentNode& reference to the node
-        * @return ETrue, if the node belongs to the appusage's namespace
-        */
-        TBool ValidateNodeL( CXdmDocumentNode& aXdmNode );
-                        
-        /**
-        * Validate the attribute in the parameter
-        * Leaves with system wide error codes or
-        * with error defined in XdmErrors.h
-        * @param CXdmNodeAttribute& reference to the attribute
-        */
-        void ValidateAttributeL( const CXdmNodeAttribute& aXdmNodeAttr );
-        
-        /**
-        * Add namespaces and namespace prefixes used in document
-        * @param CXdmDocument& reference to the document        
-        */        
-        void AddNamespaceInformationL( CXdmDocument& aXdmDocument );
-
-    private:
-        
-        /**
-        * Second phase construction
-        */
-        void ConstructL();
-        
-        /**
-        * Prohibit copy costructor
-        */      
-        CXcapC4( const CXdmEngine& aXdmEngine );  
-        
-    private: // member data
-        /// RCS Global: Old content type setting
-        TInt iRCSGlobalOldContentType;
-    };
-
-#endif    //__XCAPPRESCONTENT__
-            
-// End of File
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/XcapC4/src/XcapC4.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  CXcapC4
-*
-*/
-
-#include <XdmErrors.h>
-#include <XdmDocumentNode.h>
-#include <XdmNodeAttribute.h>
-#include <centralrepository.h>
-#ifdef _DEBUG
-#include <flogger.h>
-#endif
-
-#include "XcapC4.h"
-//#include "pasvariation.hrh"
-
-
-// Used specification
-// Presence Content XDM Specification, draft 1.0
-
-// ----------------------------------------------------
-// CXcapC4::CXcapC4
-// 
-// ----------------------------------------------------
-//
-CXcapC4::CXcapC4( const CXdmEngine& aXdmEngine ) :
-	CXcapAppUsage( aXdmEngine )
-    {
-#ifdef _DEBUG 
-    WriteToLog( _L8( "CXcapC4 initialized!" ) );
-#endif
-    }
-
-// ----------------------------------------------------
-// CXcapC4::NewL
-// 
-// ----------------------------------------------------
-//
-CXcapC4* CXcapC4::NewL( const TXcapAppUsageParams& aParameters )
-    {
-    CXcapC4* self = new ( ELeave ) CXcapC4( aParameters.iXdmEngine );
-    CleanupStack::PushL( self );	// << self
-    self->ConstructL();
-    CleanupStack::Pop( self );      // >> self
-    return self;
-    }
-
-// ----------------------------------------------------
-// CXcapC4::~CXcapC4
-// 
-// ----------------------------------------------------
-//
-CXcapC4::~CXcapC4()
-    {
-    }
-        
-// ----------------------------------------------------
-// CXcapC4::ConstructL
-// 
-// ----------------------------------------------------
-//
-void CXcapC4::ConstructL()
-    {
-    CRepository* cenRepRCSGlobal;
-    cenRepRCSGlobal = CRepository::NewL( TUid::Uid( KC4SettingsCenRepUID ) );
-	CleanupStack::PushL( cenRepRCSGlobal );
-
-    // 0x06 is the index in central repository for content type setting
-    User::LeaveIfError( cenRepRCSGlobal->Get( 0x06, iRCSGlobalOldContentType ) );
-    CleanupStack::PopAndDestroy( ); // cenRepRCSGlobal
-    }
-
-// ----------------------------------------------------
-// CXcapC4::AUID
-// 
-// ----------------------------------------------------
-//
-TPtrC8 CXcapC4::AUID() const
-    {
-    return TPtrC8( KXdmPresContentAUID );
-    }
-                
-// ----------------------------------------------------
-// CXcapC4::ContentType
-// 
-// ----------------------------------------------------
-//
-TPtrC8 CXcapC4::ContentType() const
-    {
-    if ( iRCSGlobalOldContentType )
-    	{
-	return TPtrC8( KXdmPresContentContTypeOld );
-    	}
-    else
-    	{
-	return TPtrC8( KXdmPresContentContType );
-    	}
-    }
-
-// ----------------------------------------------------
-// CXcapC4::DefaultNamespace
-// 
-// ----------------------------------------------------
-//
-TPtrC8 CXcapC4::DefaultNamespace() const
-    {
-    return TPtrC8( KXdmPresContentNamespace );
-    }   
-    
-// ----------------------------------------------------
-// CXcapC4::ValidateL
-// 
-// ----------------------------------------------------
-//
-TBool CXcapC4::ValidateNodeL( CXdmDocumentNode& aXdmNode )
-    {
-#ifdef _DEBUG 
-    WriteToLog( _L8( "CXcapC4::ValidateNodeL" ) );
-#endif
-    // This method is called by base class for each element
-    // in document, here we have to declare every element, check element 
-    // datatype, restrictions for values and also do all checking that concerns  
-    // the structure of the element. If the datatype is some of
-    // the common datatypes defined in xcapappusage.h, the node
-    // can pe passed to the base class for value validation.
-    // If the node belongs to this namespace, the return value
-    // should be true, false otherwise.
-     
-    TBool found ( EFalse );   
-    TPtrC element = aXdmNode.NodeName();
-
-	// mime-type
-	if ( Match( element, KXdmMimeType ) )
-		{
-		found = ETrue;
-		}
-	else if ( Match( element, KXdmEncoding ) )
-		{
-		found = ETrue;
-		}
-	else if ( Match( element, KXdmDescription ) )
-		{
-		found = ETrue;
-		}
-	else if ( Match( element, KXdmData ) )
-		{
-		found = ETrue;
-		}
-
-#ifdef _DEBUG 
-    WriteToLog( _L8( "CXcapC4::ValidateNodeL - found: %d" ), found );
-#endif
-    return found;
-    }
-
-// ----------------------------------------------------
-// CXcapC4::ValidateAttributeL
-// 
-// ----------------------------------------------------
-//
-void CXcapC4::ValidateAttributeL( const CXdmNodeAttribute& aXdmNodeAttr )
-    {
-    // This method is called by base class for each attribute
-    // in document, here we have to define data types
-    // for attributes, and pass them to the base class
-    // for the actual data checking.
-    
-	// there should not be any attributes in pres-content document
-#ifdef _DEBUG 
-    WriteToLog( _L8( "CXcapC4::ValidateAttributeL" ) );
-#endif
-//	User::Leave( KErrNotSupported );
-    }   
-                         
-// ----------------------------------------------------
-// CXcapC4::AddNamespaceInformationL
-// 
-// ----------------------------------------------------
-//
-void CXcapC4::AddNamespaceInformationL( CXdmDocument& aXdmDocument )
-    {
-#ifdef _DEBUG 
-    WriteToLog( _L8( "CXcapC4::AddNamespaceInformationL" ) );
-#endif
-    aXdmDocument.AppendNamespaceL( KXdmPresContentNamespace, KNullDesC8 );
-    }
-
-// End of File
-
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/eabi/XcapAppUsageU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/eabi/XcapAppUsageU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -3,30 +3,28 @@
 	_ZN13CXcapAppUsage4NewLERK10CXdmEnginei @ 2 NONAME
 	_ZN13CXcapAppUsage8ValidateER12CXdmDocumenti @ 3 NONAME
 	_ZN13CXcapAppUsage8ValidateER16CXdmDocumentNodeP17MXcapUriInterfacei @ 4 NONAME
-	_ZTI13CXcapAppUsage @ 5 NONAME
-	_ZTI18CXcapPocGroupUsage @ 6 NONAME
-	_ZTI19CXcapDirectoryUsage @ 7 NONAME
-	_ZTI19CXcapSharedXDMUsage @ 8 NONAME
-	_ZTI20CXcapCapabilityUsage @ 9 NONAME
-	_ZTI21CXcapRlsServicesUsage @ 10 NONAME
-	_ZTI22CXcapOmaPresRulesUsage @ 11 NONAME
-	_ZTI23CXcapIetfPresRulesUsage @ 12 NONAME
-	_ZTI23CXcapPocUserAccessUsage @ 13 NONAME
-	_ZTI23CXcapResourceListsUsage @ 14 NONAME
-	_ZTI25CXcapOmaCommonPolicyUsage @ 15 NONAME
-	_ZTI26CXcapIetfCommonPolicyUsage @ 16 NONAME
-	_ZTI7CXcapC4 @ 17 NONAME
-	_ZTV13CXcapAppUsage @ 18 NONAME
-	_ZTV18CXcapPocGroupUsage @ 19 NONAME
-	_ZTV19CXcapDirectoryUsage @ 20 NONAME
-	_ZTV19CXcapSharedXDMUsage @ 21 NONAME
-	_ZTV20CXcapCapabilityUsage @ 22 NONAME
-	_ZTV21CXcapRlsServicesUsage @ 23 NONAME
-	_ZTV22CXcapOmaPresRulesUsage @ 24 NONAME
-	_ZTV23CXcapIetfPresRulesUsage @ 25 NONAME
-	_ZTV23CXcapPocUserAccessUsage @ 26 NONAME
-	_ZTV23CXcapResourceListsUsage @ 27 NONAME
-	_ZTV25CXcapOmaCommonPolicyUsage @ 28 NONAME
-	_ZTV26CXcapIetfCommonPolicyUsage @ 29 NONAME
-	_ZTV7CXcapC4 @ 30 NONAME
+	_ZTI13CXcapAppUsage @ 5 NONAME ; #<TI>#
+	_ZTI18CXcapPocGroupUsage @ 6 NONAME ; #<TI>#
+	_ZTI19CXcapDirectoryUsage @ 7 NONAME ; #<TI>#
+	_ZTI19CXcapSharedXDMUsage @ 8 NONAME ; #<TI>#
+	_ZTI20CXcapCapabilityUsage @ 9 NONAME ; #<TI>#
+	_ZTI21CXcapRlsServicesUsage @ 10 NONAME ; #<TI>#
+	_ZTI22CXcapOmaPresRulesUsage @ 11 NONAME ; #<TI>#
+	_ZTI23CXcapIetfPresRulesUsage @ 12 NONAME ; #<TI>#
+	_ZTI23CXcapPocUserAccessUsage @ 13 NONAME ; #<TI>#
+	_ZTI23CXcapResourceListsUsage @ 14 NONAME ; #<TI>#
+	_ZTI25CXcapOmaCommonPolicyUsage @ 15 NONAME ; #<TI>#
+	_ZTI26CXcapIetfCommonPolicyUsage @ 16 NONAME ; #<TI>#
+	_ZTV13CXcapAppUsage @ 17 NONAME ; #<VT>#
+	_ZTV18CXcapPocGroupUsage @ 18 NONAME ; #<VT>#
+	_ZTV19CXcapDirectoryUsage @ 19 NONAME ; #<VT>#
+	_ZTV19CXcapSharedXDMUsage @ 20 NONAME ; #<VT>#
+	_ZTV20CXcapCapabilityUsage @ 21 NONAME ; #<VT>#
+	_ZTV21CXcapRlsServicesUsage @ 22 NONAME ; #<VT>#
+	_ZTV22CXcapOmaPresRulesUsage @ 23 NONAME ; #<VT>#
+	_ZTV23CXcapIetfPresRulesUsage @ 24 NONAME ; #<VT>#
+	_ZTV23CXcapPocUserAccessUsage @ 25 NONAME ; #<VT>#
+	_ZTV23CXcapResourceListsUsage @ 26 NONAME ; #<VT>#
+	_ZTV25CXcapOmaCommonPolicyUsage @ 27 NONAME ; #<VT>#
+	_ZTV26CXcapIetfCommonPolicyUsage @ 28 NONAME ; #<VT>#
 
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/group/XcapAppUsage.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/group/XcapAppUsage.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -74,10 +74,6 @@
 // SOURCEPATH                              ../XcapTestAppUsage/src
 // SOURCE                                  XcapTestAppUsage.cpp
 
-// PRES-CONTENT STARTS
-SOURCEPATH                              ../XcapC4/src
-SOURCE                                  XcapC4.cpp
-// PRES-CONTENT ENDS
 USERINCLUDE                             ../inc
 USERINCLUDE                             ../../inc
 USERINCLUDE                             ../XcapCapabilityUsage/inc
@@ -91,18 +87,14 @@
 USERINCLUDE                             ../XcapPresenceRulesUsage/inc
 // USERINCLUDE                             ../XcapTestAppUsage/inc
 
-USERINCLUDE                             ../../../../inc
-// PRES-CONTENT STARTS
-USERINCLUDE                             ../XcapC4/inc
-// PRES-CONTENT ENDS
 MW_LAYER_SYSTEMINCLUDE
 SYSTEMINCLUDE                           /epoc32/include/ecom
 SYSTEMINCLUDE                           ../../../../inc
 
 LIBRARY                                 ecom.lib
 LIBRARY                                 euser.lib
-LIBRARY                                 XdmEngine.lib
-LIBRARY                                 centralrepository.lib
+LIBRARY                                 xdmengine.lib
+
 
 DEBUGLIBRARY                            efsrv.lib
 DEBUGLIBRARY                            flogger.lib
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsage.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsage.h	Fri Mar 19 09:37:41 2010 +0200
@@ -473,17 +473,7 @@
                    ( TAny* )&params ) );
             }
             break;
-// PRES-CONTENT STARTS
-      case EXdmPresContent:
-            {
-            TUid KDefaultImplementationUid = { 0x20028701 };
-            TRAPD( error, ptr = REComSession::CreateImplementationL( 
-                KDefaultImplementationUid,
-                _FOFF( CXcapAppUsage, iDestructorKey ),
-               ( TAny* )&params ) );
-            }
-            break;
-// PRES-CONTENT ENDS
+     
         default:
             User::Leave( KErrNotSupported );
         }
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsageDef.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/inc/XcapAppUsageDef.h	Fri Mar 19 09:37:41 2010 +0200
@@ -48,9 +48,6 @@
 _LIT8( KXdmPocGroupUsageAUID,              "/org.openmobilealliance.poc-groups/" );
 // add new AUID definitions here
 //_LIT8( KXdmTestAppUsageAUID,               "/org.foo.bar/" );
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentAUID,                "/org.openmobilealliance.pres-content/" );
-// PRES-CONTENT ends
 
 // ContentTypes
 _LIT8( KXdmResourceListsUsageContType,     "application/resource-lists+xml" );
@@ -66,10 +63,7 @@
 _LIT8( KXdmPocGroupUsageContType,          "application/vnd.oma.poc.groups+xml" );
 // add new content types here
 //_LIT8( KXdmTestAppUsageContType,           "application/test-type+xml" );
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentContType,            "application/vnd.oma.pres-content+xml" );
-_LIT8( KXdmPresContentContTypeOld,         "application/vnd.oma.content+xml" );
-// PRES-CONTENT ends
+
 
 // Namespaces
 _LIT8( KXdmResourceListsNamespace,         "urn:ietf:params:xml:ns:resource-lists" );
@@ -84,9 +78,6 @@
 _LIT8( KXdmPocUserAccessNamespace,         "urn:oma:xml:poc:poc-rules" );
 _LIT8( KXdmPocGroupNamespace,              "urn:oma:xml:poc:list-service" );
 // add new namespace definitions here
-// PRES-CONTENT starts
-_LIT8( KXdmPresContentNamespace,           "urn:oma:xml:prs:pres-content" );
-// PRES-CONTENT ends
 
 // Namespace prefixes
 _LIT8( KXdmSharedXDMUriUsageNsPrefix,       "ou" );
@@ -240,15 +231,6 @@
 _LIT(  KXdmPackage,                         "package" );
 _LIT8( KXdmPresence,                        "presence" );
 
-// PRES-CONTENT starts
-_LIT( KXdmMimeType,                         "mime-type");
-_LIT( KXdmEncoding,                         "encoding");
-_LIT( KXdmDescription,                      "description");
-_LIT( KXdmData,                             "data");
-_LIT( KXdmSvg,                              "svg");
-_LIT( KXdmRect,                             "rect");
-// PRES-CONTENT ends
-
 #endif      //__XCAPAPPUSAGEDEF__
             
 // End of File
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/src/10207416.rss	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/src/10207416.rss	Fri Mar 19 09:37:41 2010 +0200
@@ -126,17 +126,7 @@
 					display_name = "XCAP OmaPresenceRules Application Usage||Copyright © 2005 Nokia Ltd. All rights reserved.";
 					default_data = "";
 					opaque_data ="";
-					},
-					// PRES-CONTENT STARTS
-				IMPLEMENTATION_INFO
-				    {
-					implementation_uid = 0x20028701;
-					version_no = 1;
-					display_name = "XCAP Pres-Content Application Usage||Copyright © 2008 Nokia Ltd. All rights reserved.";
-					default_data = "";
-					opaque_data ="";
 					}
-					// PRES-CONTENT ENDS
 				};
 			}
 		};
--- a/xdmprotocols/XcapProtocol/XcapAppUsage/src/XcapAppUsage.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapAppUsage/src/XcapAppUsage.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -41,9 +41,6 @@
 #include "XcapOmaPresRulesUsage.h"
 // Add the header of the new app usage here
 // #include "XcapTestAppUsage.h"
-// PRES-CONTENT STARTS
-#include "XcapC4.h"
-// PRES-CONTENT ENDS
 
 #include <XdmErrors.h>
 #include <XdmProtocolUidList.h>
@@ -57,24 +54,21 @@
 // Map the interface UIDs to implementation factory functions
 const TImplementationProxy ImplementationTable[] = 
 	{
-#ifdef __EABI__  
-	IMPLEMENTATION_PROXY_ENTRY( KXdmCapabilityUsageUid, CXcapCapabilityUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmDirectoryUsageUid,  CXcapDirectoryUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmPocGroupUsageUid,   CXcapPocGroupUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmPocUserAccessUsageUid,  CXcapPocUserAccessUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmSharedXDMUsageUid,  CXcapSharedXDMUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmRlsServicesUsageUid,    CXcapRlsServicesUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmResourceListsUsageUid,  CXcapResourceListsUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmIetfCommonPolicyUsageUid,   CXcapIetfCommonPolicyUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmOmaCommonPolicyUsageUid,    CXcapOmaCommonPolicyUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmIetfPresRulesUsageUid,  CXcapIetfPresRulesUsage::NewL ),
-	IMPLEMENTATION_PROXY_ENTRY( KXdmOmaPresRulesUsageUid,   CXcapOmaPresRulesUsage::NewL ),
+#ifdef __EABI__
+    IMPLEMENTATION_PROXY_ENTRY( KXdmCapabilityUsageUid, CXcapCapabilityUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmDirectoryUsageUid,  CXcapDirectoryUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmPocGroupUsageUid,   CXcapPocGroupUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmPocUserAccessUsageUid,  CXcapPocUserAccessUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmSharedXDMUsageUid,  CXcapSharedXDMUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmRlsServicesUsageUid,    CXcapRlsServicesUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmResourceListsUsageUid,  CXcapResourceListsUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmIetfCommonPolicyUsageUid,   CXcapIetfCommonPolicyUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmOmaCommonPolicyUsageUid,    CXcapOmaCommonPolicyUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmIetfPresRulesUsageUid,  CXcapIetfPresRulesUsage::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KXdmOmaPresRulesUsageUid,   CXcapOmaPresRulesUsage::NewL )
     // add new usages here
     // IMPLEMENTATION_PROXY_ENTRY( KXdmTestAppUsageUid,    CXcapTestAppUsage::NewL ),
-// PRES-CONTENT STARTS
-	IMPLEMENTATION_PROXY_ENTRY( KXdmUsageUid, CXcapC4::NewL )
-// PRES-CONTENT ENDS
-#else  
+#else 
     { { KXdmCapabilityUsageUid }, CXcapCapabilityUsage::NewL },
     { { KXdmDirectoryUsageUid }, CXcapDirectoryUsage::NewL },
     { { KXdmPocGroupUsageUid }, CXcapPocGroupUsage::NewL },
@@ -85,12 +79,9 @@
     { { KXdmIetfCommonPolicyUsageUid }, CXcapIetfCommonPolicyUsage::NewL },
     { { KXdmOmaCommonPolicyUsageUid }, CXcapOmaCommonPolicyUsage::NewL },
     { { KXdmIetfPresRulesUsageUid }, CXcapIetfPresRulesUsage::NewL },
-    { { KXdmOmaPresRulesUsageUid }, CXcapOmaPresRulesUsage::NewL }, 
+    { { KXdmOmaPresRulesUsageUid }, CXcapOmaPresRulesUsage::NewL }    
     // add new usages here
     // { { KXdmTestAppUsageUid }, CXcapTestAppUsage::NewL }, 
-// PRES-CONTENT STARTS
-    { { KXdmUsageUid }, CXcapC4::NewL }
-// PRES-CONTENT ENDS
 #endif
     };
 
@@ -161,7 +152,6 @@
         case KXdmOmaCommonPolicyUsageUid:     
         case KXdmIetfPresRulesUsageUid:     
         case KXdmOmaPresRulesUsageUid:
-        case KXdmUsageUid:
             {
             TUid KImplementationUid = { aDocumentType };
             ptr = REComSession::CreateImplementationL( 
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheIndex.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheIndex.h	Fri Mar 19 09:37:41 2010 +0200
@@ -35,8 +35,8 @@
     public:             // Constructors and destructor
         
         /**
-        * Returns Cache Index
-        * @return Created Cache Index
+        * Returns the MIME type of the messages
+        * @return TPtrC8 The MIME type of the messages
         */
         static CXcapCacheIndex* NewL();
         
@@ -69,7 +69,7 @@
         * Returns the MIME type of the messages
         * @return TPtrC8 The MIME type of the messages
         */
-        void SortEntriesL();
+        void SortEntries();
         
         /**
         * Returns the MIME type of the messages
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheServer.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/inc/XcapCacheServer.h	Fri Mar 19 09:37:41 2010 +0200
@@ -49,10 +49,10 @@
     public:             // Constructors and destructor
         
         /**
-        * Returns KErrNone
-        * @return TInt System wide error code
+        * Returns the MIME type of the messages
+        * @return TPtrC8 The MIME type of the messages
         */
-        IMPORT_C static TInt StartThreadL();
+        IMPORT_C static TInt StartThread();
         
         /**
         * A global logging function for 8 bit data.
@@ -124,37 +124,37 @@
         static TInt ConvertDesc( const TDesC8& aNumberDesc );
         
         /**
-        * A function to handle descriptor data.
-        * @return Date in heap descriptor
+        * A global logging function for 8 bit data.
+        * @param aCommand command to be handled
         */
-        static HBufC* DateL();
-                
+        static TBuf<KDateMaxSize> Date();
+        
         /**
-        * A function to handle descriptor data.
-        * @return Time in heap descriptor
+        * A global logging function for 8 bit data.
+        * @param aCommand command to be handled
         */
-        static HBufC* TimeL();
+        static TBuf<KDateMaxSize> Time();
 
         /**
-        * A function to handle descriptor data.
-        * @return Random string heap descriptor
+        * Returns the MIME type of the messages
+        * @return TPtrC8 The MIME type of the messages
         */
-        static HBufC* RandomStringL();
-                
+        static TBuf<KRandStringLength> RandomString();
+        
         /**
-        * A function to handle descriptor data.
-        * @return Date and time heap descriptor
+        * A global logging function for 8 bit data.
+        * @param aCommand command to be handled
         */
-        static HBufC* DateTimeL();
-                
+        static TBuf<KDateTimeMaxSize> DateTime();
+        
         /**
-        * A function to handle descriptor data.
-        * @return Date and time heap descriptor
+        * A global logging function for 8 bit data.
+        * @param aCommand command to be handled
         */
-        static HBufC* DateTimeL( const TTime& aTime );
-                
+        static TBuf<KDateTimeMaxSize> DateTime( const TTime& aTime );
+        
         /**
-        * A function to handle descriptor data.
+        * A global logging function for 8 bit data.
         * @param aCommand command to be handled
         */
         static TPtr8 DescriptorCast( const TDesC8& aConstData );
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndex.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndex.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -163,23 +163,23 @@
 // 
 // ----------------------------------------------------------
 //
-void CXcapCacheIndex::SortEntriesL()
+void CXcapCacheIndex::SortEntries()
     {
     TLinearOrder<CXcapCacheIndexEntry> order( CXcapCacheIndex::Compare );
     iEntryList.Sort( order );
     #ifdef _DEBUG
         TPtrC8 entryDesc;
         TInt count = iEntryList.Count();
-        CXcapCacheServer::WriteToLog( _L8( "CXcapCacheIndex::SortEntriesL()" ) );
+        CXcapCacheServer::WriteToLog( _L8( "CXcapCacheIndex::SortEntries()" ) );
         CXcapCacheServer::WriteToLog( _L8( "------------------------------------------" ) );
         CXcapCacheServer::WriteToLog( _L8( " Sorted list:" ) );
         for( TInt i = 0;i < count;i++ )
             {
-            HBufC* buffer = NULL;
-            buffer = CXcapCacheServer::DateTimeL( iEntryList[i]->LastModified() );
+            TBuf<KDateTimeMaxSize> buffer =
+                CXcapCacheServer::DateTime( iEntryList[i]->LastModified() );
             TBuf8<KDateTimeMaxSize> printBuffer( _L8( "  " ) );
             printBuffer.AppendFormat( _L8( "%d: " ), i );
-            printBuffer.Append( *buffer );
+            printBuffer.Append( buffer );
             CXcapCacheServer::WriteToLog( printBuffer );
             }
         CXcapCacheServer::WriteToLog( _L8( "------------------------------------------" ) );
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndexEntry.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheIndexEntry.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -317,17 +317,13 @@
 HBufC8* CXcapCacheIndexEntry::HourStringLC()
     {
     HBufC8* hourString = NULL;
-    HBufC* date = CXcapCacheServer::DateL();
-    HBufC* time = CXcapCacheServer::TimeL();
-    hourString = HBufC8::NewLC( date->Length() + time->Length() + 1 );
+    TPtrC date( CXcapCacheServer::Date() );
+    TPtrC time( CXcapCacheServer::Time() );
+    hourString = HBufC8::NewLC( date.Length() + time.Length() + 1 );
     TPtr8 pointer( hourString->Des() );
-    pointer.Copy( *date );
+    pointer.Copy( date );
     pointer.Append( KPageFileSeparator );
-    pointer.Append( *time );
-    delete date;
-    date = NULL;
-    delete time;
-    time = NULL;
+    pointer.Append( time );
     return hourString;
     }
 
@@ -340,15 +336,13 @@
     {
     RFile file;
     HBufC* nameBuf = NULL;
-    HBufC* randomString = NULL;
     TPtrC randomName( _L( "" ) );
     TInt error = KErrAlreadyExists;
     //It is extremely unlikely that the random string generator
     //creates two exact same patterns, but let's check for it, anyway.
     while( error == KErrAlreadyExists )
         {
-        randomString = CXcapCacheServer::RandomStringL();
-        randomName.Set( *randomString );
+        randomName.Set( CXcapCacheServer::RandomString() );
         nameBuf = HBufC::NewLC( KCacheServerRoot().Length() + randomName.Length() );
         nameBuf->Des().Copy( KCacheServerRoot );
         nameBuf->Des().Append( randomName );
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServer.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServer.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -172,55 +172,51 @@
     }
 
 // ---------------------------------------------------------
-// CXcapCacheServer::DateL
+// CXcapCacheServer::Date
 // 
 // ---------------------------------------------------------
 //
-HBufC* CXcapCacheServer::DateL()
+TBuf<KDateMaxSize> CXcapCacheServer::Date()
     {
     TTime time;
     TBuf<KDateMaxSize> dateBuffer;
     dateBuffer.SetLength( 0 );
-    time.HomeTime();
+	time.HomeTime();
     time.FormatL( dateBuffer, KCacheDateFormat );
-    HBufC* heapDate = dateBuffer.AllocL();
-    return heapDate;
+    return dateBuffer;
     }
 
 // ---------------------------------------------------------
-// CXcapCacheServer::DateTimeL
+// CXcapCacheServer::DateTime
 // 
 // ---------------------------------------------------------
 //
-HBufC* CXcapCacheServer::DateTimeL()
+TBuf<KDateTimeMaxSize> CXcapCacheServer::DateTime()
     {
     TTime time;
     TBuf<KDateMaxSize> dateBuffer;
-    time.HomeTime();
+	time.HomeTime();
     time.FormatL( dateBuffer, KDateFormatFileName );
     TBuf<KDateMaxSize> timeBuffer;
-    time.HomeTime();
-    time.FormatL( timeBuffer, KTimeFormatFileName );
+	time.HomeTime();
+	time.FormatL( timeBuffer, KTimeFormatFileName );
     TBuf<KDateTimeMaxSize> buffer;
     buffer.SetLength( 0 );
     buffer.Copy( dateBuffer );
     buffer.Append( timeBuffer );
-    HBufC* ret = HBufC::NewL( buffer.Length() );
-    ret->Des().Copy( buffer );
-    return ret;
+    return buffer;
     }
 
 // ---------------------------------------------------------
-// CXcapCacheServer::DateTimeL
+// CXcapCacheServer::DateTime
 // 
 // ---------------------------------------------------------
 //
-HBufC* CXcapCacheServer::DateTimeL( const TTime& aTime )
+TBuf<KDateTimeMaxSize> CXcapCacheServer::DateTime( const TTime& aTime )
     {
     TBuf<KDateTimeMaxSize> dateTimeBuffer;
     aTime.FormatL( dateTimeBuffer, KDateTimeFormat );
-    HBufC* heapDateTime = dateTimeBuffer.AllocL();
-    return heapDateTime;
+    return dateTimeBuffer;
     }
     
 // ----------------------------------------------------------
@@ -262,11 +258,11 @@
     }
 
 // ---------------------------------------------------------
-// CXcapCacheServer::RandomStringL
+// CXcapCacheServer::RandomString
 // 
 // ---------------------------------------------------------
 //
-HBufC* CXcapCacheServer::RandomStringL()
+TBuf<KRandStringLength> CXcapCacheServer::RandomString()
     {
     const TInt charCount( sizeof( KRandomStringCharArray ) / sizeof( TInt ) );
     TBuf<KRandStringLength> buffer;
@@ -276,24 +272,22 @@
         TInt index = Math::Random() % charCount;
         buffer.Append( ( TChar )KRandomStringCharArray[index] );
         }
-    HBufC* randomHeapBuffer = buffer.AllocL();
-    return randomHeapBuffer;
+    return buffer;
     }
 
 // ---------------------------------------------------------
-// CXcapCacheServer::TimeL
+// CXcapCacheServer::Time
 // 
 // ---------------------------------------------------------
 //
-HBufC* CXcapCacheServer::TimeL()
+TBuf<KDateMaxSize> CXcapCacheServer::Time()
     {
     TTime time;
     TBuf<KDateMaxSize> timeBuffer;
-    timeBuffer.SetLength( 0 );
-    time.HomeTime();
-    time.FormatL( timeBuffer, KCacheTimeFormat );
-    HBufC* heapTime = timeBuffer.AllocL();
-    return heapTime;
+	timeBuffer.SetLength( 0 );
+	time.HomeTime();
+	time.FormatL( timeBuffer, KCacheTimeFormat );
+    return timeBuffer;
     }
 
 // ---------------------------------------------------------
@@ -340,16 +334,16 @@
     }
 
 // ----------------------------------------------------
-// CXcapCacheServer::StartThreadL
+// CXcapCacheServer::StartThread
 // 
 // ----------------------------------------------------
 //
-EXPORT_C TInt CXcapCacheServer::StartThreadL()
+EXPORT_C TInt CXcapCacheServer::StartThread()
     {
-    User::LeaveIfError( User::RenameThread( KXcapCacheServerName ) );
-    CActiveScheduler* scheduler = new ( ELeave ) CActiveScheduler;
-    CleanupStack::PushL( scheduler );
-    CActiveScheduler::Install( scheduler );
+	User::LeaveIfError( User::RenameThread( KXcapCacheServerName ) );
+	CActiveScheduler* scheduler = new ( ELeave ) CActiveScheduler;
+	CleanupStack::PushL( scheduler );
+	CActiveScheduler::Install( scheduler );
     User::LeaveIfError( FsSession.Connect() );
     CleanupClosePushL( FsSession );
     CXcapCacheServer::NewLC();
@@ -358,15 +352,15 @@
     CacheIndexAdmin = CXcapCacheIndexAdmin::NewL();
     CleanupStack::PushL( CacheIndexAdmin );
     RProcess::Rendezvous( KErrNone );
-    #ifdef _DEBUG
-        CXcapCacheServer::WriteToLog( _L8( "XcapCacheServer fully running" ) );
+	#ifdef _DEBUG
+	    CXcapCacheServer::WriteToLog( _L8( "XcapCacheServer fully running" ) );
+	#endif
+	CActiveScheduler::Start();
+	#ifdef _DEBUG
+	    CXcapCacheServer::WriteToLog( _L8( "XcapCacheServer closing..." ) );
     #endif
-    CActiveScheduler::Start();
-    #ifdef _DEBUG
-        CXcapCacheServer::WriteToLog( _L8( "XcapCacheServer closing..." ) );
-    #endif
-    CleanupStack::PopAndDestroy( 5 );  //CacheIndexAdmin, CacheIndex, server, FsSession, scheduler
-    return KErrNone;
+	CleanupStack::PopAndDestroy( 5 );  //CacheIndexAdmin, CacheIndex, server, FsSession, scheduler
+	return KErrNone;
     }
 
 // ----------------------------------------------------
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServerMain.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheServerMain.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -59,7 +59,7 @@
     #endif
 	if( cleanup )
 		{
-		TRAP( error, CXcapCacheServer::StartThreadL() );
+		TRAP( error, CXcapCacheServer::StartThread() );
 		delete cleanup;
 		}
 	__UHEAP_MARKEND; 
--- a/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheSession.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapCache/Server/src/XcapCacheSession.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -175,7 +175,7 @@
                 #ifdef _DEBUG
                     CXcapCacheServer::WriteToLog( _L8( " Cache too large: %d bytes" ), size );
                 #endif
-                iCacheIndex.SortEntriesL();
+                iCacheIndex.SortEntries();
                 const TInt compression( iCacheServer->MaxCacheSize() * KDefaultCompression );
                 //NOTE: Index & pagefile are always there -> 3
                 TBool ready = EFalse;
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/BWINSCW/XcapHttpTransportU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/BWINSCW/XcapHttpTransportU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -5,20 +5,18 @@
 	?DeleteL@CXcapHttpTransport@@QAEPAVCXcapHttpReqDelete@@ABVTDesC16@@@Z @ 4 NONAME ; class CXcapHttpReqDelete * CXcapHttpTransport::DeleteL(class TDesC16 const &)
 	?DispatchRequestL@CXcapHttpRequest@@QAEXAAVTRequestStatus@@@Z @ 5 NONAME ; void CXcapHttpRequest::DispatchRequestL(class TRequestStatus &)
 	?GetL@CXcapHttpTransport@@QAEPAVCXcapHttpReqGet@@ABVTDesC16@@@Z @ 6 NONAME ; class CXcapHttpReqGet * CXcapHttpTransport::GetL(class TDesC16 const &)
-	?HeadL@CXcapHttpTransport@@QAEPAVCXcapHttpReqHead@@ABVTDesC16@@@Z @ 7 NONAME ; class CXcapHttpReqHead * CXcapHttpTransport::HeadL(class TDesC16 const &)
-	?HeaderValue@CXcapHttpRequest@@QBE?AVTPtrC8@@W4TStrings@HTTP@@@Z @ 8 NONAME ; class TPtrC8 CXcapHttpRequest::HeaderValue(enum HTTP::TStrings) const
-	?MkcolL@CXcapHttpTransport@@QAEPAVCXcapHttpReqMkcol@@ABVTDesC16@@@Z @ 9 NONAME ; class CXcapHttpReqMkcol * CXcapHttpTransport::MkcolL(class TDesC16 const &)
-	?NewL@CXcapHttpTransport@@SAPAV1@ABVTDesC16@@AAVMMsgConnManager@@ABVTXdmCredentials@@@Z @ 10 NONAME ; class CXcapHttpTransport * CXcapHttpTransport::NewL(class TDesC16 const &, class MMsgConnManager &, class TXdmCredentials const &)
-	?PutL@CXcapHttpTransport@@QAEPAVCXcapHttpReqPut@@ABVTDesC16@@@Z @ 11 NONAME ; class CXcapHttpReqPut * CXcapHttpTransport::PutL(class TDesC16 const &)
-	?ReleaseResponseData@CXcapHttpRequest@@QAEXXZ @ 12 NONAME ; void CXcapHttpRequest::ReleaseResponseData(void)
-	?RequestBody@CXcapHttpContSupplier@@QBE?AVTPtrC8@@XZ @ 13 NONAME ; class TPtrC8 CXcapHttpContSupplier::RequestBody(void) const
-	?RequestUriL@CXcapHttpRequest@@QBE?AVTPtrC8@@XZ @ 14 NONAME ; class TPtrC8 CXcapHttpRequest::RequestUriL(void) const
-	?ResetUriL@CXcapHttpRequest@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void CXcapHttpRequest::ResetUriL(class TDesC16 const &)
-	?ResponseData@CXcapHttpRequest@@QAEPAVTXdmCompletionData@@XZ @ 16 NONAME ; class TXdmCompletionData * CXcapHttpRequest::ResponseData(void)
-	?RootUri@CXcapHttpTransport@@QAE?AVTPtrC8@@XZ @ 17 NONAME ; class TPtrC8 CXcapHttpTransport::RootUri(void)
-	?SetExpiryTimeL@CXcapHttpRequest@@QAEXPAVMXcapHttpRequestTimerCallback@@VTTimeIntervalMicroSeconds32@@@Z @ 18 NONAME ; void CXcapHttpRequest::SetExpiryTimeL(class MXcapHttpRequestTimerCallback *, class TTimeIntervalMicroSeconds32)
-	?SetHeaderL@CXcapHttpRequest@@QAEXABVTDesC8@@0@Z @ 19 NONAME ; void CXcapHttpRequest::SetHeaderL(class TDesC8 const &, class TDesC8 const &)
-	?SetRequestBodyL@CXcapHttpContSupplier@@QAEXABVTDesC8@@@Z @ 20 NONAME ; void CXcapHttpContSupplier::SetRequestBodyL(class TDesC8 const &)
-	?SetRootUriL@CXcapHttpTransport@@QAEXABVTDesC16@@@Z @ 21 NONAME ; void CXcapHttpTransport::SetRootUriL(class TDesC16 const &)
-	?UpdateRequestUriL@CXcapHttpRequest@@QAEXABVTDesC8@@@Z @ 22 NONAME ; void CXcapHttpRequest::UpdateRequestUriL(class TDesC8 const &)
+	?HeaderValue@CXcapHttpRequest@@QBE?AVTPtrC8@@W4TStrings@HTTP@@@Z @ 7 NONAME ; class TPtrC8 CXcapHttpRequest::HeaderValue(enum HTTP::TStrings) const
+	?NewL@CXcapHttpTransport@@SAPAV1@ABVTDesC16@@AAVMMsgConnManager@@ABVTXdmCredentials@@@Z @ 8 NONAME ; class CXcapHttpTransport * CXcapHttpTransport::NewL(class TDesC16 const &, class MMsgConnManager &, class TXdmCredentials const &)
+	?PutL@CXcapHttpTransport@@QAEPAVCXcapHttpReqPut@@ABVTDesC16@@@Z @ 9 NONAME ; class CXcapHttpReqPut * CXcapHttpTransport::PutL(class TDesC16 const &)
+	?ReleaseResponseData@CXcapHttpRequest@@QAEXXZ @ 10 NONAME ; void CXcapHttpRequest::ReleaseResponseData(void)
+	?RequestBody@CXcapHttpContSupplier@@QBE?AVTPtrC8@@XZ @ 11 NONAME ; class TPtrC8 CXcapHttpContSupplier::RequestBody(void) const
+	?RequestUriL@CXcapHttpRequest@@QBE?AVTPtrC8@@XZ @ 12 NONAME ; class TPtrC8 CXcapHttpRequest::RequestUriL(void) const
+	?ResetUriL@CXcapHttpRequest@@QAEXABVTDesC16@@@Z @ 13 NONAME ; void CXcapHttpRequest::ResetUriL(class TDesC16 const &)
+	?ResponseData@CXcapHttpRequest@@QAEPAVTXdmCompletionData@@XZ @ 14 NONAME ; class TXdmCompletionData * CXcapHttpRequest::ResponseData(void)
+	?RootUri@CXcapHttpTransport@@QAE?AVTPtrC8@@XZ @ 15 NONAME ; class TPtrC8 CXcapHttpTransport::RootUri(void)
+	?SetExpiryTimeL@CXcapHttpRequest@@QAEXPAVMXcapHttpRequestTimerCallback@@VTTimeIntervalMicroSeconds32@@@Z @ 16 NONAME ; void CXcapHttpRequest::SetExpiryTimeL(class MXcapHttpRequestTimerCallback *, class TTimeIntervalMicroSeconds32)
+	?SetHeaderL@CXcapHttpRequest@@QAEXABVTDesC8@@0@Z @ 17 NONAME ; void CXcapHttpRequest::SetHeaderL(class TDesC8 const &, class TDesC8 const &)
+	?SetRequestBodyL@CXcapHttpContSupplier@@QAEXABVTDesC8@@@Z @ 18 NONAME ; void CXcapHttpContSupplier::SetRequestBodyL(class TDesC8 const &)
+	?SetRootUriL@CXcapHttpTransport@@QAEXABVTDesC16@@@Z @ 19 NONAME ; void CXcapHttpTransport::SetRootUriL(class TDesC16 const &)
+	?UpdateRequestUriL@CXcapHttpRequest@@QAEXABVTDesC8@@@Z @ 20 NONAME ; void CXcapHttpRequest::UpdateRequestUriL(class TDesC8 const &)
 
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/eabi/XcapHttpTransportU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/eabi/XcapHttpTransportU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -1,5 +1,5 @@
 EXPORTS
-    _ZN16CXcapHttpRequest10SetHeaderLERK6TDesC8S2_ @ 1 NONAME
+	_ZN16CXcapHttpRequest10SetHeaderLERK6TDesC8S2_ @ 1 NONAME
 	_ZN16CXcapHttpRequest12ResponseDataEv @ 2 NONAME
 	_ZN16CXcapHttpRequest13CancelRequestEv @ 3 NONAME
 	_ZN16CXcapHttpRequest14SetExpiryTimeLEP29MXcapHttpRequestTimerCallback27TTimeIntervalMicroSeconds32 @ 4 NONAME
@@ -11,22 +11,18 @@
 	_ZN18CXcapHttpTransport4GetLERK7TDesC16 @ 10 NONAME
 	_ZN18CXcapHttpTransport4NewLERK7TDesC16R15MMsgConnManagerRK15TXdmCredentials @ 11 NONAME
 	_ZN18CXcapHttpTransport4PutLERK7TDesC16 @ 12 NONAME
-	_ZN18CXcapHttpTransport5HeadLERK7TDesC16 @ 13 NONAME
-	_ZN18CXcapHttpTransport6MkcolLERK7TDesC16 @ 14 NONAME
-	_ZN18CXcapHttpTransport7DeleteLERK7TDesC16 @ 15 NONAME
-	_ZN18CXcapHttpTransport7RootUriEv @ 16 NONAME
-	_ZN21CXcapHttpContSupplier15SetRequestBodyLERK6TDesC8 @ 17 NONAME
-	_ZNK16CXcapHttpRequest11HeaderValueEN4HTTP8TStringsE @ 18 NONAME
-	_ZNK16CXcapHttpRequest11RequestUriLEv @ 19 NONAME
-	_ZNK21CXcapHttpContSupplier11RequestBodyEv @ 20 NONAME
-	_ZTI16CXcapHttpRequest @ 21 NONAME ; #<TI>#
-	_ZTI18CXcapHttpTransport @ 22 NONAME ; #<TI>#
-	_ZTI20CXcapHttpAuthManager @ 23 NONAME ; #<TI>#
-	_ZTI21CXcapHttpContSupplier @ 24 NONAME ; #<TI>#
-	_ZTV16CXcapHttpRequest @ 25 NONAME ; #<VT>#
-	_ZTV18CXcapHttpTransport @ 26 NONAME ; #<VT>#
-	_ZTV20CXcapHttpAuthManager @ 27 NONAME ; #<VT>#
-	_ZTV21CXcapHttpContSupplier @ 28 NONAME ; #<VT>#
+	_ZN18CXcapHttpTransport7DeleteLERK7TDesC16 @ 13 NONAME
+	_ZN18CXcapHttpTransport7RootUriEv @ 14 NONAME
+	_ZN21CXcapHttpContSupplier15SetRequestBodyLERK6TDesC8 @ 15 NONAME
+	_ZNK16CXcapHttpRequest11HeaderValueEN4HTTP8TStringsE @ 16 NONAME
+	_ZNK16CXcapHttpRequest11RequestUriLEv @ 17 NONAME
+	_ZNK21CXcapHttpContSupplier11RequestBodyEv @ 18 NONAME
+	_ZTI16CXcapHttpRequest @ 19 NONAME ; #<TI>#
+	_ZTI18CXcapHttpTransport @ 20 NONAME ; #<TI>#
+	_ZTI20CXcapHttpAuthManager @ 21 NONAME ; #<TI>#
+	_ZTI21CXcapHttpContSupplier @ 22 NONAME ; #<TI>#
+	_ZTV16CXcapHttpRequest @ 23 NONAME ; #<VT>#
+	_ZTV18CXcapHttpTransport @ 24 NONAME ; #<VT>#
+	_ZTV20CXcapHttpAuthManager @ 25 NONAME ; #<VT>#
+	_ZTV21CXcapHttpContSupplier @ 26 NONAME ; #<VT>#
 
-
-
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/group/XcapHttpTransport.mmp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/group/XcapHttpTransport.mmp	Fri Mar 19 09:37:41 2010 +0200
@@ -37,9 +37,6 @@
 SOURCE                  XcapHttpAuthManager.cpp
 SOURCE                  XcapHttpContSupplier.cpp
 SOURCE                  XcapHttpRequestTimer.cpp
-// SONERA SOLUTION
-SOURCE                  XcapHttpReqHead.cpp
-SOURCE                  XcapHttpReqMkcol.cpp
 
 //Internal
 USERINCLUDE             ../inc
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpReqHead.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   CXcapHttpReqHead
-*
-*/
-
-#ifndef __XCAPHTTPREQHEAD__
-#define __XCAPHTTPREQHEAD__
-
-// INCLUDES
-#include "http.h"
-#include "XcapHttpRequest.h"
-
-//CONSTANTS
-_LIT8( KXcapRequestHead, "HEAD" );
-
-//FORWARD DECLARATIONS
-class CXdmHttpResponse;
-class CXcapHttpAuthManager;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS( CXcapHttpReqHead ) : public CXcapHttpRequest
-    {
-    public:
-        
-        /**
-        * C++ default constructor is private.
-        */      
-        static CXcapHttpReqHead* NewL( const TDesC& aRequestUri,         
-                                      RHTTPSession& aHttpSession,
-                                      CXcapHttpAuthManager& aAuthManager,
-                                      CXcapHttpTransport& aTransportMain );
-
-         /**
-        * Destructor.
-        */      
-        virtual ~CXcapHttpReqHead();
-
-    private:  // Constructors and destructor
-        
-        /**
-        * C++ default constructor is private.
-        */      
-        CXcapHttpReqHead( RHTTPSession& aHttpSession,
-                         CXcapHttpAuthManager& aAuthManager,
-                         CXcapHttpTransport& aTransportMain );
-
-        /**
-        * Copies the request data
-        * @param aRequestData Data to be sent
-        */
-        virtual void ConstructRequestL();
-
-        /**
-        * Append data to the response buffer.
-        */
-        virtual RStringF ConstructMethodStringL();
-
-    private:
-        
-        /**
-        * Second-phase constructor.
-        */ 
-        void ConstructL();
-        
-    private: //Data
-        
-    };
-
-#endif
-
-// End of File
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpReqMkcol.h	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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:   CXcapHttpReqMkcol
-*
-*/
-
-#ifndef __XCAPHTTPREQMKCOL__
-#define __XCAPHTTPREQMKCOL__
-
-// INCLUDES
-#include "http.h"
-#include "XcapHttpContSupplier.h"
-
-//CONSTANTS
-_LIT8( KXcapRequestMkcol, "MKCOL" );
-
-//FORWARD DECLARATIONS
-class CXcapHttpResponse;
-
-// CLASS DECLARATION
-NONSHARABLE_CLASS( CXcapHttpReqMkcol ) : public CXcapHttpContSupplier
-    {
-    public:
-        
-        /**
-        * C++ default constructor is private.
-        */      
-        static CXcapHttpReqMkcol* NewL( const TDesC& aRequestUri, 
-                                      RHTTPSession& aHttpSession,
-                                      CXcapHttpAuthManager& aAuthManager,
-                                      CXcapHttpTransport& aTransportMain );
-
-         /**
-        * Destructor.
-        */      
-        virtual ~CXcapHttpReqMkcol();
-
-    private:  // Constructors and destructor
-        
-        /**
-        * C++ default constructor is private.
-        */      
-        CXcapHttpReqMkcol( RHTTPSession& aHttpSession,
-                         CXcapHttpAuthManager& aAuthManager,
-                         CXcapHttpTransport& aTransportMain );
-
-        /**
-        * Copies the request data
-        * @param aRequestData Data to be sent
-        */
-        virtual void ConstructRequestL();
-
-        /**
-        * Append data to the response buffer.
-        */
-        virtual RStringF ConstructMethodStringL();
-
-    private:
-        
-        /**
-        * Second-phase constructor.
-        */ 
-        void ConstructL();
-        
-    private: //Data
-        
-    };
-
-#endif
-
-// End of File
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpTransport.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/inc/XcapHttpTransport.h	Fri Mar 19 09:37:41 2010 +0200
@@ -41,8 +41,6 @@
 class CXcapHttpReqPut;
 class CXcapHttpReqDelete;
 class CXcapHttpAuthManager;
-class CXcapHttpReqMkcol;
-class CXcapHttpReqHead;
 
 // CLASS DECLARATION
 class CXcapHttpTransport : public CBase
@@ -72,16 +70,6 @@
         * Send one IMPS message.
         */
         IMPORT_C CXcapHttpReqPut* PutL( const TDesC& aUri );
-        
-        /**
-        * Send one IMPS message.
-        */
-        IMPORT_C CXcapHttpReqMkcol* MkcolL( const TDesC& aUri );
-
-        /**
-        * Send one IMPS message.
-        */
-        IMPORT_C CXcapHttpReqHead* HeadL( const TDesC& aUri );
 
         /**
         * Send one IMPS message.
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpAuthManager.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpAuthManager.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -223,13 +223,11 @@
     switch( aName )
         {                                              
         case ENfoNextnonce:
-            {
             SetNextNonceL( value );
             #ifdef _DEBUG
                 TPtrC8 nonce( iServerNonce->Des() );
                 iTransportMain.WriteToLog( _L8( "  -> Nonce set to %S" ), &nonce );
             #endif
-            }
             break;
         case ENfoRspauth:
             /* TODO */
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpReqHead.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* ============================================================================
-*  Name     : CXcapHttpReqHead from XcapHttpReqHead.cpp
-*  Part of  : Transport Adapter of the Symbian OS WV Engine 
-*
-*  Description:
-/*
-* 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:   CXcapHttpReqHead
-*
-*/
-
-// INCLUDE FILES
-#include "XcapHttpReqHead.h"
-#include "XcapHttpTransport.h"
-
-// ================= MEMBER FUNCTIONS =======================
-//
-
-// ----------------------------------------------------------
-// CXcapHttpReqHead::CXcapHttpReqHead
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqHead::CXcapHttpReqHead( RHTTPSession& aHttpSession,
-                                  CXcapHttpAuthManager& aAuthManager,
-                                  CXcapHttpTransport& aTransportMain ) :
-                                  CXcapHttpRequest( aHttpSession, aAuthManager, aTransportMain )
-                                        
-    {
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqHead::NewL
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqHead* CXcapHttpReqHead::NewL( const TDesC& aRequestUri, 
-                                        RHTTPSession& aHttpSession,
-                                        CXcapHttpAuthManager& aAuthManager,
-                                        CXcapHttpTransport& aTransportMain )
-                                        
-    {
-    CXcapHttpReqHead* self = new ( ELeave ) CXcapHttpReqHead( aHttpSession, aAuthManager, aTransportMain );
-    CleanupStack::PushL( self );
-    self->BaseConstructL( aRequestUri );
-    CleanupStack::Pop();  //self
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqHead::~CXcapHttpReqHead
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqHead::~CXcapHttpReqHead()
-    {
-    #ifdef _DEBUG
-        iTransportMain.WriteToLog( _L8( "CXcapHttpReqHead::~CXcapHttpReqHead()" ) );    
-    #endif
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqHead::ConstructRequestL
-// 
-// ----------------------------------------------------------
-//
-void CXcapHttpReqHead::ConstructRequestL()
-    {
-    CXcapHttpRequest::ConstructRequestL();
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqHead::ConstructRequestL
-// 
-// ----------------------------------------------------------
-//
-RStringF CXcapHttpReqHead::ConstructMethodStringL()
-    {
-    #ifdef _DEBUG
-        iTransportMain.WriteToLog( _L8( "CXcapHttpReqHead::ConstructMethodStringL()" ) );    
-    #endif
-    return iHttpSession.StringPool().OpenFStringL( KXcapRequestHead );
-    }
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpReqMkcol.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* ============================================================================
-*  Name     : CXcapHttpReqHead from XcapHttpReqHead.cpp
-*  Part of  : Transport Adapter of the Symbian OS WV Engine 
-*
-*  Description:
-/*
-* 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:   CXcapHttpReqMkcol
-*
-*/
-
-// INCLUDE FILES
-#include "XcapHttpReqMkcol.h"
-#include "XcapHttpTransport.h"
-
-// ================= MEMBER FUNCTIONS =======================
-//
-
-// ----------------------------------------------------------
-// CXcapHttpReqMkcol::CXcapHttpReqMkcol
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqMkcol::CXcapHttpReqMkcol( RHTTPSession& aHttpSession,
-                                  CXcapHttpAuthManager& aAuthManager,
-                                  CXcapHttpTransport& aTransportMain ) :
-                                  CXcapHttpContSupplier( aHttpSession, aAuthManager, aTransportMain )
-                                        
-    {
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqMkcol::NewL
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqMkcol* CXcapHttpReqMkcol::NewL( const TDesC& aRequestUri, 
-                                        RHTTPSession& aHttpSession,
-                                        CXcapHttpAuthManager& aAuthManager,
-                                        CXcapHttpTransport& aTransportMain )
-                                        
-    {
-    CXcapHttpReqMkcol* self = new ( ELeave ) CXcapHttpReqMkcol( aHttpSession, aAuthManager, aTransportMain );
-    CleanupStack::PushL( self );
-    self->BaseConstructL( aRequestUri );
-    CleanupStack::Pop();  //self
-    return self;
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqMkcol::~CXcapHttpReqMkcol
-// 
-// ----------------------------------------------------------
-//
-CXcapHttpReqMkcol::~CXcapHttpReqMkcol()
-    {
-    #ifdef _DEBUG
-        iTransportMain.WriteToLog( _L8( "CXcapHttpReqMkcol::~CXcapHttpReqMkcol()" ) );    
-    #endif
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqMkcol::ConstructRequestL
-// 
-// ----------------------------------------------------------
-//
-void CXcapHttpReqMkcol::ConstructRequestL()
-    {
-    CXcapHttpRequest::ConstructRequestL();
-    iHttpTransaction.Request().SetBody( *this );
-    }
-
-// ----------------------------------------------------------
-// CXcapHttpReqMkcol::ConstructRequestL
-// 
-// ----------------------------------------------------------
-//
-RStringF CXcapHttpReqMkcol::ConstructMethodStringL()
-    {
-    return iHttpSession.StringPool().OpenFStringL( KXcapRequestMkcol );
-    }
-
--- a/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpTransport.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapHttpTransport/src/XcapHttpTransport.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -26,8 +26,6 @@
 #include "XdmCredentials.h"
 #include "XcapHttpReqGet.h"
 #include "XcapHttpReqPut.h"
-#include "XcapHttpReqMkcol.h"
-#include "XcapHttpReqHead.h"
 #include "XcapHttpRequest.h"
 #include "XcapHttpReqDelete.h"
 #include "XcapHttpTransport.h"
@@ -154,44 +152,6 @@
     }
 
 // ----------------------------------------------------
-// CXcapHttpTransport::Mkcol
-// 
-// ----------------------------------------------------
-//
-EXPORT_C CXcapHttpReqMkcol* CXcapHttpTransport::MkcolL( const TDesC& aRequestUri )
-    {
-    #ifdef _DEBUG
-        WriteToLog( _L8( "CXcapHttpTransport::MkcolRequestL()" ) );
-    #endif
-    if( !iSessionClosed )
-        return CXcapHttpReqMkcol::NewL( aRequestUri, iHttpSession, *iAuthManager, *this );
-    else
-        {
-        User::Leave( KErrNotReady );
-        return NULL;
-        }    
-    }
-
-// ----------------------------------------------------
-// CXcapHttpTransport::Head
-// 
-// ----------------------------------------------------
-//
-EXPORT_C CXcapHttpReqHead* CXcapHttpTransport::HeadL( const TDesC& aRequestUri )
-    {
-    #ifdef _DEBUG
-        WriteToLog( _L8( "CXcapHttpTransport::HeadRequestL()" ) );
-    #endif
-    if( !iSessionClosed )
-        return CXcapHttpReqHead::NewL( aRequestUri, iHttpSession, *iAuthManager, *this );
-    else
-        {
-        User::Leave( KErrNotReady );
-        return NULL;
-        }    
-    }
-
-// ----------------------------------------------------
 // CXcapHttpTransport::DeleteL
 // 
 // ----------------------------------------------------
@@ -244,7 +204,7 @@
                            THTTPHdrVal( stringPool.StringF( HTTP::EHttp11, RHTTPSession::GetTable() ) ) );
     connInfo.SetPropertyL( stringPool.StringF( HTTP::ESecureDialog, RHTTPSession::GetTable() ),
                            THTTPHdrVal( stringPool.StringF( HTTP::EDialogPrompt, RHTTPSession::GetTable() ) ) );
-    //CHttpDeflateFilter::InstallFilterL( iHttpSession );
+    CHttpDeflateFilter::InstallFilterL( iHttpSession );
     iSessionClosed = EFalse;
     #ifdef _DEBUG
         WriteToLog( _L8( "InitialiseSessionL() ends." ) );
--- a/xdmprotocols/XcapProtocol/XcapOperations/src/XcapHttpOperation.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapOperations/src/XcapHttpOperation.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -54,9 +54,6 @@
 //
 void CXcapHttpOperation::BaseConstructL()
     {
-    #ifdef _DEBUG
-        iOperationFactory.WriteToLog( _L8( "-> CXcapHttpOperation::BaseConstructL" ) ); 
-    #endif
     iXmlParser = &iTargetDoc.Protocol().Parser();
     iUriParser = CXcapUriParser::NewL( iTargetDoc, iOperationFactory );
     #ifdef _DEBUG
@@ -64,9 +61,6 @@
         iOperationFactory.WriteToLog( _L8( " Content-Type: %S" ), &contType ); 
     #endif
     CActiveScheduler::Add( this );
-    #ifdef _DEBUG
-        iOperationFactory.WriteToLog( _L8( "<- CXcapHttpOperation::BaseConstructL" ) ); 
-    #endif
     }
 
 // ---------------------------------------------------------
--- a/xdmprotocols/XcapProtocol/XcapOperations/src/XcapOperationFactory.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapOperations/src/XcapOperationFactory.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -61,8 +61,7 @@
     {
     #ifdef _DEBUG
         iLogWriter = CXdmLogWriter::NewL( KOperationsLogFile );
-        WriteToLog( _L8( "-> CXcapOperationFactory::ConstructL" ) );
-        WriteToLog( _L8( "<- CXcapOperationFactory::ConstructL" ) );
+        WriteToLog( _L8( "CXcapOperationFactory::~CXcapOperationFactory()" ) );
     #endif
     }
             
@@ -74,11 +73,11 @@
 CXcapOperationFactory::~CXcapOperationFactory()
     {
     #ifdef _DEBUG
-        WriteToLog( _L8( "-> CXcapOperationFactory::~CXcapOperationFactory()" ) );
+        WriteToLog( _L8( "CXcapOperationFactory::~CXcapOperationFactory()" ) );
     #endif
     #ifdef _DEBUG
-        WriteToLog( _L8( "<- CXcapOperationFactory::~CXcapOperationFactory()" ) );
-      #endif
+        WriteToLog( _L8( "  Destructor of the derived class ends" ) );
+    #endif
     delete iLogWriter;
     }
     
--- a/xdmprotocols/XcapProtocol/XcapOperations/src/XcapRetrieval.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/XcapOperations/src/XcapRetrieval.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -71,9 +71,6 @@
 //
 void CXcapRetrieval::ConstructL()
     {
-#ifdef _DEBUG
-    iOperationFactory.WriteToLog( _L8( "-> CXcapRetrieval::ConstructL" ) );  
-#endif
     CXcapHttpReqGet* request = Transport().GetL( iTargetDoc.Name() );
     CleanupStack::PushL( request );
     User::LeaveIfError( iRequestQueue.Append( request ) );
@@ -86,9 +83,6 @@
         User::LeaveIfError( iTargetDoc.ApplicationUsage().Validate(
                             *iDocumentSubset, iUriParser, ETrue ) );
         }
-#ifdef _DEBUG
-    iOperationFactory.WriteToLog( _L8( "<- CXcapRetrieval::ConstructL" ) );  
-#endif
     }
 
 // ---------------------------------------------------------
@@ -108,7 +102,7 @@
             iOperationFactory.WriteToLog( _L8( " Using ETag \"%S\" - Length: %d" ),
                                                &eTag, eTag.Length() );  
         #endif
-        //iActiveRequest->SetHeaderL( KHttpHeaderIfNoneMatch, eTag );
+        iActiveRequest->SetHeaderL( KHttpHeaderIfNoneMatch, eTag );
         }
     TRAPD( error, iUriParser->ParseL( iActiveRequest->RequestUriL() ) );
     if( error == KErrNone )
--- a/xdmprotocols/XcapProtocol/bwinscw/XcapProtocolU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/bwinscw/XcapProtocolU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -1,11 +1,11 @@
 EXPORTS
-        ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &)
+	?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &)
 	??1CXcapDocumentNode@@UAE@XZ @ 2 NONAME ; CXcapDocumentNode::~CXcapDocumentNode(void)
 	??1CXdmNamespace@@UAE@XZ @ 3 NONAME ; CXdmNamespace::~CXdmNamespace(void)
 	?ApplicationUsage@CXcapDocument@@QBEAAVCXcapAppUsage@@XZ @ 4 NONAME ; class CXcapAppUsage & CXcapDocument::ApplicationUsage(void) const
 	?Cache@CXcapProtocol@@QAEPAVRXcapCache@@XZ @ 5 NONAME ; class RXcapCache * CXcapProtocol::Cache(void)
 	?DataLength@CXcapDocument@@QBEHXZ @ 6 NONAME ; int CXcapDocument::DataLength(void) const
-	?ETag@CXcapDocument@@QAEAAVTDesC8@@XZ @ 7 NONAME ; class TDesC8 & CXcapDocument::ETag(void)
+	?ETag@CXcapDocument@@QBE?AVTPtrC8@@XZ @ 7 NONAME ; class TPtrC8 CXcapDocument::ETag(void) const
 	?IsNetworkAvailable@CXcapProtocol@@QAEHXZ @ 8 NONAME ; int CXcapProtocol::IsNetworkAvailable(void)
 	?NewL@CXdmNamespace@@SAPAV1@ABVTDesC8@@0@Z @ 9 NONAME ; class CXdmNamespace * CXdmNamespace::NewL(class TDesC8 const &, class TDesC8 const &)
 	?Parser@CXcapProtocol@@QAEAAVCXdmXmlParser@@XZ @ 10 NONAME ; class CXdmXmlParser & CXcapProtocol::Parser(void)
@@ -18,5 +18,4 @@
 	?TempCopyL@CXcapDocument@@QAEPAV1@XZ @ 17 NONAME ; class CXcapDocument * CXcapDocument::TempCopyL(void)
 	?Transport@CXcapProtocol@@QAEAAVCXcapHttpTransport@@XZ @ 18 NONAME ; class CXcapHttpTransport & CXcapProtocol::Transport(void)
 	?Uri@CXdmNamespace@@QBE?AVTPtrC8@@XZ @ 19 NONAME ; class TPtrC8 CXdmNamespace::Uri(void) const
-	
 
--- a/xdmprotocols/XcapProtocol/eabi/XcapProtocolU.DEF	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/eabi/XcapProtocolU.DEF	Fri Mar 19 09:37:41 2010 +0200
@@ -2,23 +2,23 @@
 	_Z24ImplementationGroupProxyRi @ 1 NONAME
 	_ZN13CXcapDocument10RemoveDataEP17CXcapDocumentNode @ 2 NONAME
 	_ZN13CXcapDocument11ResetSubsetEv @ 3 NONAME
-	_ZN13CXcapDocument4ETagEv @ 4 NONAME
-	_ZN13CXcapDocument7SetETagERK6TDesC8 @ 5 NONAME
-	_ZN13CXcapDocument9TempCopyLEv @ 6 NONAME
-	_ZN13CXcapProtocol18IsNetworkAvailableEv @ 7 NONAME
-	_ZN13CXcapProtocol5CacheEv @ 8 NONAME
-	_ZN13CXcapProtocol6ParserEv @ 9 NONAME
-	_ZN13CXcapProtocol8PublicIDEv @ 10 NONAME
-	_ZN13CXcapProtocol9TransportEv @ 11 NONAME
-	_ZN13CXdmNamespace4NewLERK6TDesC8S2_ @ 12 NONAME
-	_ZN13CXdmNamespaceD0Ev @ 13 NONAME
-	_ZN13CXdmNamespaceD1Ev @ 14 NONAME
-	_ZN13CXdmNamespaceD2Ev @ 15 NONAME
-	_ZN17CXcapDocumentNodeD0Ev @ 16 NONAME
-	_ZN17CXcapDocumentNodeD1Ev @ 17 NONAME
-	_ZN17CXcapDocumentNodeD2Ev @ 18 NONAME
-	_ZNK13CXcapDocument10DataLengthEv @ 19 NONAME
-	_ZNK13CXcapDocument16ApplicationUsageEv @ 20 NONAME
+	_ZN13CXcapDocument7SetETagERK6TDesC8 @ 4 NONAME
+	_ZN13CXcapDocument9TempCopyLEv @ 5 NONAME
+	_ZN13CXcapProtocol18IsNetworkAvailableEv @ 6 NONAME
+	_ZN13CXcapProtocol5CacheEv @ 7 NONAME
+	_ZN13CXcapProtocol6ParserEv @ 8 NONAME
+	_ZN13CXcapProtocol8PublicIDEv @ 9 NONAME
+	_ZN13CXcapProtocol9TransportEv @ 10 NONAME
+	_ZN13CXdmNamespace4NewLERK6TDesC8S2_ @ 11 NONAME
+	_ZN13CXdmNamespaceD0Ev @ 12 NONAME
+	_ZN13CXdmNamespaceD1Ev @ 13 NONAME
+	_ZN13CXdmNamespaceD2Ev @ 14 NONAME
+	_ZN17CXcapDocumentNodeD0Ev @ 15 NONAME
+	_ZN17CXcapDocumentNodeD1Ev @ 16 NONAME
+	_ZN17CXcapDocumentNodeD2Ev @ 17 NONAME
+	_ZNK13CXcapDocument10DataLengthEv @ 18 NONAME
+	_ZNK13CXcapDocument16ApplicationUsageEv @ 19 NONAME
+	_ZNK13CXcapDocument4ETagEv @ 20 NONAME
 	_ZNK13CXcapDocument8ProtocolEv @ 21 NONAME
 	_ZNK13CXdmNamespace3UriEv @ 22 NONAME
 	_ZNK13CXdmNamespace6PrefixEv @ 23 NONAME
@@ -26,5 +26,4 @@
 	_ZTI13CXcapProtocol @ 25 NONAME ; #<TI>#
 	_ZTV13CXcapDocument @ 26 NONAME ; #<VT>#
 	_ZTV13CXcapProtocol @ 27 NONAME ; #<VT>#
-	
 
--- a/xdmprotocols/XcapProtocol/inc/XcapDocument.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/inc/XcapDocument.h	Fri Mar 19 09:37:41 2010 +0200
@@ -113,7 +113,7 @@
         * @param TInt Default Access Point ID
         * @return CXdmDocOperation*
         */     
-        IMPORT_C TDesC8& ETag();
+        IMPORT_C TPtrC8 ETag() const;
         
         /**
         * Symbian OS default constructor.
--- a/xdmprotocols/XcapProtocol/src/XcapDocument.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XcapProtocol/src/XcapDocument.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -218,9 +218,6 @@
     #endif  
     HBufC8* docName = NULL;
     iAppUsage = CXcapAppUsage::NewL( iXdmEngine, iDocumentType );
-    #ifdef _DEBUG
-        iXcapProtocol.WriteToLog( _L8( "CXcapDocument::InstallAppUsageL() type = %d" ), iDocumentType );
-    #endif  
     TPtrC8 auid = iAppUsage->AUID();
     if( IsGlobalTree( auid ) )
         {
@@ -406,7 +403,7 @@
 // 
 // ----------------------------------------------------
 //
-EXPORT_C TDesC8& CXcapDocument::ETag()
+EXPORT_C TPtrC8 CXcapDocument::ETag() const
     {
     return iETagBuffer;
     }
--- a/xdmprotocols/XdmXmlParser/inc/XmlParserDefines.h	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XdmXmlParser/inc/XmlParserDefines.h	Fri Mar 19 09:37:41 2010 +0200
@@ -34,7 +34,6 @@
 _LIT8( KXmlNamespaceString,                             " xmlns" );
 _LIT8( KPrefixSeparatorString,                          ":" );
 _LIT8( KNewlineString,                                  "\r\n" );
-_LIT8( KSpaceString,                                    " " );
 
 const TInt KStartBracket                                = 60;
 const TInt KEndBracket                                  = 62;
--- a/xdmprotocols/XdmXmlParser/src/XdmXmlParser.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XdmXmlParser/src/XdmXmlParser.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -172,7 +172,6 @@
                                                const CXdmDocumentNode* aRootNode )
     {
     #ifdef _DEBUG
-        WriteToLog( _L8( "CXdmXmlParser::FormatToXmlLC" ) );
         TInt start = CXdmXmlParser::TimeL();
     #endif
     HBufC8* ret = iXmlFormatter->FormatLC( aIsWholeDocument, aDocument, aRootNode );
--- a/xdmprotocols/XdmXmlParser/src/XmlFormatter.cpp	Tue Feb 02 01:05:17 2010 +0200
+++ b/xdmprotocols/XdmXmlParser/src/XmlFormatter.cpp	Fri Mar 19 09:37:41 2010 +0200
@@ -22,12 +22,9 @@
 #include <XdmDocument.h>
 #include <XdmDocumentNode.h>
 #include <XdmNodeAttribute.h>
-
-#include "XdmLogWriter.h"
 #include "XmlFormatter.h"
 #include "XmlParserDefines.h"
 #include "XmlParserNodePath.h"
-#include "XdmXmlParser.h"
 
 // ----------------------------------------------------------
 // CXmlFormatter::CXmlFormatter
@@ -294,9 +291,6 @@
 void CXmlFormatter::FormatNamespaceDeclarationsL( const CXdmDocumentNode& aRootNode,
                                                   const MXdmNamespaceContainer& aContainer )
     {
-#ifdef _DEBUG
-    iParserMain.WriteToLog( _L8( "CXmlFormatter::FormatNamespaceDeclarationsL start" ) );
-#endif
     TPtrC8 name( aRootNode.EightBitNodeNameLC()->Des() );
     TPtrC8 prefix = Prefix( aRootNode );
     iFormatBuffer->InsertL( iFormBufferPos, KStartBracketString );
@@ -322,37 +316,10 @@
             AppendNamespaceL( uri, prefix );
             }
         }
-
-    // go through possible attributes after namespaces
-    for ( TInt i = 0; i < aRootNode.AttributeCount(); i++ )
-        {
-        iFormatBuffer->InsertL( iFormBufferPos, KSpaceString );
-        iFormBufferPos = iFormBufferPos + KSpaceString().Length();
-
-        CXdmNodeAttribute* attr = aRootNode.Attribute( i );
-        TPtrC8 name( attr->EightBitNodeNameLC()->Des() );
-        iFormatBuffer->InsertL( iFormBufferPos, name );
-        iFormBufferPos = iFormBufferPos + name.Length();
-        CleanupStack::PopAndDestroy();  //EightBitNodeNameLC()
-        iFormatBuffer->InsertL( iFormBufferPos, KEquelsSignString );
-        iFormBufferPos = iFormBufferPos + KEquelsSignString().Length();
-        iFormatBuffer->InsertL( iFormBufferPos, KQuotationSignString );
-        iFormBufferPos = iFormBufferPos + KQuotationSignString().Length();
-        TPtrC8 attrValue( attr->EightBitValueLC()->Des() );
-        iFormatBuffer->InsertL( iFormBufferPos, attrValue );
-        iFormBufferPos = iFormBufferPos + attrValue.Length();
-        CleanupStack::PopAndDestroy();  //EightBitValueLC()
-        iFormatBuffer->InsertL( iFormBufferPos, KQuotationSignString );
-        iFormBufferPos = iFormBufferPos + KQuotationSignString().Length();
-        }
-
     iFormatBuffer->InsertL( iFormBufferPos, KEndBracketString );
     iFormBufferPos = iFormBufferPos + KEndBracketString().Length();
     iFormatBuffer->InsertL( iFormBufferPos, KNewlineString );
     iFormBufferPos = iFormBufferPos + KNewlineString().Length();
-    #ifdef _DEBUG
-        iParserMain.WriteToLog( _L8( "CXmlFormatter::FormatNamespaceDeclarationsL exit" ) );
-    #endif
     }
 
 // ---------------------------------------------------------