Revision: 201015 RCL_3 PDK_3.0.0 PDK_3.0.i
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:58:25 +0300
branchRCL_3
changeset 14 7797b2f86d2b
parent 13 b6f2a363adf7
child 16 cfe5eb8bb9ca
Revision: 201015 Kit: 201017
brandingserver/bsserver/cbsstorage.cpp
imservices/group/bld.inf
imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp
imservices/ossprotocoladaptation/dataconvlib/bwins/opencstringutilitieslibexu.def
imservices/ossprotocoladaptation/dataconvlib/bwins/opencstringutilslibu.def
imservices/ossprotocoladaptation/dataconvlib/eabi/OpenCStringUtilsLibu.def
imservices/ossprotocoladaptation/dataconvlib/eabi/opencstringutilitieslibexu.def
imservices/ossprotocoladaptation/dataconvlib/group/bld.inf
imservices/ossprotocoladaptation/dataconvlib/group/stringutils.mmp
imservices/ossprotocoladaptation/dataconvlib/inc/stringutils.h
imservices/ossprotocoladaptation/dataconvlib/sis/stringutils_lib.pkg
imservices/ossprotocoladaptation/dataconvlib/src/stringutils.cpp
imservices/ossprotocoladaptation/group/bld.inf
imservices/ossprotocoladaptation/group/ossprotocoladaptation.mmp
imservices/ossprotocoladaptation/inc/cosscontactmanager.h
imservices/ossprotocoladaptation/inc/cossprotocolconnection.h
imservices/ossprotocoladaptation/inc/cossprotocolconnectionmanager.h
imservices/ossprotocoladaptation/inc/cossprotocolimfeatures.h
imservices/ossprotocoladaptation/inc/cossprotocolloginrequest.h
imservices/ossprotocoladaptation/inc/cossprotocollogoutrequest.h
imservices/ossprotocoladaptation/inc/cossprotocolplugin.h
imservices/ossprotocoladaptation/inc/cossprotocolpresencefeatures.h
imservices/ossprotocoladaptation/inc/cossprotocolsearchfeatures.h
imservices/ossprotocoladaptation/inc/cossprotocolservererrorhandler.h
imservices/ossprotocoladaptation/inc/cosssenddataoperation.h
imservices/ossprotocoladaptation/inc/cuserafter.h
imservices/ossprotocoladaptation/inc/im/cossprotocolimconversation.h
imservices/ossprotocoladaptation/inc/im/cosssendmessagerequest.h
imservices/ossprotocoladaptation/inc/im/creceivemessagehandler.h
imservices/ossprotocoladaptation/inc/mossprotocolconnectionmanager.h
imservices/ossprotocoladaptation/inc/mossprotocolstatusobserver.h
imservices/ossprotocoladaptation/inc/ossadappanics.h
imservices/ossprotocoladaptation/inc/ossprotocloliterals.h
imservices/ossprotocoladaptation/inc/ossprotocoladaptationuids.h
imservices/ossprotocoladaptation/inc/ossprotocoladaptutils.h
imservices/ossprotocoladaptation/inc/ossprotocolpluginerrors.h
imservices/ossprotocoladaptation/inc/ossprotocolpluginlogger.h
imservices/ossprotocoladaptation/inc/ossprotocolpluginpanics.h
imservices/ossprotocoladaptation/inc/presenceauthorization/cossprotocolpresenceauthorization.h
imservices/ossprotocoladaptation/inc/presenceauthorization/cpresenceauthuserrequest.h
imservices/ossprotocoladaptation/inc/presenceauthorization/csubscribepresencegrantrequestlistrequest.h
imservices/ossprotocoladaptation/inc/presenceauthorization/cwithdrawpresencegrantfrompresentityrequest.h
imservices/ossprotocoladaptation/inc/presencepublishing/cossprotocolpresencepublishing.h
imservices/ossprotocoladaptation/inc/presencepublishing/cpresencenotificationhandler.h
imservices/ossprotocoladaptation/inc/presencepublishing/cpublishownpresencerequest.h
imservices/ossprotocoladaptation/inc/presentitygroups/caddcontactenotificationhandler.h
imservices/ossprotocoladaptation/inc/presentitygroups/caddpresentitygroupmemberrequest.h
imservices/ossprotocoladaptation/inc/presentitygroups/ccontactsynchandler.h
imservices/ossprotocoladaptation/inc/presentitygroups/cossprotocolpresentitygroups.h
imservices/ossprotocoladaptation/inc/presentitygroups/cremovepresentitygroupmemberrequest.h
imservices/ossprotocoladaptation/inc/presentitygroups/csubscribepresentitygroupcontentrequest.h
imservices/ossprotocoladaptation/inc/processlauncher/processlaunher.h
imservices/ossprotocoladaptation/inc/search/cossprotocolsearch.h
imservices/ossprotocoladaptation/inc/search/csearchgetsearchkeys.h
imservices/ossprotocoladaptation/inc/search/csearchkeystore.h
imservices/ossprotocoladaptation/inc/search/csearchrequest.h
imservices/ossprotocoladaptation/inc/waittimer.h
imservices/ossprotocoladaptation/rom/ossprotocoladaptation.iby
imservices/ossprotocoladaptation/rom/ossprotocoladaptation.pkg
imservices/ossprotocoladaptation/rss/ossprotocoladaptation.rss
imservices/ossprotocoladaptation/src/cosscontactmanager.cpp
imservices/ossprotocoladaptation/src/cossprotocolconnection.cpp
imservices/ossprotocoladaptation/src/cossprotocolconnectionmanager.cpp
imservices/ossprotocoladaptation/src/cossprotocolimfeatures.cpp
imservices/ossprotocoladaptation/src/cossprotocolloginrequest.cpp
imservices/ossprotocoladaptation/src/cossprotocollogoutrequest.cpp
imservices/ossprotocoladaptation/src/cossprotocolplugin.cpp
imservices/ossprotocoladaptation/src/cossprotocolpresencefeatures.cpp
imservices/ossprotocoladaptation/src/cossprotocolsearchfeatures.cpp
imservices/ossprotocoladaptation/src/cossprotocolservererrorhandler.cpp
imservices/ossprotocoladaptation/src/cosssenddataoperation.cpp
imservices/ossprotocoladaptation/src/im/cossprotocolimconversation.cpp
imservices/ossprotocoladaptation/src/im/cosssendmessagerequest.cpp
imservices/ossprotocoladaptation/src/im/creceivemessagehandler.cpp
imservices/ossprotocoladaptation/src/ossprotocoladaptutils.cpp
imservices/ossprotocoladaptation/src/ossprotocolpluginlogger.cpp
imservices/ossprotocoladaptation/src/presenceauthorization/cossprotocolpresenceauthorization.cpp
imservices/ossprotocoladaptation/src/presenceauthorization/cpresenceauthuserrequest.cpp
imservices/ossprotocoladaptation/src/presenceauthorization/csubscribepresencegrantrequestlistrequest.cpp
imservices/ossprotocoladaptation/src/presenceauthorization/cwithdrawpresencegrantfrompresentityrequest.cpp
imservices/ossprotocoladaptation/src/presencepublishing/cossprotocolpresencepublishing.cpp
imservices/ossprotocoladaptation/src/presencepublishing/cpresencenotificationhandler.cpp
imservices/ossprotocoladaptation/src/presencepublishing/cpublishownpresencerequest.cpp
imservices/ossprotocoladaptation/src/presentitygroups/caddcontactnotificationhandler.cpp
imservices/ossprotocoladaptation/src/presentitygroups/caddpresentitygroupmemberrequest.cpp
imservices/ossprotocoladaptation/src/presentitygroups/ccontactsynchandler.cpp
imservices/ossprotocoladaptation/src/presentitygroups/cossprotocolpresentitygroups.cpp
imservices/ossprotocoladaptation/src/presentitygroups/cremovepresentitygroupmemberrequest.cpp
imservices/ossprotocoladaptation/src/presentitygroups/csubscribepresentitygroupcontentrequest.cpp
imservices/ossprotocoladaptation/src/processlauncher/processlaunher.cpp
imservices/ossprotocoladaptation/src/search/cossprotocolsearch.cpp
imservices/ossprotocoladaptation/src/search/csearchgetsearchkeys.cpp
imservices/ossprotocoladaptation/src/search/csearchkeystore.cpp
imservices/ossprotocoladaptation/src/search/csearchrequest.cpp
imservices/ossprotocoladaptation/src/waittimer.cpp
imservices/ossprotocoladaptation/tsrc/ossadapmt/bmarm/ossadapmtu.def
imservices/ossprotocoladaptation/tsrc/ossadapmt/bwins/ossadapmtu.def
imservices/ossprotocoladaptation/tsrc/ossadapmt/conf/ossadapmt.cfg
imservices/ossprotocoladaptation/tsrc/ossadapmt/eabi/ossadapmtu.def
imservices/ossprotocoladaptation/tsrc/ossadapmt/group/bld.inf
imservices/ossprotocoladaptation/tsrc/ossadapmt/group/ossadapmt.mmp
imservices/ossprotocoladaptation/tsrc/ossadapmt/group/ossadaptmt.pkg
imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/cuserafter.h
imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/ossadapmt.h
imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/uscontextobserver.h
imservices/ossprotocoladaptation/tsrc/ossadapmt/init/TestFramework.ini
imservices/ossprotocoladaptation/tsrc/ossadapmt/src/ossadapmt.cpp
imservices/ossprotocoladaptation/tsrc/ossadapmt/src/ossadapmtBlocks.cpp
imservices/ossprotocoladaptation/tsrc/ossadapmt/src/uscontextobserver.cpp
imservices/xmppsettingsapi/group/bld.inf
imservices/xmppsettingsfetcher/group/bld.inf
imsrv_plat/ximp_core_feature_plugin_api/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp
ximpfw/core/srcutils/ximpobjecthelpers.cpp
ximpfw/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp
--- a/brandingserver/bsserver/cbsstorage.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ b/brandingserver/bsserver/cbsstorage.cpp	Tue Apr 27 16:58:25 2010 +0300
@@ -331,11 +331,13 @@
 //
 void CBSStorage::GetListOfFilesL( RArray<TPtrC>& aFileList )
     {
+    CleanupClosePushL(aFileList);
     TInt count = iElements.Count();
     for( TInt i = 0; i < count; i++ )
         {
         AppendFilesL( iElements[i], aFileList );
         }
+    CleanupStack::Pop(&aFileList);
     }
 
 // ---------------------------------------------------------------------------
--- a/imservices/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ b/imservices/group/bld.inf	Tue Apr 27 16:58:25 2010 +0300
@@ -30,7 +30,6 @@
 #include "../searchfeatureplugin/group/bld.inf"
 #include "../xmppsettingsapi/group/bld.inf"
 #include "../xmppsettingsfetcher/group/bld.inf"
-#include "../ossprotocoladaptation/group/bld.inf"
 #include "../instantmessagingcache/group/bld.inf"
 
 PRJ_TESTMMPFILES
--- a/imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ b/imservices/instantmessagingcache/imcacheserver/src/ccacheserveractivehelper.cpp	Tue Apr 27 16:58:25 2010 +0300
@@ -585,6 +585,7 @@
 	{
 	TRACE( T_LIT( "CCacheServerActiveHelper::GetServiceChatHeaderArrayL	start") );		
 	
+	CleanupClosePushL(aServiceHeaderArray);
    
     if( -1 == aServiceId )
         {
@@ -601,6 +602,7 @@
                 }
             }        
         }
+    CleanupStack::Pop(&aServiceHeaderArray);
     TRACE( T_LIT( "CCacheServerActiveHelper::GetServiceChatHeaderArrayL    end") );
 	}
 
--- a/imservices/ossprotocoladaptation/dataconvlib/bwins/opencstringutilitieslibexu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-EXPORTS
-	?chartohbufc16@@YAHPBDAAVHBufC16@@@Z @ 1 NONAME ; int chartohbufc16(char const *, class HBufC16 &)
-	?chartohbufc8@@YAXPBDAAVHBufC8@@@Z @ 2 NONAME ; void chartohbufc8(char const *, class HBufC8 &)
-	?chartotbuf16@@YAHPBDAAVTDes16@@@Z @ 3 NONAME ; int chartotbuf16(char const *, class TDes16 &)
-	?chartotbuf8@@YAXPBDAAVTDes8@@@Z @ 4 NONAME ; void chartotbuf8(char const *, class TDes8 &)
-	?createMsgBuffer@@YAXPAD000H@Z @ 5 NONAME ; void createMsgBuffer(char *, char *, char *, char *, int)
-	?tbuf16tochar@@YAHAAVTDes16@@PAD@Z @ 6 NONAME ; int tbuf16tochar(class TDes16 &, char *)
-	?tbuf16towchar@@YAPAGAAVTDes16@@@Z @ 7 NONAME ; unsigned short * tbuf16towchar(class TDes16 &)
-	?tbuf8tochar@@YAPADAAVTDes8@@@Z @ 8 NONAME ; char * tbuf8tochar(class TDes8 &)
-	?tbuf8towchar@@YAHAAVTDes8@@PAG@Z @ 9 NONAME ; int tbuf8towchar(class TDes8 &, unsigned short *)
-	?tbufC16tochar@@YAHAAVTDesC16@@PAD@Z @ 10 NONAME ; int tbufC16tochar(class TDesC16 &, char *)
-	?tbufC16towchar@@YAXAAVTDesC16@@PAG@Z @ 11 NONAME ; void tbufC16towchar(class TDesC16 &, unsigned short *)
-	?tbufC8tochar@@YAXAAVTDesC8@@PAD@Z @ 12 NONAME ; void tbufC8tochar(class TDesC8 &, char *)
-	?tbufC8towchar@@YAHAAVTDesC8@@PAG@Z @ 13 NONAME ; int tbufC8towchar(class TDesC8 &, unsigned short *)
-	?wchartohbufc16@@YAXPBGAAVHBufC16@@@Z @ 14 NONAME ; void wchartohbufc16(unsigned short const *, class HBufC16 &)
-	?wchartohbufc8@@YAHPBGAAVHBufC8@@@Z @ 15 NONAME ; int wchartohbufc8(unsigned short const *, class HBufC8 &)
-	?wchartotbuf16@@YAXPBGAAVTDes16@@@Z @ 16 NONAME ; void wchartotbuf16(unsigned short const *, class TDes16 &)
-	?wchartotbuf8@@YAHPBGAAVTDes8@@@Z @ 17 NONAME ; int wchartotbuf8(unsigned short const *, class TDes8 &)
-
--- a/imservices/ossprotocoladaptation/dataconvlib/bwins/opencstringutilslibu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-EXPORTS
-	?chartohbufc16@@YAHPBDAAVHBufC16@@@Z @ 1 NONAME ; int chartohbufc16(char const *, class HBufC16 &)
-	?chartohbufc8@@YAXPBDAAVHBufC8@@@Z @ 2 NONAME ; void chartohbufc8(char const *, class HBufC8 &)
-	?chartotbuf16@@YAHPBDAAVTDes16@@@Z @ 3 NONAME ; int chartotbuf16(char const *, class TDes16 &)
-	?chartotbuf8@@YAXPBDAAVTDes8@@@Z @ 4 NONAME ; void chartotbuf8(char const *, class TDes8 &)
-	?tbuf16tochar@@YAHAAVTDes16@@PAD@Z @ 5 NONAME ; int tbuf16tochar(class TDes16 &, char *)
-	?tbuf16towchar@@YAPAGAAVTDes16@@@Z @ 6 NONAME ; unsigned short * tbuf16towchar(class TDes16 &)
-	?tbuf8tochar@@YAPADAAVTDes8@@@Z @ 7 NONAME ; char * tbuf8tochar(class TDes8 &)
-	?tbuf8towchar@@YAHAAVTDes8@@PAG@Z @ 8 NONAME ; int tbuf8towchar(class TDes8 &, unsigned short *)
-	?tbufC16tochar@@YAHAAVTDesC16@@PAD@Z @ 9 NONAME ; int tbufC16tochar(class TDesC16 &, char *)
-	?tbufC16towchar@@YAXAAVTDesC16@@PAG@Z @ 10 NONAME ; void tbufC16towchar(class TDesC16 &, unsigned short *)
-	?tbufC8tochar@@YAXAAVTDesC8@@PAD@Z @ 11 NONAME ; void tbufC8tochar(class TDesC8 &, char *)
-	?tbufC8towchar@@YAHAAVTDesC8@@PAG@Z @ 12 NONAME ; int tbufC8towchar(class TDesC8 &, unsigned short *)
-	?wchartohbufc16@@YAXPBGAAVHBufC16@@@Z @ 13 NONAME ; void wchartohbufc16(unsigned short const *, class HBufC16 &)
-	?wchartohbufc8@@YAHPBGAAVHBufC8@@@Z @ 14 NONAME ; int wchartohbufc8(unsigned short const *, class HBufC8 &)
-	?wchartotbuf16@@YAXPBGAAVTDes16@@@Z @ 15 NONAME ; void wchartotbuf16(unsigned short const *, class TDes16 &)
-	?wchartotbuf8@@YAHPBGAAVTDes8@@@Z @ 16 NONAME ; int wchartotbuf8(unsigned short const *, class TDes8 &)
-
--- a/imservices/ossprotocoladaptation/dataconvlib/eabi/OpenCStringUtilsLibu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-EXPORTS
-	_Z11chartotbuf8PKcR5TDes8 @ 1 NONAME
-	_Z11tbuf8tocharR5TDes8 @ 2 NONAME
-	_Z12chartohbufc8PKcR6HBufC8 @ 3 NONAME
-	_Z12chartotbuf16PKcR6TDes16 @ 4 NONAME
-	_Z12tbuf16tocharR6TDes16Pc @ 5 NONAME
-	_Z12tbuf8towcharR5TDes8Pw @ 6 NONAME
-	_Z12tbufC8tocharR6TDesC8Pc @ 7 NONAME
-	_Z12wchartotbuf8PKwR5TDes8 @ 8 NONAME
-	_Z13chartohbufc16PKcR7HBufC16 @ 9 NONAME
-	_Z13tbuf16towcharR6TDes16 @ 10 NONAME
-	_Z13tbufC16tocharR7TDesC16Pc @ 11 NONAME
-	_Z13tbufC8towcharR6TDesC8Pw @ 12 NONAME
-	_Z13wchartohbufc8PKwR6HBufC8 @ 13 NONAME
-	_Z13wchartotbuf16PKwR6TDes16 @ 14 NONAME
-	_Z14tbufC16towcharR7TDesC16Pw @ 15 NONAME
-	_Z14wchartohbufc16PKwR7HBufC16 @ 16 NONAME
-
--- a/imservices/ossprotocoladaptation/dataconvlib/eabi/opencstringutilitieslibexu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-EXPORTS
-	_Z11chartotbuf8PKcR5TDes8 @ 1 NONAME
-	_Z11tbuf8tocharR5TDes8 @ 2 NONAME
-	_Z12chartohbufc8PKcR6HBufC8 @ 3 NONAME
-	_Z12chartotbuf16PKcR6TDes16 @ 4 NONAME
-	_Z12tbuf16tocharR6TDes16Pc @ 5 NONAME
-	_Z12tbuf8towcharR5TDes8Pw @ 6 NONAME
-	_Z12tbufC8tocharR6TDesC8Pc @ 7 NONAME
-	_Z12wchartotbuf8PKwR5TDes8 @ 8 NONAME
-	_Z13chartohbufc16PKcR7HBufC16 @ 9 NONAME
-	_Z13tbuf16towcharR6TDes16 @ 10 NONAME
-	_Z13tbufC16tocharR7TDesC16Pc @ 11 NONAME
-	_Z13tbufC8towcharR6TDesC8Pw @ 12 NONAME
-	_Z13wchartohbufc8PKwR6HBufC8 @ 13 NONAME
-	_Z13wchartotbuf16PKwR6TDes16 @ 14 NONAME
-	_Z14tbufC16towcharR7TDesC16Pw @ 15 NONAME
-	_Z14wchartohbufc16PKwR7HBufC16 @ 16 NONAME
-	_Z15createMsgBufferPcS_S_S_i @ 17 NONAME
-
--- a/imservices/ossprotocoladaptation/dataconvlib/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Generic string utility Apis to convert SYMBIAN descriptors
-*		 to standard C character/Wide-character strings and Viceversa
-*
-*/
-
-
-PRJ_PLATFORMS
-WINSCW
-ARMV5
-
-
-
-PRJ_MMPFILES
-stringutils.mmp
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/dataconvlib/group/stringutils.mmp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Generic string utility Apis to convert SYMBIAN descriptors
-*		 		 to standard C character/Wide-character strings and Viceversa
-*
-*/
-
-
-#include<platform_paths.hrh>
-TARGET          opencstringutilslib.dll 
-TARGETTYPE      dll
-UID             0x1000008D 0x2001241C
-
-CAPABILITY      ALL -TCB
-VENDORID     	VID_DEFAULT
-
-VERSION      10.0
-
-SOURCEPATH      ../src
-//Sourcefile
-SOURCE          stringutils.cpp
-
-USERINCLUDE     ../inc 
-
-
-
-MW_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-
-LIBRARY         	euser.lib
-LIBRARY         	libc.lib
-
-LANG            	SC
-
-
--- a/imservices/ossprotocoladaptation/dataconvlib/inc/stringutils.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:   	Header file for stringutils
-*
-*/
-
-#ifndef __STRINGUTILS_H__
-#define __STRINGUTILS_H__
-
-/** @file stringutils.h
- * stringutils is a DLL that exports some set of genaralized APIs using which 
- * user can convert the SYMBIAN descriptors to standard C character/wide-character
- * strings and vice-versa
- */
-
-//Symbian Headers
-#include <e32cmn.h>
-#include <wchar.h>
-
-/**
-  * Aliases : Cconverting HBufC variants to char/wchar_t strings involves
-  * similiar procedure to that of converting TBufC variants to  char/wchar_t strings.
-  * Hence HBufC to char/wchar_t conversion Apis are aliased to their corresponding TBufC 
-  * counterparts
-  */
-
-
-/**
-  * Alias to the function tbufC16towchar
-  */
-#define hbufC16towchar	tbufC16towchar
-/**
-  * Alias to the function tbufC16tochar
-  */
-#define hbufC16tochar	tbufC16tochar
-/**
-  * Alias to the function tbufC8towchar
-  */
-#define hbufC8towchar	tbufC8towchar
-/**
-  * Alias to the function tbufC8tochar
-  */
-#define hbufC8tochar	tbufC8tochar
-
-		
-//Function prototypes
-
-/** Functions to convert SYMBIAN descriptors to C character and
-  * Wide-Character strings 
-  */
-
-/**
-  * This Api converts the tbuf16 to a wide-character string
-  * @param aArg TDes object
-  * @return	a pointer to a wide-character string
-  */
-IMPORT_C wchar_t* tbuf16towchar(TDes& aArg);
-
-/**
-  * This Api converts the tbuf8 to a character string
-  * @param aArg TDes8 object
-  * @return	a pointer to a character string
-  */
-IMPORT_C char* tbuf8tochar(TDes8& aArg);
-
-/**
-  * This Api converts the tbuf16 to a character string. It is user
-  * responsibality to allocate a required size of char object. Api may
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc TDes16 object
-  * @param 		aDes character pointer, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int tbuf16tochar(TDes& aSrc, char* aDes);
-	
-/**
-  * This Api converts the tbuf8 to a wide-character string. It is user
-  * responsibality to allocate a required size of wide-char object. Api	may
-  * resulting in crash, if the destination object size is smaller than that 
-  * of the source.
-  * @param 		aSrc TDes8 object
-  * @param 		aDes wide-character pointer, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int tbuf8towchar(TDes8& aSrc, wchar_t* aDes);
-	
-/**
-  * This Api converts the tbuf16 to a wide-character string. It is user
-  * responsibality to allocate a required size of wide-char object. Api may
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc TDes16 object
-  * @param 		aDes wide-character pointer, to which the resultant string will be copied.
-  * @return		none
-  */
-IMPORT_C void tbufC16towchar(TDesC& aSrc ,wchar_t* aDes);
-
-  
- /**
-  * This Api converts the tbufC8 to a character string. It is user 
-  * responsibality to allocate a required size of wide-char object. Api may
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc TDesC8 object
-  * @param 		aDes character pointer, to which the resultant string will be copied.
-  * @return		none
-  */
-  
-IMPORT_C void tbufC8tochar(TDesC8& aSrc, char* aDes);
-
-/**
-  * This Api converts the TBufC16 to a character string. It is user
-  *	responsibality to allocate a required size of wide-char object. Api may
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc TDesC object
-  * @param 		aDes character pointer, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int tbufC16tochar(TDesC& aSrc, char* aDes);
-	
-	
-/**
-  * This Api converts the TBufC8 to a wide-character string. It is user 
-  * responsibality to allocate a required size of wide-char object. Api may
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  *	@param 		aSrc TDesC8 object
-  * @param 		aDes wide-character pointer, to which the resultant string will be copied.
-  *	@return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int tbufC8towchar(TDesC8& aSrc, wchar_t* aDes);
-
-
-/**
-  * Functions to convert C character and
-  * Wide-Character strings to SYMBIAN descriptors 
-  */
-
-/**
-  * This Api converts the wide-char to a TBuf16. It is user responsibality 
-  * to allocate a required size of TBuf16 object. Api may	resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc wide-character pointer.
-  * @param 		aDes TBuf16 object, to which the resultant string will be copied.
-  * @return		none
-  */
-IMPORT_C void wchartotbuf16(const wchar_t *aSrc, TDes16& aDes);
-	
-
- /**
-  * This Api converts the char to a TBuf16. It is user responsibality 
-  * to allocate a required size of TBuf16 object. Api may	resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc character pointer.
-  * @param 		aDes TBuf16 object, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int chartotbuf16(const char* aSrc, TDes16& aDes);
-	
-/**
-  * This Api converts the wide-char string to a TBuf8. It is user 
-  * responsibality to allocate a required size of TBuf8 object. Api may
-  *	resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc 	wide-character pointer.
-  * @param 		aDes	TBuf8 object, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int wchartotbuf8(const wchar_t* aSrc, TDes8& aDes);
-
-
- /*
-  * This Api converts the character string to a TBuf8. It is user 
-  *	responsibality to allocate a required size of TBuf8 object. Api may	
-  * resulting in crash, if the destination object size is smaller than
-  * that of the source.
-  * @param 		aSrc character pointer.
-  * @param 		aDes TBuf8 object, to which the resultant string will be copied.
-  *	@return		none
-  */
-IMPORT_C void chartotbuf8(const char* aSrc, TDes8& aDes);
-
-
- /**
-  * This Api converts the wide-char to a HBufC16. It is user responsibality 
-  * to allocate a required size of HBufC16 object. Api may resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc wide-character pointer.
-  * @param 		aDes HBufC16 object, to which the resultant string will be copied.
-  * @return		none
-  */
-IMPORT_C void wchartohbufc16(const wchar_t* aSrc, HBufC16& aDes);
-	
-
- /**
-  * This Api converts the char to a HBufC16. It is user responsibality 
-  * to allocate a required size of HBufC16 object. Api may resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc character pointer.
-  * @param 		aDes HBufC16 object, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int chartohbufc16(const char* aSrc, HBufC16& aDes);
-	
-/**
-  * This Api converts the wide-char to a HBufC8. It is user responsibality 
-  * to allocate a required size of HBufC8 object. Api may resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc wide-character pointer.
-  * @param 		aDes HBufC8 object, to which the resultant string will be copied.
-  * @return		returns an integer value.
-  * @return		Api returns -1 in case of any error.
-  */
-IMPORT_C int wchartohbufc8(const wchar_t* aSrc, HBufC8& aDes);
-
-  
- /*
-  * This Api converts the char to a HBufC8. It is user responsibality 
-  * to allocate a required size of HBufC8 object. Api may resulting in crash,
-  * if the destination object size is smaller than	that of the source.
-  * @param 		aSrc character pointer.
-  * @param 		aDes HBufC8 object, to which the resultant string will be copied.
-  * @return		none
-  */
-IMPORT_C void chartohbufc8(const char* aSrc, HBufC8& aDes);
-
-
-	
-#endif //__STRINGUTILS_H__
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/dataconvlib/sis/stringutils_lib.pkg	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-;
-; Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:  Installation file for OpenCStringUtilitiesLibEx Library
-;
-&EN
-
-;packet-header (name, uid, major, minor, build, type)
-#{"StringUtils Library"},(0xA0001321),1,0,6371, TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-;Supports Series 60 v3.0
-;This line indicates that this installation is for the Series 60 platform v3.0
-;This line must appear _exactly_ as shown below in the sis file
-;If this line is missing or incorrect, the sis file will not be able
-;to be installed on Series 60 v2.0 platforms
-[0x101F7961], 0, 0, 0, {"Series60ProductID"}
-
-;copy any data files if you have
-
-;Files to install
-"\epoc32\release\armv5\urel\OpenCStringUtilitiesLibEx.dll"               - "!:\sys\bin\OpenCStringUtilitiesLibEx.dll"
-
-
--- a/imservices/ossprotocoladaptation/dataconvlib/src/stringutils.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Source file for stringutils
-*
-*/
-
-
-// GCCE header
-//#ifdef __GCCE__
-//#include <staticlibinit_gcce.h>
-//#endif //__GCCE__
-
-//System headers
-#include <string.h>
-#include <stdlib.h>
-
-//User-definied headers
-#include "stringutils.h"
-
-
-EXPORT_C wchar_t* tbuf16towchar(TDes& aArg)
-{
-	return (wchar_t*)aArg.PtrZ();
-}
-	
-EXPORT_C char* tbuf8tochar(TDes8& aArg)
-{
-	return (char*)aArg.PtrZ();
-}
-
-EXPORT_C int tbuf16tochar(TDes& aSrc, char* aDes)
-{
-	const TUint16 *wideString = aSrc.PtrZ();
-	
-	TInt ret = wcstombs(aDes, (const wchar_t*)wideString, KMaxFileName );
-	
-	return ret;
-}
-
-EXPORT_C int tbuf8towchar(TDes8& aSrc  ,wchar_t* aDes)
-{
-	const char *charString = (const char*)aSrc.PtrZ();
-	
-	TInt ret = mbstowcs(aDes, charString, KMaxFileName );
-	
-	return ret;
-}
-	
-	
-EXPORT_C void tbufC16towchar(TDesC& aSrc ,wchar_t *aDes)
-{
-	wchar_t *temp = (wchar_t*)aSrc.Ptr();
-	const TInt size = aSrc.Size();
-	*(temp + size/2 ) = L'\0';
-	wcscpy(aDes, temp);
-}
-
-EXPORT_C void tbufC8tochar(TDesC8& aSrc, char* aDes)
-{
-	char *temp = (char*)aSrc.Ptr();
-	const TInt size = aSrc.Length();
-	*(temp + size) = '\0';
-	strcpy(aDes, temp);
-}
-	
-EXPORT_C int tbufC16tochar(TDesC& aSrc, char* aDes)
-{
-	TUint16* wideString = (TUint16*)aSrc.Ptr();
-	const TInt size = aSrc.Length();
-	*(wideString + size) = L'\0';
-	
-	
-	TInt ret = wcstombs(aDes, (const wchar_t*)wideString, size*2 );
-	return ret;	
-}
-
-
-EXPORT_C int tbufC8towchar(TDesC8& aSrc, wchar_t* aDes)
-{
-	TUint8* charString = (TUint8*)aSrc.Ptr();
-	const TInt size = aSrc.Length();
-	*(charString + size) = '\0';
-	
-	TInt ret = mbstowcs(aDes, (const char*)charString, KMaxFileName );
-	return ret;
-}
-
-EXPORT_C void wchartotbuf16(const wchar_t *aSrc, TDes16 &aDes)
-{
-	aDes = (const TUint16*)aSrc;
-}
-
-EXPORT_C  int chartotbuf16(const char *aSrc, TDes16 &aDes)
-{
-	int len = strlen(aSrc);
-	wchar_t *buf = new wchar_t[len];
-	
-	TInt ret = mbstowcs(buf, (const char*)aSrc, len + 1 );
-	
-	if( ret != -1)
-		aDes = (const TUint16*)buf;
-	
-	delete buf;
-	return ret;
-}
-
-EXPORT_C int wchartotbuf8(const wchar_t *aSrc, TDes8 &aDes)
-{
-	int len = wcslen(aSrc);
-	char *buf = new char[len];
-	
-	TInt ret = wcstombs(buf, (const wchar_t*)aSrc, len + 1);
-	
-	if( ret != -1)
-		aDes = (const TUint8*)buf;
-	
-	delete buf;
-	return ret;
-}
-	
-EXPORT_C  void chartotbuf8 (const char *aSrc, TDes8 &aDes)
-{
-	aDes = (const TUint8*)aSrc;
-}
-
-EXPORT_C  void wchartohbufc16 (const wchar_t* aSrc ,HBufC16& aDes )
-{
-	aDes = (const TUint16*)aSrc;		
-}
-	
-EXPORT_C int chartohbufc16(const char* aSrc, HBufC16& aDes)
-{	
-	int len = strlen(aSrc);
-	wchar_t *buf = new wchar_t[len];
-	
-	TInt ret = mbstowcs(buf, (const char*)aSrc, len + 1);
-	
-	if( ret != -1)
-		aDes = (const TUint16*)buf;
-	
-	delete buf;
-	return ret;
-}
-	
-EXPORT_C void chartohbufc8(const char* aSrc, HBufC8& aDes)
-{
-	aDes = (const TUint8*)aSrc;
-}
-	
-EXPORT_C int wchartohbufc8(const wchar_t* aSrc, HBufC8& aDes)
-{
-	int len = wcslen(aSrc);
-	char *buf = new char[len];
-	
-	TInt ret = wcstombs(buf, aSrc, len + 1 );
-	
-	if( ret != -1)
-		aDes = (const TUint8*)buf;
-	
-	delete buf;
-	return ret;
-}
-
-
-	
-// End of file
--- a/imservices/ossprotocoladaptation/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Build information file for project ossprotocoladaptation
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW
-ARMV5
-
-PRJ_EXPORTS
-../rom/ossprotocoladaptation.iby						 	CORE_MW_LAYER_IBY_EXPORT_PATH(ossprotocoladaptation.iby)
-../../data/200195A9.txt 											/epoc32/data/Z/private/10202be9/200195A9.txt				//temporary
-../../data/200195A9.txt 											/epoc32/release/winscw/udeb/Z/private/10202be9/200195A9.txt	//temporary
-
-
-PRJ_MMPFILES
-
-../dataconvlib/group/stringutils.mmp
-ossprotocoladaptation.mmp
-
-
-
-PRJ_TESTMMPFILES
-
-PRJ_TESTEXPORTS
--- a/imservices/ossprotocoladaptation/group/ossprotocoladaptation.mmp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +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:  Project definition file for OSSProtocolAdaptation
-*
-*/
-
-// To get the MW_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-#include "../inc/ossprotocoladaptationuids.h"
-
-TARGET          ossprotocoladaptation.dll
-TARGETTYPE      Plugin
-UID             KEComRecognitionDllUid2  KEComRecognitionDllUid3   
-VENDORID        VID_DEFAULT
-CAPABILITY      CAP_ECOM_PLUGIN
-
-VERSION      10.0
-
-EPOCALLOWDLLDATA
-
-EPOCHEAPSIZE	0x100000 0x200000
-START RESOURCE  ../rss/ossprotocoladaptation.rss
-TARGET          ossprotocoladaptation.rsc
-END
-
-
-SOURCEPATH      ../src
-SOURCE			cossprotocolsearchfeatures.cpp
-SOURCE 			cossprotocolplugin.cpp
-SOURCE 			cossprotocolconnection.cpp
-SOURCE      	cossprotocolpresencefeatures.cpp
-SOURCE      	cossprotocolconnectionmanager.cpp
-SOURCE			cossprotocolloginrequest.cpp
-SOURCE			cossprotocollogoutrequest.cpp
-SOURCE			cossprotocolimfeatures.cpp
-SOURCE			waittimer.cpp
-SOURCE			cosssenddataoperation.cpp
-SOURCE			cossprotocolservererrorhandler.cpp
-SOURCE			cosscontactmanager.cpp
-
-//utils
-SOURCE			ossprotocoladaptutils.cpp
-// for logs
-SOURCE      	ossprotocolpluginlogger.cpp
-// presentity groups source
-SOURCEPATH      ../src/presentitygroups
-SOURCE      	cossprotocolpresentitygroups.cpp
-SOURCE      	csubscribepresentitygroupcontentrequest.cpp
-SOURCE      	caddpresentitygroupmemberrequest.cpp
-SOURCE      	cremovepresentitygroupmemberrequest.cpp
-SOURCE      	caddcontactnotificationhandler.cpp
-SOURCE          ccontactsynchandler.cpp
-// ---------------------------------------------------------------------------
-SOURCEPATH      ../src/presencepublishing
-// ---------------------------------------------------------------------------
-SOURCE			cossprotocolpresencepublishing.cpp
-SOURCE			cpresencenotificationhandler.cpp
-SOURCE			cpublishownpresencerequest.cpp
-
-// ---------------------------------------------------------------------------
-SOURCEPATH      ../src/presenceauthorization
-// ---------------------------------------------------------------------------
-SOURCE			cossprotocolpresenceauthorization.cpp
-SOURCE			csubscribepresencegrantrequestlistrequest.cpp
-SOURCE			cpresenceauthuserrequest.cpp
-SOURCE			cwithdrawpresencegrantfrompresentityrequest.cpp
-// Im operations source
-SOURCEPATH      ../src/im
-SOURCE      	cossprotocolimconversation.cpp
-SOURCE      	cosssendmessagerequest.cpp
-SOURCE      	creceivemessagehandler.cpp
-
-SOURCEPATH      ../src/processlauncher
-SOURCE			processlaunher.cpp
-
-// ---------------------------------------------------------------------------
-SOURCEPATH      ../src/search
-// ---------------------------------------------------------------------------
-SOURCE			cossprotocolsearch.cpp
-SOURCE			csearchrequest.cpp
-SOURCE			csearchkeystore.cpp
-SOURCE			csearchgetsearchkeys.cpp
-
-// user includes
-USERINCLUDE     ../inc/search
-USERINCLUDE     .
-USERINCLUDE     ../inc
-USERINCLUDE     ../inc/presentitygroups
-USERINCLUDE     ../inc/im
-USERINCLUDE     ../inc/processlauncher
-USERINCLUDE     ../inc/presencepublishing
-USERINCLUDE     ../inc/presenceauthorization
-USERINCLUDE     ../dataconvlib/inc
-
-USERINCLUDE       ../../xmppsettingsfetcher/inc
-
-// Default system include paths for middleware layer modules.
-APP_LAYER_SYSTEMINCLUDE
-OS_LAYER_LIBC_SYSTEMINCLUDE
-OS_LAYER_GLIB_SYSTEMINCLUDE
-OS_LAYER_SSL_SYSTEMINCLUDE
-OS_LAYER_STDCPP_SYSTEMINCLUDE
-OS_LAYER_DBUS_SYSTEMINCLUDE
-SYSTEMINCLUDE   	/epoc32/include/ecom 
-
-
-
-
-
-LIBRARY         euser.lib   
-LIBRARY         ecom.lib
-LIBRARY         flogger.lib
-LIBRARY         bafl.lib
-LIBRARY			jabbersettings.lib
-LIBRARY			xmppsettingsfetcher.lib
-
-LIBRARY         libc.lib
-LIBRARY			estor.lib 
-LIBRARY         efsrv.lib
-LIBRARY         apparc.lib  
-LIBRARY			opencmessagequeuelibrary.lib
-LIBRARY			opencstringutilslib.lib
-LIBRARY			inetprotutil.lib 
-
-LIBRARY     	serviceprovidersettings.lib
-LIBRARY     	centralrepository.lib
-LIBRARY     	estlib.lib
-LIBRARY         presencecacheclient2.lib
-LIBRARY         presencecacheutils.lib
-
-// End of file
--- a/imservices/ossprotocoladaptation/inc/cosscontactmanager.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2007-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:  contact manager
-*
-*/
-
-#ifndef __COSSCONTACTMANAGER_H__
-#define __COSSCONTACTMANAGER_H__
-
-#include <e32base.h>
-
-
-class MOSSProtocolConnectionManager;
-/**
- * COSSContactManager
- *
- */
-NONSHARABLE_CLASS ( COSSContactManager ) : public CBase       
-    {
-
-    public:
-
-        static COSSContactManager* NewL(MOSSProtocolConnectionManager& aConnMan);
-        ~COSSContactManager();
-
-
-    private:
-
-        COSSContactManager(MOSSProtocolConnectionManager& aConnMan);
-        void ConstructL();
-        
-    public:
-        /**
-         *  get iFetchContactsFirstTime         
-         */
-        TBool IsFetchContactsFirstTime();
-        /**
-         *  iFetchInvitationsFirstTime         
-         */
-        TBool IsFetchInvitationsForFirstTime();
-        /**
-         *  Set iFetchContactsFirstTime 
-         *  @param value to be set
-         */
-        void SetFetchContactsFirstTime(TBool aValue);
-        /**
-         *  Set iFetchInvitationsFirstTime
-         *  @param value to be set
-         */
-        void SetFetchInvitationsForFirstTime(TBool aValue);
-        /**
-         *  Get reference to iContacts 
-         *  @param iContacts
-         */
-        RPointerArray<HBufC>& GetContactsListL();
-
-        /**
-         *  Get reference to iInvitationList 
-         *  @param return iInvitationList
-         */
-        RPointerArray<HBufC>& GetInvitationListL();
-        /**
-         *  give list of invitations to ximp fw and client side ui
-         *  
-         */
-        void ReturnInvitationListL();
-        /**
-         *  give list of current member and remote pending contacts to ximp fw and client side ui
-         *  
-         */
-        void ReturnContactsListL();
-        /**
-         *  remove a contact from the local copy of iContacts 
-         *  @param aContactName to be removed
-         */
-        void RemoveContactFromLocalL(const TDesC& aContactName);
-        /**
-         *  add a contact to the local copy of iContacts 
-         *  @param aContactName to be added
-         */
-        void AddContactToLocalL(const TDesC& aContactName);        
-        /**
-         *  remove a invitation from the local copy of iInvitationList 
-         *  @param aContactName to be removed from the invitation list
-         */
-        void RemoveInvitationFromLocalL(const TDesC& aContactName);
-        
-    private:
-        
-        /**
-         * Oss Protocol Plugin Contact Manager
-         * Not own.  *** Write "Not own" if some other class owns this object.
-         */
-        MOSSProtocolConnectionManager& iConnMan;
-        
-        /**
-         * stores if fetching contacts for the first time value
-         * Own
-         */
-        TBool iFetchContactsFirstTime ;
-        /**
-         * stores if fetching invitations for the first time value
-         * Own
-         */
-        TBool iFetchInvitationsFirstTime ;
-        /**
-         * current contacts. to maintain local copy of current contacts
-         * own
-         */
-        RPointerArray<HBufC>   iContacts;
-
-        /**
-         * local copy of pending contacts or invitations
-         * own
-         */
-        RPointerArray<HBufC>  iInvitationList;        
-        
-    };
-
-#endif // __COSSCONTACTMANAGER_H__
-
-// End of File
-
-
--- a/imservices/ossprotocoladaptation/inc/cossprotocolconnection.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss plugin implementation for XIMP Framework
-*
-*/
-
-
-#ifndef __COSSPROTOCOLCONNECTION_H__
-#define __COSSPROTOCOLCONNECTION_H__
-
-//#include "OSSProtocloLiterals.h"
-
-#include <e32base.h>
-#include <e32def.h>
-#include <e32std.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpprotocolconnection.h>
-
-
-// FORWARD DECLARATIONS
-
-class MXIMPServiceInfo;
-
-class MXIMPContextClientInfo;
-
-class MXIMPProtocolConnection;
-
-class COSSProtocolConnectionManager;
-
-class COSSProtocolLogoutRequest;
-
-class COSSProtocolLoginRequest;
-
-class COSSProtocolPresenceFeatures;
-
-class COSSProtocolImFeatures;
-class COSSProtocolSearchFeature;
-/**
- * COSSProtocolConnection
- *
- * OSS Protocol Connection Object. Protocol Connection Object has connection Manager.
- *
- *
- *
- */
-
-class COSSProtocolConnection :
-			public CBase,
-			public MXIMPProtocolConnection
-	{
-
-	public:
-
-		static COSSProtocolConnection* NewL ( const MXIMPServiceInfo& aServiceInfo,
-		                                      const MXIMPContextClientInfo& aClientCtxInfo );
-
-
-		~COSSProtocolConnection();
-		
-		
-			
-		void ReleaseConnectionL();
-
-
-	private:
-
-		COSSProtocolConnection();
-
-
-		void ConstructL ( const MXIMPServiceInfo& aServiceInfo,
-		                  const MXIMPContextClientInfo& aClientCtxInfo );
-
-
-	public: // from MXIMPBase
-
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		TAny* GetInterface ( TInt32 aInterfaceId,
-		                     TIfGetOps  aOptions );
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		const TAny* GetInterface ( TInt32 aInterfaceId,
-		                           TIfGetOps  aOptions ) const;
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		TInt32 GetInterfaceId() const;
-		
-	
-	public: // from MXIMPProtocolConnection
-
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		void PrimeHost ( MXIMPProtocolConnectionHost& aHost );
-
-		/**
-		 * @see MXIMPProtocolConnection
-		 */		void OpenSessionL ( const MXIMPContextClientInfo& aClientCtxInfo,
-		                    TXIMPRequestId aOpId );
-        
-        /**
-		 * @see MXIMPProtocolConnection
-		 */
-		void OpenSessionL ( const TInt& aSettingsId,
-		                    TXIMPRequestId aReqId );
-	
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		void OpenSessionL (
-		    const MXIMPContextClientInfo& aContextClient,
-		    const TInt& aSettingsId,
-		    TXIMPRequestId aReqId );
-        
-        /**
-		 * @see MXIMPProtocolConnection
-		 */
-		void CloseSession ( const MXIMPContextClientInfo& aClientCtxInfo,
-		                    TXIMPRequestId aOpId );
-		
-		/**
-		 * @see MXIMPProtocolConnection
-		 */
-		void LogoutRequestL(TXIMPRequestId aOpId);
-        
-        /**
-		 * @see MXIMPProtocolConnection
-		 */ 
-		void ReOpenSessionsL ( TXIMPRequestId aReqId );
-        
-        /**
-		 * @see MXIMPProtocolConnection
-		 */
-		void GetSupportedFeaturesL ( CDesC8Array& aFeatures ) const;
-        
-        /**
-		 * @see MXIMPProtocolConnection
-		 */
-		MProtocolPresenceFeatures& ProtocolPresenceFeatures();
-
-        /**
-		 * @see MXIMPProtocolConnection
-		 */
-		TAny* GetProtocolInterface(TInt aInterfaceId);
-
-
-	private:    // data members
-		/**
-	     * Connection manager
-	     * OWN:
-	     */
-		COSSProtocolConnectionManager* iConnMan;
-		/**
-	     * Presence features
-	     * OWN:
-	     */
-		COSSProtocolPresenceFeatures* iPresFeatures;
-		/**
-		 * Im features
-		 * OWN:
-		 */
-		COSSProtocolImFeatures* iImFeatures;
-		/**
-		 * Search features
-		 * OWN:
-		 */
-		COSSProtocolSearchFeature*  iSearchFeatures;
-		/**
-		 * Request id
-		 * OWN:
-		 */
-		TXIMPRequestId iRequestId;
-    	/**
-		 * Stores connection count
-		 * OWN:
-		 */
-        TInt iConntectionCreated;
-
-
-	};
-
-
-#endif // __COSSPROTOCOLCONNECTION_H__
--- a/imservices/ossprotocoladaptation/inc/cossprotocolconnectionmanager.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,344 +0,0 @@
-/*
-* Copyright (c) 2007-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:  connection manager
-*
-*/
-
-#ifndef __COSSPROTOCOLCONNECTIONMANAGER_H__
-#define __COSSPROTOCOLCONNECTIONMANAGER_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <flogger.h>
-#include <ximpstatus.h>
-#include "mossprotocolconnectionmanager.h"
-#include "waittimer.h"
-#include "cpresencenotificationhandler.h"
-#include "creceivemessagehandler.h"
-#include "cossprotocolservererrorhandler.h"
-#include "caddcontactenotificationhandler.h"
-#include "cosscontactmanager.h"
-#include "msg_enums.h"
-#include <ximperrors.hrh>
-#include "csearchkeystore.h"
-
-// FORWARD DECLARATIONS
-
-class MXIMPServiceInfo;
-
-class MXIMPProtocolConnectionHost;
-
-class MOSSProtocolConnectionManager;
-
-class CXmppParameters;
-
-class CWaitTimer;
-class MProtocolImDataHost ;
-class MProtocolSearchDataHost;
-class CContactSyncHandler;
-
-_LIT(KColon,":");
-
-/**
- * COSSProtocolConnectionManager
- *
- * Every XIMPFW-OSS Connection has Connection Manager Object.
- *
- *
- */
-NONSHARABLE_CLASS ( COSSProtocolConnectionManager ) : public CBase,
-		public MOSSProtocolConnectionManager
-		// implement session status observer callback
-	{
-
-public:
-
-	static COSSProtocolConnectionManager* NewL();
-	virtual ~COSSProtocolConnectionManager();
-
-
-private:
-
-	COSSProtocolConnectionManager();
-	void ConstructL();
-
-
-public: // From MOSSProtocolConnectionManager
-	
-    /**
-	 * @see MOSSProtocolConnectionManager
-	 */
-	CXmppParameters& XmppParams();
-	
-	/**
-	 * @see MOSSProtocolConnectionManager
-	 */
-	CWaitTimer& DataHandler();
-	
-	/**
-	 * @see MOSSProtocolConnectionManager
-	 */
-	MXIMPProtocolConnectionHost& HandleToHost();
-	
-	/**
-	 * @see MOSSProtocolConnectionManager
-	 */
-	void ManufactureDataHandlerL() ;
-	
-	/**
-	 * @see MOSSProtocolConnectionManager
-	 */
-	RArray< HBufC >* PresenceAuthGrantReqList();
-	
-public: // new methods
-
-	/**
-     * set protocol connection host
-     * @param aHost protocol connection host
-     */
-	void SetHost ( MXIMPProtocolConnectionHost& aHost );
-
-	/**
-     * set connection parameters
-     * @param aUserName user account
-     * @param aPassword password
-     * @param aServiceId ,service id
-     */
-	void SetConnectionParamsL ( const TDesC& aUserName,
-	                            const TDesC& aPassword,
-	                            const TInt32 aServiceId );
-
-	 /**
-	  * set connection parameters
-	  * @param aServiceId, service id
-	  * @param aReadNedded, EFalse if need not to red from xmpp settings
-	  * @return error if any
-	  */
-	TInt SetConnectionParamsL ( const TUint32 aServiceId, TBool aReadNeeded = ETrue );
-	
-	
-	/**
-     * set protocol im data host
-     * @param aHost protocol im data host
-     */
-	void SetImHost(MProtocolImDataHost& aHost);
-	
-	/**
-     * Get protocol im data host
-     * @param aHost protocol im data host
-     */
-	MProtocolImDataHost& GetImHost() ;
-	
-	/**
-	 * Get add notification handler
-	 * @param iAddnotificationhandler 
-	 */
-	CAddContactNotificationHandler& GetAddNotificationHandler();
-	/**
-     * set protocol search data host
-     * @param aHost protocol search data host
-     */
-	void SetSearchHost(MProtocolSearchDataHost& aHost);
-	
-	/**
-     * Get protocol search data host
-     * @param aHost protocol search data host
-     */
-	MProtocolSearchDataHost& GetSearchHost() ;
-	
-	/**
-	 * Release Connection
-	 *  send killing request to isoserver
-	 */
-	void ReleaseConnectionL();
-	
-
-	/**
-	 *  return ETrue if server disconnect has happen
-	 */
-	TBool IsServerDisconnect();
-	
-	/*!	/brief Gets a handle to search key store
-	 *	/return A handle to search key store
-	 */
-	CSearchKeyStore& GetSearchKeyStore();
-		    
-public:
-
-    /**
-	 *  Get id
-	 *  @return id
-	 */
-	TInt32 IapId();
-	
-	/**
-	 *  Get username
-	 *  @return username
-	 */
-	TDesC& UserName();
-	
-	/**
-	 *  Get password
-	 *  @return password
-	 */
-	TDesC& Password();
-	
-	/**
-	 *  Get groupid
-	 *  @return groupid
-	 */
-	TDesC& GroupId();
-	/**
-	 *  Get service name
-	 *  @return servicename
-	 */
-	const TDesC& ServiceName();   	
-	/**
-	 *  Set group id
-	 *  @param group id
-	 */
-	void SetGroupIDL(TDesC& aGroupId);
-	
-	/**
-	 * gets the contactmanager
-	 * @return iContactManager
-	 */
-	COSSContactManager& GetContactManager();
-	
-	
-private: // data
-    
-    /**
-	 * Stores settings
-	 * Own
-	 */
-	CXmppParameters* iXmppParams;
-	
-	/**
-	 * REF: protocol connection host
-	 */
-	MXIMPProtocolConnectionHost* iHostHandle;
-	
-	/**
-	 * Server address:
-	 * Own
-	 */
-	HBufC* iServerAddress;
-	
-	/**
-	 * UserName:
-	 * Own
-	 */
-	HBufC* iUserName;
-	
-	/**
-	 * UserName:
-	 * Own
-	 */
-	HBufC* iPassword;
-	
-	/**
-	 * Group id:
-	 * Own
-	 */
-	HBufC* iGroupId;
-	
-	/**
-	 * wait scheduler:
-	 * Own
-	 */
-	CActiveSchedulerWait* iWaitScheduler;
-	
-	/**
-	 * wait timer:
-	 * Own
-	 */
-	CWaitTimer* iTimer;
-	
-	/**
-	 * Presence notifier:
-	 * Own
-	 */
-	CPresenceNotificationHandler* iNotifier;
-	
-	/**
-	 * Recieve message handler:
-	 * Own
-	 */
-	CReceiveMessageHandler* iRecvHandler;
-	
-	/**
-	 * Server intiated error hanlder:
-	 * Own
-	 */
-	COssprotocolServerErrorHandler* iServerErrorHandler;
-	
-	/**
-	 * Add notifications handler
-	 * Own
-	 */
-	CAddContactNotificationHandler* iAddNotificationHanlder;
-	
-	/**
-	 * Contact synchronisation handler:
-	 * Own
-	 */
-	CContactSyncHandler*    iContactSyncHandler;
-	
-	/**
-	 * stores data handler readyness value
-	 * Own
-	 */
-	TBool iIsDataHandlerReady; 
-	
-	/**
-	 * Search key store
-	 * Own
-	 */
-	CSearchKeyStore* iSearchKeyStore;
-	
-	/**
-	 * Protocol im data host
-	 * Doesn't own
-	 */
-	MProtocolImDataHost *iHost ; 
-	
-	/**
-	 * Protocl search data host
-	 * Doesn't own
-	 */
-	MProtocolSearchDataHost *iSearchHost ; 
-	
-	/**
-	 * local contact manager
-	 * own
-	 */
-	COSSContactManager* iContactManager;
-	/**
-	 * service name for presence cache updation
-	 * Own
-	 */
-	HBufC* iServiceName;	
-public:	
-    /**
-	 * Presence authorisation grant list
-	 * Doesn't own
-	 */
-	RArray< HBufC > iPresenceAuthGrantReqList;
-	
-	
-	};
-
-
-#endif // __COSSPROTOCOLCONNECTIONMANAGER_H__
--- a/imservices/ossprotocoladaptation/inc/cossprotocolimfeatures.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss presence features implementation for XIMP Framework
-*
-*/
-
-
-#ifndef __COSSPROTOCOLIMFEATURES_H__
-#define __COSSPROTOCOLIMFEATURES_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <cprotocolimfeatures.h>
-//#include <protocolimgroup.h>
-#include <protocolimconversation.h>
-#include <protocolpresentitygroups.h>
-//#include <protocoliminvitation.h>
-//#include <protocolimsearch.h>
-#include "cossprotocolconnectionmanager.h"
-
-class COSSProtocolImConversation;
-/**
- * COSSProtocolImFeatures
- *
- * OSS Protocol Connection Object. Protocol Connection Object has connection Manager.
- *
- */
-
-class COSSProtocolImFeatures :
-			public CProtocolImFeatures
-	{
-
-	public:
-
-		static COSSProtocolImFeatures* NewL ( COSSProtocolConnectionManager& aConnMan );
-
-
-		~COSSProtocolImFeatures();
-
-	private:
-
-		COSSProtocolImFeatures(COSSProtocolConnectionManager& aConnMan );
-
-
-		void ConstructL ( COSSProtocolConnectionManager& aConnMan );
-
-	public: // from MXIMPBase
-
-		TAny* GetInterface ( TInt32 aInterfaceId,
-		                     TIfGetOps  aOptions );
-
-		const TAny* GetInterface ( TInt32 aInterfaceId,
-		                           TIfGetOps  aOptions ) const;
-
-
-		TInt32 GetInterfaceId() const;
-
-	public :// From MProtocolImFeatures
-
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		MProtocolImGroup& ImGroup();
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		MProtocolImConversation& ImConversation();
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		MProtocolImInvitation& ImInvitation();
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		MProtocolImSearch& ImSearch();
-		/**
-		 * @see MProtocolImFeatures
-		 */
-		void SetHost(MProtocolImDataHost& aHost );
-		
-	    TInt SupportedSubInterfaces() const;
-
-	private : //data members
-		/**
-		* im conversation
-		* Own:
-		*/
-		COSSProtocolImConversation* iImConversation;
-
-		/**
-		* Protocol im data hodt
-		* Not own:
-		*/
-		MProtocolImDataHost *iHost ; 
-		
-		/**
-	     * Connection manager
-	     * Not own:
-	     */
-		COSSProtocolConnectionManager &iConnMan ;
-	};
-
-#endif //__COSSPROTOCOLIMFEATURES_H__
-
-// end of file
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/inc/cossprotocolloginrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Login Request to the Network Server.
-*
-*/
-
-
-
-#ifndef _COSSPROTOCOLLOGINREQUEST_H_
-#define _COSSPROTOCOLLOGINREQUEST_H_
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <ximpbase.h>
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocloliterals.h"
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-class COSSProtocolConnectionManager;
-
-
-const TInt KImpsMaxResourceIdLen 	= 64;  // maximum Resource ID, this is not sure!
-
-/**
- * COSSProtocolLoginRequest
- *
- * Issue Login Request to the Network Server
- *
- */
-NONSHARABLE_CLASS (  COSSProtocolLoginRequest ) : public CActive
-
-
-	{
-
-public:
-
-	static COSSProtocolLoginRequest* NewLC ( MOSSProtocolConnectionManager& aConnMan,
-	TXIMPRequestId aRequestId );
-	static COSSProtocolLoginRequest* NewL ( MOSSProtocolConnectionManager& aConnMan,
-	                                        TXIMPRequestId aRequestId );
-	virtual ~COSSProtocolLoginRequest();
-
-
-private:
-
-	COSSProtocolLoginRequest ( MOSSProtocolConnectionManager& aConnMan,
-	                           TXIMPRequestId aRequestId  );
-	void ConstructL();
-
-
-private: // from CActive
-
-	void DoCancel();
-	/*
-	 * RunL() function also deletes the request object once the activity is done
-	 *
-	 */
-	void RunL();
-	TInt RunError ( TInt aError );
-
-private:  // new methods
-
-   /**
-	* Resource Id  Generator
-	* Leaves with KErrNotFound if no value
-	* @return ResourceId 
-	*/
-	TPtrC GenResourceId( const TDesC& aResourceId );
-public:
-
-   /**
-	* Issue login request to the isolation server
-	*/
-	void IssueLoginRequestL();
-
-
-private: // data
-
-   /**
-	* OWN:Request Id from ximpfw
-	*/
-	TXIMPRequestId iRequestId;
-   /**
-	* Send data request to pure data handler generates the id
-	*/
-	TInt iSendId;
-   /**
-    * OSS Protocol Plugin Connection Manager
-   	* Not own.
-	*/
-	MOSSProtocolConnectionManager& iConnMan;
-
-   /** 
-    * Resource ID Implementation
-   	* Not own.
-	*/
-	TBuf<KImpsMaxResourceIdLen>          iResourceId;  
-	
-	/**
-	 * Own user id
-	 */
-	HBufC* iUserName;
-	};
-
-
-#endif // _COSSPROTOCOLLOGINREQUEST_H_
-
--- a/imservices/ossprotocoladaptation/inc/cossprotocollogoutrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Logout Request to the Network Server.
-*
-*/
-
-
-
-#ifndef __COSSPROTOCOLLOGOUTREQUEST_H_
-#define __COSSPROTOCOLLOGOUTREQUEST_H_
-
-//  INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <ximpbase.h>
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocloliterals.h"
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-class COSSProtocolConnectionManager;
-
-
-/**
- * COSSProtocolLogoutRequest
- *
- * Issue Logout Request to the Network Server
- *
- */
-NONSHARABLE_CLASS (  COSSProtocolLogoutRequest ) : public CActive
-
-
-	{
-
-public:
-
-	static COSSProtocolLogoutRequest* NewLC ( MOSSProtocolConnectionManager& aConnMan,
-	TXIMPRequestId aRequestId );
-	static COSSProtocolLogoutRequest* NewL ( MOSSProtocolConnectionManager& aConnMan,
-	        TXIMPRequestId aRequestId );
-	virtual ~COSSProtocolLogoutRequest();
-
-
-private:
-
-	COSSProtocolLogoutRequest ( MOSSProtocolConnectionManager& aConnMan,
-	                            TXIMPRequestId aRequestId  );
-	void ConstructL();
-
-
-private: // from CActive
-
-	void DoCancel();
-	/*
-	 * RunL() function also deletes the request object once the activity is done
-	 *
-	 */
-	void RunL();
-	TInt RunError ( TInt aError );
-
-public:
-	/**
-	 * Issue logout request to the isolation server
-	 */
-	void IssueLogoutRequestL();
-
-
-private: // data
-
-	/**
-	 *  Request Id
-	 * OWN
-	 */
-	TXIMPRequestId iRequestId;
-	/**
-	 * OSS Protocol Plugin Connection Manager
-	 * Not own.
-	 */
-	MOSSProtocolConnectionManager& iConnMan;
-
-	/**
-	 * Send data request to pure data handler generates the id
-	 */
-	TInt iSendId;
-
-	};
-
-
-#endif // __COSSPROTOCOLLOGOUTREQUEST_H_
-
--- a/imservices/ossprotocoladaptation/inc/cossprotocolplugin.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2007-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:  adaptation for open source
-*
-*/
-
-
-#ifndef __COSSPROTOCOLPLUGIN_H__
-#define __COSSPROTOCOLPLUGIN_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpprotocolpluginbase.h>
-
-// FORWARD DECLARATIONS
-
-class MXIMPServiceInfo;
-
-class MXIMPContextClientInfo;
-
-class COSSProtocolConnection;
-
-class CProcessLauncher;
-
-
-
-
-/**
- * OSS protocol Plugin
- *
- * OSS plugin is ECOM plugin and shall be loaded by PrFw.
- * OSS has one or many connections.
- */
-
-class COSSProtocolPlugin : public CXIMPProtocolPluginBase
-	{
-
-	public:
-
-		static COSSProtocolPlugin* NewL();
-		static COSSProtocolPlugin* NewLC();
-
-		~COSSProtocolPlugin();
-
-	private:
-
-		COSSProtocolPlugin();
-		void ConstructL();
-
-	public: // From MXIMPProtocolPlugin
-	
-		/**
-		 * @see MXIMPProtocolPlugin
-		 */
-		void PrimeHost ( MXIMPProtocolPluginHost& aHost );
-        /**
-		 * @see MXIMPProtocolPlugin
-		 */
-		MXIMPProtocolConnection& AcquireConnectionL (
-		    const MXIMPServiceInfo& aServiceInfo,
-		    const MXIMPContextClientInfo& aClientCtxInfo );
-		/**
-		 * @see MXIMPProtocolPlugin
-		 */
-		void ReleaseConnection (
-		    MXIMPProtocolConnection& aConnection );
-
-	public: // from MXIMPBase
-        /**
-		 * @see MXIMPBase
-		 */
-		TAny* GetInterface (
-		    TInt32 aInterfaceId,
-		    TIfGetOps  aOptions );
-        /**
-		 * @see MXIMPBase
-		 */
-		const TAny* GetInterface (
-		    TInt32 aInterfaceId,
-		    TIfGetOps  aOptions ) const;
-        /**
-		 * @see MXIMPBase
-		 */
-		TInt32 GetInterfaceId() const;
-
-	private: // Data
-		/**
-		* Prime host
-		* Not own.
-		*/
-		MXIMPProtocolPluginHost* iHost;
-		/**
-		* protocol connections
-		* Own.
-		*/
-		RPointerArray< COSSProtocolConnection > iConnections;
-
-		/**
-		* process launcher.launches isolation server 
-		* Own.
-		*/		
-		CProcessLauncher *iIsoServerLauncher;
-
-
-	};
-
-#endif // __COSSPROTOCOLPLUGIN_H__
--- a/imservices/ossprotocoladaptation/inc/cossprotocolpresencefeatures.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss presence features implementation for XIMP Framework
-*
-*/
-
-
-#ifndef __COSSPROTOCOLPRESENCERFEATURES_H__
-#define __COSSPROTOCOLPRESENCERFEATURES_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <protocolpresencefeatures.h>
-#include <protocolpresencewatching.h>
-#include <protocolpresencepublishing.h>
-#include <protocolpresentitygroups.h>
-#include <protocolpresenceauthorization.h>
-#include "cossprotocolconnectionmanager.h"
-class COSSProtocolPresentityGroups;
-class COSSProtocolpresentitygroups;
-class COssProtocolPresencePublishing;
-class COssProtocolPresenceAuthorization;
-/**
- * COSSProtocolPresenceFeatures
- *
- * COSSProtocolPresenceFeatures provide
- * access following feature specific sub-interfaces:
- * - MProtocolPresenceWatching
- * - MProtocolPresencePublishing
- * - MProtocolPresentityGroups
- * - MProtocolPresenceAuthorization
- *
- */
-class COSSProtocolPresenceFeatures :
-                   public CBase,
-                   public MProtocolPresenceFeatures
-    {
-    	
-    public:
-    
-    	static COSSProtocolPresenceFeatures* NewL( COSSProtocolConnectionManager& aConnMan );
-
-
-    	~COSSProtocolPresenceFeatures();
-
-	private:
-
-    	COSSProtocolPresenceFeatures();
-
-
-    	void ConstructL( COSSProtocolConnectionManager& aConnMan );
-    
-    public: // from MXIMPBase
-        /**
-		 * @see MXIMPBase
-		 */
-    	TAny* GetInterface( TInt32 aInterfaceId,
-                        TIfGetOps  aOptions );
-        /**
-		 * @see MXIMPBase
-		 */
-    	const TAny* GetInterface( TInt32 aInterfaceId,
-                              TIfGetOps  aOptions ) const;
-
-        /**
-		 * @see MXIMPBase
-		 */
-    	TInt32 GetInterfaceId() const;
-    
-    public : // From MProtocolPresenceFeatures
-    
-	    /**
-		 * @see MProtocolPresenceFeatures
-		 */
-	    MProtocolPresenceWatching& PresenceWatching();
-	    /**
-		 * @see MProtocolPresenceFeatures
-		 */
-	    MProtocolPresencePublishing& PresencePublishing();
-	    /**
-		 * @see MProtocolPresenceFeatures
-		 */
-	    MProtocolPresentityGroups& PresentityGroups();
-	    /**
-		 * @see MProtocolPresenceFeatures
-		 */
-	    MProtocolPresenceAuthorization& PresenceAuthorization();
-    
-    private : //data members
-	   	 /**
-	     * presentity group
-	     * Own 
-	     */   
-	    COSSProtocolpresentitygroups*	iPresentityGroups;
-	   	 /**
-	     * presence publishing
-	     * Own 
-	     */  
-	   	COssProtocolPresencePublishing* iPresencePublishing;
-	  	 /**
-	     * presence authorisation
-	     * Own 
-	     */  
-	  	COssProtocolPresenceAuthorization* iAuthrozation;
-
-		};
-
-#endif //__COSSPROTOCOLPRESENCERFEATURES_H__
-
-// end of file
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/inc/cossprotocolsearchfeatures.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss search features implementation for XIMP Framework
-*
-*/
-
-
-#ifndef __COSSPROTOCOLSEARCHFEATURE_H__
-#define __COSSPROTOCOLSEARCHFEATURE_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <protocolsearchfeature.h>
-#include <protocolsearch.h>
-#include "cossprotocolconnectionmanager.h"
-
-
-class COSSProtocolSearch;
-
-/**
- * COSSProtocolSearchFeature
- * Provides access to subinterface MProtocolSearch 
- * and sets the search data host
- *
- */
-
-class COSSProtocolSearchFeature : public CBase,
-								  public MProtocolSearchFeature
-
-	{
-
-	public:
-
-		static COSSProtocolSearchFeature* NewL ( COSSProtocolConnectionManager& aConnMan );
-
-
-		~COSSProtocolSearchFeature();
-
-	private:
-
-		COSSProtocolSearchFeature(COSSProtocolConnectionManager& aConnMan );
-
-
-		void ConstructL ( COSSProtocolConnectionManager& aConnMan );
-
-	public: // from MXIMPBase
-
-		TAny* GetInterface ( TInt32 aInterfaceId,
-		                     TIfGetOps  aOptions );
-
-		const TAny* GetInterface ( TInt32 aInterfaceId,
-		                           TIfGetOps  aOptions ) const;
-
-
-		TInt32 GetInterfaceId() const;
-
-	public :  	// From MProtocolSearchFeature.for comments,see MProtocolSearchFeature
-
-	   /**
-		*  @see MProtocolSearchFeature
-		*/
-		MProtocolSearch& Search();
-	   /**
-		*  @see MProtocolSearchFeature
-		*/
-		void SetHost(MProtocolSearchDataHost& aSearchHost );
-
-	private : //data members
-       /**
-		* search 
-		* owned 
-		*/
-		COSSProtocolSearch* iSearch;
-		
-	   /**
-	    * connection manager
-		* not  owned 
-		*/
-		COSSProtocolConnectionManager &iConnMan ;
-	};
-
-#endif //__COSSPROTOCOLSEARCHFEATURE_H__
-
-// end of file
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/inc/cossprotocolservererrorhandler.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation of server error notification handler
-*
-*/
-
-
-#ifndef __COssprotocolServerErrorHandler_H__
-#define __COssprotocolServerErrorHandler_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-#include <presencecachewriter.h>
-#include <presencebuddyinfo.h>
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-/**
- * COssprotocolServerErrorHandler
- *
- * Handles network server intiated errors
- *
- */
-
-class COssprotocolServerErrorHandler: public CActive
-
-
-	{
-
-	public:
-
-		static COssprotocolServerErrorHandler* NewL (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		static COssprotocolServerErrorHandler* NewLC (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		virtual ~COssprotocolServerErrorHandler();
-
-	private:
-
-		COssprotocolServerErrorHandler ( MOSSProtocolConnectionManager& aConnMan );
-		void ConstructL();
-
-	private: // from CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-        /**
-		 * start listening for server intiated error signals
-		 */
-		void StartListeningL();
-        /**
-		 * Handles the recieved error signal
-		 */
-		void ProcessIncomingDataL();
-
-	private: // data
-
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-	};
-
-
-#endif // __COssprotocolServerErrorHandler_H__
-
--- a/imservices/ossprotocoladaptation/inc/cosssenddataoperation.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2007-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: Send data operation holder
-*
-*/
-
-#ifndef __COSSSENDDATAOPERATION_H__
-#define __COSSSENDDATAOPERATION_H__
-
-//  INCLUDES
-#include    <e32std.h>
-#include    "ossprotocolpluginlogger.h"
-#include 	<e32base.h>
-
-
-/**
- * COssSendDataOperation:
- * Send data operation holder
- *
- */
-NONSHARABLE_CLASS ( COssSendDataOperation ) :
-		public CBase
-	{
-
-public:
-	
-	static  COssSendDataOperation* NewLC();
-
-	 /**
-	 *  Default constructor
-	 */
-	 COssSendDataOperation();
-		
-	/**
-	 *  Destructor
-	 */
-	 ~COssSendDataOperation();
-
-
-public: // new function of the class
-
-
-	/**
-	 * Set ids, operation and log id
-	 */
-	 void SetIds ( TInt aOperationId, TInt aLogId );
-	
-	/**
-	 * Set request status
-	 */
-	 void SetRequestStatus ( TRequestStatus& aStatus );
-	
-
-	/**
-	 * request status of this operation
-	 * @return Trequest status of this operation
-	 */
-	 TRequestStatus* Status();
-	
-	/**
-	 * Get Ids
-	 *
-	 * @return operation Id
-	 */
-	 TInt OperationId() const;
-	
-	/**
-	 * Complete operation
-	 *
-	 * @param aCode complete code
-	 */
-	 void CompletedOperation ( TInt aCode );
-
-	/**
-	 * Set response buffer
-	 * Owner ship is transfered
-	 * @param aBuff response buffer
-	 */
-	 void SetResponse ( char* aBuff );
-
-	/**
-	 * Response buffer,
-	 * owner ship is transfered
-	 * @return transfer buffer
-	 */
-	 char* Response();
-
-private: // Public data
-
-	/**
-	 * Status of the operation
-	 */
-	TRequestStatus*     iStatus;
-
-	/**
-	 * Operation Id
-	 * OWN
-	 */
-	TInt                iOpId;
-
-	/**
-	 * Response buffer
-	 * OWN
-	 */
-	char*             iData;
-	/**
-	 * Id used for logs writting
-	 * OWN
-	 */
-	TInt                iLogId;
-	};
-
-
-
-#endif      // __COSSSENDDATAOPERATION_H__
-
-// End of File
--- a/imservices/ossprotocoladaptation/inc/cuserafter.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +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:  Active object based wait.
-*
-*/
-
-#ifndef CUSERAFTER_H__
-#define CUSERAFTER_H__
-
-// INCLUDES
-#include <e32base.h>
-
-
-// CLASS DESCRIPTION
-
-/**
- * Active object based wait.
- *
- * Similar like User::After() but doesn't block
- * whole thread, but current RunL() with
- * CActiveSchedulerWait.
- */
-
-class CUserAfter : public CTimer
-	{
-
-	public: //Construction
-		static inline CUserAfter* NewL();
-		static inline CUserAfter* NewLC();
-		~CUserAfter();
-
-
-	public: //Wait support
-
-		/**
-		 * Static "one shot" wait method.
-		 */
-		static inline void AfterL ( TInt aWaitTimeMicroSeconds );
-
-		/**
-		 * Member wait method.
-		 */
-		inline void After ( TInt aWaitTimeMicroSeconds );
-
-
-	private:
-		CUserAfter();
-
-		void RunL();
-		void RunError();
-		void DoCancel();
-
-
-	private:    //data
-	    
-	    /**
-	     * ActiveSchedulerWait
-	     * Own
-	     */
-		CActiveSchedulerWait iWait;
-
-	};
-
-
-
-
-// -----------------------------------------------------------------------------
-// CUserAfter public functions
-// -----------------------------------------------------------------------------
-//
-inline CUserAfter* CUserAfter::NewL()
-	{
-	CUserAfter* self = CUserAfter::NewLC();
-	CleanupStack::Pop ( self );
-	return self;
-	}
-
-inline CUserAfter* CUserAfter::NewLC()
-	{
-	CUserAfter* self = new ( ELeave ) CUserAfter();
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	return self;
-	}
-
-
-inline CUserAfter::~CUserAfter()
-	{
-	CTimer::Cancel();
-	}
-
-inline void CUserAfter::After ( TInt aWaitTimeMicroSeconds )
-	{
-	CTimer::After ( aWaitTimeMicroSeconds );
-	iWait.Start();
-	}
-
-
-inline void CUserAfter::AfterL ( TInt aWaitTimeMicroSeconds )
-	{
-	CUserAfter* after = CUserAfter::NewL();
-	after->After ( aWaitTimeMicroSeconds );
-	delete after;
-	}
-
-
-
-// -----------------------------------------------------------------------------
-// CUserAfter private functions
-// -----------------------------------------------------------------------------
-//
-inline CUserAfter::CUserAfter()
-		: CTimer ( CActive::EPriorityStandard )
-	{
-	CActiveScheduler::Add ( this );
-	}
-
-
-inline void CUserAfter::RunL()
-	{
-	iWait.AsyncStop();
-	Cancel();
-	}
-
-inline void CUserAfter::RunError()
-	{
-	}
-
-inline void CUserAfter::DoCancel()
-	{
-	iWait.AsyncStop();
-	CTimer::DoCancel();
-	}
-
-
-#endif // CUSERAFTER_H__
-
-// End of File
-
--- a/imservices/ossprotocoladaptation/inc/im/cossprotocolimconversation.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss protocol im conversation 
-*
-*/
-
-#ifndef COSSPROTOCOLIMCONVERSATION_H__
-#define COSSPROTOCOLIMCONVERSATION_H__
-
-
-#include <e32base.h>
-#include <protocolimconversation.h>
-
-
-class MOSSProtocolConnectionManager;
-
-
-/**
- * COSSProtocolImConversation
- * implements MProtocolImConversation methods
- * these methods will called by ximp framework 
- */
-class COSSProtocolImConversation :   public CBase,
-                                        public MProtocolImConversation
-    {
-
-public:
-
-    static COSSProtocolImConversation* NewL( MOSSProtocolConnectionManager& aConnManager );
-    ~COSSProtocolImConversation();
-
-
-private:
-
-    COSSProtocolImConversation( MOSSProtocolConnectionManager& aConnManager );
-    void ConstructL();
-
-public:  //from MXIMPBase
-
-	/**
-	 * @see MXIMPBase
-	 */
-    TAny* GetInterface( TInt32 aInterfaceId,
-                        TIfGetOps  aOptions );
-	/**
-	 * @see MXIMPBase
-	 */
-    const TAny* GetInterface( TInt32 aInterfaceId,
-                              TIfGetOps aOptions ) const;
-
-	/**
-	 * @see MXIMPBase
-	 */
-    TInt32 GetInterfaceId() const;
-
-public: // From MProtocolImConversation
-    /**
-	 * @see MProtocolImConversation
-	 */
-    void DoSendMessageL( 
-              const MImConversationInfo& aImMessage,
-              TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolImConversation
-	 */          
-    void DoForwardMessageL(
-              const MImConversationInfo& aImMessage,
-              TXIMPRequestId aReqId);
-    /**
-	 * @see MProtocolImConversation
-	 */
-    void DoSendMessageToGroupL( 
-    					const MImConversationInfo& aImMessage,
-    					const TDesC* aGroupId,TXIMPRequestId aReqId );
-	/**
-	 * @see MProtocolImConversation
-	 */
-	TXIMPRequestId DoBlockUsersL(
-        		const MDesCArray* aUserIds,
-        		TXIMPRequestId aReqId);
-	/**
-	 * @see MProtocolImConversation
-	 */
-	TXIMPRequestId DoUnBlockUsersL(
-        	const MDesCArray* aUserIds,
-        	TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolImConversation
-	 */
-    void DoGetBlockedListRequestL( 
-    					const MXIMPIdentity& aImMessageId,
-	    				TXIMPRequestId aReqId );	        
-	/**
-	 * @see MProtocolImConversation
-	 */
-	void DoGetMessageListL( 
-						const MXIMPIdentity& aImMessageId,
-	 					const TDesC* aGroupId,
-						const TInt aMessageCount,
-						TBool aDeliveryReportWanted,
-						TXIMPRequestId aReqId);
-	/**
-	 * @see MProtocolImConversation
-	 */
-	void DoRejectMessageL( 
-						const MXIMPIdentity& aImMessageId,
-						const TDesC& aMessageID,
-						TXIMPRequestId aReqId );			
-private:
-	/**
-     * Creates data handler
-     */
-	void CreateDataHandlerL();
-	
-private:    // data members
-		/**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-
-    };
-
-#endif // COSSPROTOCOLIMCONVERSATION_H__
--- a/imservices/ossprotocoladaptation/inc/im/cosssendmessagerequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss Protocol send massage request
-*
-*/
-
-
-#ifndef __COSSSENDMESSAGEREQUEST_H__
-#define __COSSSENDMESSAGEREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocloliterals.h"
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-class MImConversationInfo;
-/**
- * COSSSendMessageRequest
- *
- * Issue Send Message Request to Network Server
- *
- */
-
-class COSSSendMessageRequest: public CActive
-
-
-	{
-
-	public:
-
-		static COSSSendMessageRequest* NewL (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId );
-
-		static COSSSendMessageRequest* NewLC (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId );
-
-		virtual ~COSSSendMessageRequest();
-
-	private:
-
-		COSSSendMessageRequest (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId  );
-		void ConstructL();
-
-	private: // from CActive
-
-		void DoCancel();
-		/*
-		 * RunL() function also deletes the request object once the activity is done
-		 *
-		 */
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-		/**
-		  * Send message to the recipients
-		  * @param aImMessage stucture stores message,recipients
-		*/
-		void SendMessageL ( const MImConversationInfo& aImMessage );
-
-	private: // data
-
-		/**
-		 * Request Id from ximpfw
-		 */
-		TXIMPRequestId iRequestId;
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-	    /**
-		 * list id
-		 * Own
-		 */
-		HBufC16* iListId;
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-	};
-
-
-#endif // __COSSSENDMESSAGEREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/im/creceivemessagehandler.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation of reicive message handler
-*
-*/
-
-
-#ifndef __CRECEIVEMESSAGEHANDLER_H__
-#define __CRECEIVEMESSAGEHANDLER_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-/**
- * CReceiveMessageHandler
- *
- *  Handles the messages recieved.
- *  updates imfeature plugin data model and
- *  triggers event
- *
- */
-
-class CReceiveMessageHandler: public CActive
-
-
-	{
-
-	public:
-
-		static CReceiveMessageHandler* NewL (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-
-		virtual ~CReceiveMessageHandler();
-
-	private:
-
-		CReceiveMessageHandler ( MOSSProtocolConnectionManager& aConnMan );
-		void ConstructL();
-	
-	private: // from CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-        
-    	/**
-		 * start listening recieved massages
-		 */    
-		void StartListeningL();
-    	/**
-		 * parse the data and update the data cache of ximp.send event back to ximp
-		 */
-		void ProcessIncomingDataL();
-
-	private: // data
-
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-		
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-	};
-
-
-#endif // __CRECEIVEMESSAGEHANDLER_H__
-
--- a/imservices/ossprotocoladaptation/inc/mossprotocolconnectionmanager.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss protocol plugin connection manager interface
-*
-*/
-
-#ifndef __MOSSCONNNECTIONMANAGERCONTROL_H__
-#define __MOSSCONNNECTIONMANAGERCONTROL_H__
-
-
-// FORWARD DECLARATIONS
-
-class MXIMPProtocolConnectionHost;
-class CXmppParameters;
-class CWaitTimer;
-class MProtocolImDataHost;
-class MProtocolSearchDataHost;
-class CSearchKeyStore;
-class CAddContactNotificationHandler;
-class COSSContactManager;
-/**
- * MOSSProtocolConnectionManager
- *
- * Telepathy Plugin Connection Manager's Interface
- *
- */
-class MOSSProtocolConnectionManager
-    {
-
-public:
-
-    /**
-     * ?description
-     *
-     * access to xmpp settings 
-     * @return handle to xmppparameter
-     */
-	virtual CXmppParameters& XmppParams() = 0;
-    /**
-     * access to protocol data handler
-     * @return protocol data handler
-     */
-		virtual CWaitTimer& DataHandler() = 0;
-    /**
-     * access to protocol connection host
-     * @return protocol connection host
-     */
-    virtual MXIMPProtocolConnectionHost& HandleToHost() = 0;
-    /**
-     * creates datahanlder
-     * @return access point
-     *
-     */    
-    virtual void ManufactureDataHandlerL() = 0;
-    /**
-     * check the data handler creation
-     * @return ETrue,if datahandler created,else EFalse
-     */ 
-        
-	virtual TDesC& UserName() = 0;
-	/**
-	 *
-	 * @return Passwor
-	 */
-	virtual TDesC& Password() = 0;
-	/**
-	 * @return GroupId
-	 */
-	virtual TDesC& GroupId() =0 ;
-	/**
-	 * @return ServiceName
-	 */
-	virtual const TDesC& ServiceName() = 0;   	
-	/**
-	 * sets the groupid
-	 * @param aGroupId : group id to be set
-	 */
-	virtual void SetGroupIDL(TDesC& aGroupId) = 0;
-	/**
-	 * gets the contactmanager
-	 * @return iContactManager
-	 */
-	virtual COSSContactManager& GetContactManager() = 0;
-	/**
-	 * @return authorised list
-	 */
-	virtual RArray<HBufC>* PresenceAuthGrantReqList() = 0;
-	/**
-	 * @return im data host
-	 */
-	virtual MProtocolImDataHost& GetImHost() = 0;
-	/**
-	 * @return add notification handler
-	 */
-	virtual CAddContactNotificationHandler& GetAddNotificationHandler() = 0;
-	/**
-	 * @return search data host
-	 */
-	virtual MProtocolSearchDataHost& GetSearchHost() = 0;
-	/**
-	 * @return search key store
-	 */
-	virtual CSearchKeyStore& GetSearchKeyStore() = 0;
-   
-protected:
-
-    /**
-     * Protected destructor.
-     * Instancies can't be destroyed via this interface.
-     */
-    virtual ~MOSSProtocolConnectionManager() {}
-
-    };
-
-#endif // __MOSSCONNNECTIONMANAGERCONTROL_H__
-
-
--- a/imservices/ossprotocoladaptation/inc/mossprotocolstatusobserver.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007-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: Access handler of one network session
-*
-*/
-
-#ifndef __MOSSPROTOCOLSTATUSOBSERVER_H
-#define __MOSSPROTOCOLSTATUSOBSERVER_H
-
-
-//  INCLUDES
-#include    <E32Std.h>
-
-/**
- *  Access handler of one network session
- *
- *  It is used to open/close network session
- *  and register its observers
- *
- */
-class MPEngSessionStatusObserver
-    {
-
-    public: //
-
-        /**
-         *  Handle Session status change
-         *
-         *  @param new session slot state
-         *  @param new session slot event
-         */
-        virtual void StatusChangedL(/* TPEngNWSessionSlotState aNewState, 
-                                TPEngNWSessionSlotEvent aNewEvent*/ ) = 0;
-
-
-    protected:  //Destructor
-
-        /**
-         *  Protected destructor to prohibits deletion trough interface.
-         */
-        virtual ~MPEngSessionStatusObserver() {};
-    };
-
-
-#endif      //  __MOSSPROTOCOLSTATUSOBSERVER_H
-
-//  End of File
-
-
-
--- a/imservices/ossprotocoladaptation/inc/ossadappanics.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss adapter plugin panics
-*
-*/
-
-#ifndef __OSSADAPPANICS_H__
-#define __OSSADAPPANICS_H__
-
-//  INCLUDES
-#include    <e32std.h>
-
-// CONSTANTS
-/**
-* Oss Adaptation Library panic category.
-*/
-_LIT ( KOssAdapPanic, "OssAdaptation" );
-
-/**
-* OSS Adaptation Library Auth interface
-*/
-
-_LIT ( KOssProtocolPresenceAuthorization, "CImpsProtocolPresenceAuthorization" );
-
-/**
-* OSS Adaptation Library Publishing panic category
-*/
-
-_LIT ( KOssProtocolPresencePublishing, "CImpsProtocolPresencePublishing" );
-
-/**
-* Oss adapter Library watching panic category.
-*/
-
-_LIT ( KOssProtocolPresenceWatching, "CImpsProtocolPresenceWatching" );
-
-/**
-* Oss adapter Library groups panic category.
-*/
-
-_LIT ( KOssProtocolPresentityGroups, "CImpsProtocolPresentityGroups" );
-
-/**
-* OSS adapter plugin library panic reasons.
-*
-* Following panic reasons are used in
-* oss adapter plugin library panics.
-*
-* @since 3.0
-*/
-enum TOssAdapterPluginPanics
-	{
-	ESesionConsistencyLost                      = 1,
-	EOpIdConsistencyLost                        = 2,
-	ENoActiveOperations                         = 3,
-	EUnknownUnumeration                         = 4,
-	EReferenceCountUnderflow                    = 5,
-	EIlegalSingletonDeletion                    = 6,
-	EUnknowPureData                             = 7,
-	EListenerAlreadyActive                      = 8,
-	ELogInDataNotValid                          = 9
-
-	};
-
-
-#endif  //__OSSADAPPANICS_H__
-
-//  End of File
-
--- a/imservices/ossprotocoladaptation/inc/ossprotocloliterals.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007-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:  OSS adapter plugin 
-*
-*/
-
-#ifndef __OSSPROTOCOLLITERALS_H__
-#define __OSSPROTOCOLLITERALS_H__
-
-#include <e32base.h>
-
-#define CONNMGR_BUS 	"org.freedesktop.Telepathy.ConnectionManager.gabble"
-#define CONNMGR_PATH 	"/org/freedesktop/Telepathy/ConnectionManager/gabble"
-#define PROTOCOL 		"jabber"
-#define TP_IFACE_CONN_MGR_INTERFACE \
-        				"org.freedesktop.Telepathy.ConnectionManager"
-#define TestId 			"mytest" 
-#define ServerStr 		"server"
-#define ResourceStr 	"resource"
-#define AccountStr 		"account"
-#define PasswdStr 		"password"
-#define PortStr 		"port"
-#define OldsslStr 		"old-ssl"
-#define PORT 443
-
-_LIT(KOSSProtocolConnection, "COSSProtocolConnection");
-_LIT8(KConnectionFeature, "telepathy/connection ");
-_LIT( KZeroId, "0" );
-_LIT(KSlash,"/");
-_LIT(KEnd,"\0");
-
-enum TRegRespState
-	{
-	ERequestDelivered = 0,
-	EResponseRecieved	
-	};
-
-
-#endif  //__OSSPROTOCOLLITERALS_H__
-
-//  End of File
-
--- a/imservices/ossprotocoladaptation/inc/ossprotocoladaptationuids.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007-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:  OSSProtocolAdaptationUids
-*                NOTE!! Don't change / edit any UID values!!!
-*
-*/
-
-#ifndef     __OSSPROTOCOLADAPTATIONUIDS_H_
-#define     __OSSPROTOCOLADAPTATIONUIDS_H_
-// MACROS
-
-//Uid2:s
-#define KEComRecognitionDllUid2       0x10009D8D	// CSI: 8 #
-
-//Uid3:s
-#define KEComRecognitionDllUid3 	  0x101FB3E7 // 0x10282EE9
-
-
-
-#endif // __OSSPROTOCOLADAPTATIONUIDS_H_
-
--- a/imservices/ossprotocoladaptation/inc/ossprotocoladaptutils.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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:  Utils for IOSSProtocolAdaptation
-*
-*/
-
-
-#ifndef __OSSPROTOCLADAPUTILS_H__
-#define __OSSPROTOCLADAPUTILS_H__
-
-//  INCLUDES
-#include <e32def.h>
-#include <e32cmn.h>
-
-struct charFormatData
-    {
-    char* data;
-    TInt dataSize;//this also includes '/0'.
-    };
-/**
- *  Utils for OSSProtocolAdaptation modules. 
- */
-class OssProtocolAdapUtils   
-	{
-	public: // new methods
- 
-    /**
-	 * utility method to convert from char to unsigned int 
-	 * @param1 pmSrc: source
-	 * @return pointer to unsigned int 
-	 */		
-	 static HBufC16* ConvertCharToTUint16LC( const char *pcSrc);
-	 /**
-	 * utility method to convert from unsigned int to char
-	 * @param1 pmSrc: source
-	 * @return structure charFormatData, contains data and size
-	 */	
-	 static charFormatData ConvertTUint16ToCharLC( const TDesC &aData );
-	 /**
-      * utility method to convert from tdesc8 to char
-      * @param1 aSrc: source
-      * @param aDes: destination
-      */ 
-	 static void ConvertTDesC8toChar(const TDesC8& aSrc, char* aDes); 	 
-	};
-
-#endif      // __OSSPROTOCLADAPUTILS_H__
-
-// End of File
--- a/imservices/ossprotocoladaptation/inc/ossprotocolpluginerrors.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 2007-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:  OSs adapter plugin errors
-*
-*/
-
-#ifndef __OSSPROTOCOLPLUGINERRORS_H__
-#define __OSSPROTOCOLPLUGINERRORS_H__
-
-//  INCLUDES
-#include    <e32std.h>
-/**
-* Mapping xmpp protocl errors with ximpfw 
-*
-*/
-/**
- * Xmpp protocol error codes.
- *
- * Xmpp status codes received from network transactions
- * are translated into Xmpp error code range
- * with following mapping:
- * <Xmpp-error-code> = KOssAdapBaseErrorXmppServerResponseBase - <Xmpp-status-code>
- * NOTE!! Mapping algorithm above and error symbols defined
- * below are in sync with algorithm used by the Xmpp protocol.
- */
-enum	
-    {
-    KOssAdapBaseErrorXmppServerResponseBase = -10000,
-    KOssAdapBaseErrorXmppServerLoginResponseBase = -11000,
-	KOssAdapBaseErrorXmppServerContactResponseBase = -12000,
-	KOssAdapBaseErrorXmppServerContactListResponseBase = -13000,
-	KOssAdapBaseErrorXmppServerPresenceResponseBase = -14000,
-	KOssAdapBaseErrorXmppServerSendMessageResponseBase = -15000,
-	KOssAdapBaseErrorXmppServerReceiveMessageResponseBase = -16000,
-	KOssAdapBaseErrorXmppServerLogoutResponseBase = -17000,
-	KOssAdapBaseErrorMessageQueueResponseBase = -18000,
-
-    KOssAdapErrMsgQueueCreate = KOssAdapBaseErrorMessageQueueResponseBase - 100,
-    KOssAdapErrMsgQueueSend = KOssAdapBaseErrorMessageQueueResponseBase - 101,
-    
-   
-    KOssadapErrInvalidSettingsId = KOssAdapBaseErrorXmppServerLoginResponseBase - 800,
-    };
-
-#endif  //__OSSPROTOCOLPLUGINERRORS_H__
--- a/imservices/ossprotocoladaptation/inc/ossprotocolpluginlogger.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Logger implementation
-*
-*/
-
-
-#ifndef __TLOGGER_H__
-#define __TLOGGER_H__
-
-//  INCLUDES
-#include <e32std.h>
-
-//#ifdef _DEBUG
-#define ENABLE_DEBUG_LOGS
-//#endif
-
-/**   
-* Usage of Log MACRO'S
-* _LIT( KExample, "Example" );
-*  TXT(s) _L(s)	
-*  LOGGER(TXT("Some text.") );
-*  LOGGER(TXT("Some text: %d"), 100 );
-*  LOGGER(TXT("Some text: %S"), &KExample );
-*/
-
-_LIT( KTAdaptDebugOutputDir, "os" );
-_LIT( KTAdaptDebugOutputFileName, "ossadapt.txt" );
-const TInt KTAdaptMaxLogLineLength = 250 ;
-//#ifdef _DEBUG
-
-#define TXT(s) _L(s)
-#define LOGGER TLogger::WriteLog
-#define PLUGIN_UNUSED_PARAM(p) (void) p
-//#endif
-
-/**
- * OSS Protocol Adaptation logger.
- */
-class TLogger
-    {
-    public: //Logging functions
-		static void WriteLog( TRefByValue<const TDesC> aFmt,... );
-    private: //Prohibited construtor / destructor
-        TLogger();
-        ~TLogger();
-    };
-#endif  //__TLOGGER_H__
-
-// End of File
--- a/imservices/ossprotocoladaptation/inc/ossprotocolpluginpanics.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007-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:  OSs adapter plugin panics
-*
-*/
-
-#ifndef __OSSPROTOCOLPLUGINPANICS_H__
-#define __OSSPROTOCOLPLUGINPANICS_H__
-
-//  INCLUDES
-#include    <e32std.h>
-
-
-// CONSTANTS
-/**
-* OSS Adaptation Library panic category.
-*/
-_LIT( KOSSProtocolPluginPanic, "OSSProtocolPlugin" );
-
-/**
-* OSS Adaptation Library Auth interface
-*/
-
-_LIT(KOSSProtocolPresenceAuthorization, "COSSProtocolPresenceAuthorization");
-
-/**
-* OSS Adaptation Library Publishing interface
-*/
-
-_LIT(KOSSProtocolPresencePublishing, "COSSProtocolPresencePublishing");
-
-/**
-* OSS Adaptation Library watching interface.
-*/
-
-_LIT(KOSSProtocolPresenceWatching, "COSSProtocolPresenceWatching");
-
-/**
-* OSS Adaptation Library panic presentity groups interface.
-*/
-
-_LIT(KOSSProtocolPresentityGroups, "COSSProtocolPresentityGroups");
-
-/**
-* OSS Adaptation Library panic conversation interface.
-*/
-
-_LIT(KOSSProtocolConversation, "COSSProtocolImConversation");
-
-
-/**
-* Telepathy adapter plugin library panic reasons.
-*
-* Following panic reasons are used in
-* OSS adapter plugin library panics.
-*
-* @since 3.0
-*/
-enum TOSSAdapterPluginPanics
-    {
-    ESesionConsistencyLost                      = 1,
-    EOpIdConsistencyLost                        = 2,
-    ENoActiveOperations                         = 3,
-    EUnknownUnumeration                         = 4,
-    EReferenceCountUnderflow                    = 5,
-    EIlegalSingletonDeletion                    = 6,
-    EAccessHandlerObserversUnregistered         = 7,
-    EUnknowPureData                             = 8,
-    EListenerAlreadyActive                      = 9,
-    ELogInDataNotValid                          = 10
-
-    };
-
-
-#endif  //__OSSPROTOCOLPLUGINPANICS_H__
-
-//  End of File
-
--- a/imservices/ossprotocoladaptation/inc/presenceauthorization/cossprotocolpresenceauthorization.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss Protocol implementation for Presence Framework
-*
-*/
-
-
-#ifndef __COSSPROTOCLPRESENCEAUTHORISATION_H_
-#define __COSSPROTOCLPRESENCEAUTHORISATION_H_
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpcontext.h>
-#include <protocolpresenceauthorization.h>
-#include <ximpprotocolconnection.h>
-
-
-
-// FORWARD DECLARATIONS
-
-class MXIMPServiceInfo;
-class MOSSProtocolConnectionManager;
-
-
-/**
- * COssProtocolPresenceAuthorization
- *
- * Oss Protocol Authorization Request Handling
- *
- */
- 
-class COssProtocolPresenceAuthorization:
-					public CBase,
-					public MProtocolPresenceAuthorization					
-	{
-public:
-
-    static COssProtocolPresenceAuthorization* NewL(MOSSProtocolConnectionManager& aConnManager);
-
-
-    ~COssProtocolPresenceAuthorization();
-
-
-private:
-
-    COssProtocolPresenceAuthorization(MOSSProtocolConnectionManager& aConnManager);
-
-
-    void ConstructL();
-
-public: // from MXIMPBase 
-
-	/**
-	 * @see MXIMPBase
-	 */
-	TAny* GetInterface( TInt32 aInterfaceId,
-                        TIfGetOps  aOptions );
-    /**
-	 * @see MXIMPBase
-	 */
-    const TAny* GetInterface( TInt32 aInterfaceId,
-                              TIfGetOps  aOptions ) const;
-	/**
-	 * @see MXIMPBase
-	 */
-    TInt32 GetInterfaceId() const;
-
-public: //from MProtocolPresenceAuthorization
-
-	/**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoSubscribePresenceGrantRequestListL(
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoUnsubscribePresenceGrantRequestListL(
-                    TXIMPRequestId aReqId );
-
-public: // Granting presence information access to single presentities
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoGrantPresenceForPresentityL(
-                    const MXIMPIdentity& aPresentityId,
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoUpdatePresenceGrantPifForPresentityL(
-                    const MXIMPIdentity& aPresentityId,
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-   	/**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoWithdrawPresenceGrantFromPresentityL(
-                    const MXIMPIdentity& aPresentityId,
-                    TXIMPRequestId aReqId );
-
-public: // Granting presence information access to presentity group members
-
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoGrantPresenceForPresentityGroupMembersL(
-                    const MXIMPIdentity& aGroupId,
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoUpdatePresenceGrantPifForPresentityGroupMembersL(
-                    const MXIMPIdentity& aGroupId,
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoWithdrawPresenceGrantFromPresentityGroupMembersL(
-                    const MXIMPIdentity& aGroupId,
-                    TXIMPRequestId aReqId );
-
-public: // Granting presence information access to everyone
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoGrantPresenceForEveryoneL(
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoUpdatePresenceGrantPifForEveryoneL(
-                    const MPresenceInfoFilter& aPif,
-                    TXIMPRequestId aReqId );
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoWithdrawPresenceGrantFromEveryoneL(
-                    TXIMPRequestId aReqId );
-public: // Subscribe presence block list
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoSubscribePresenceBlockListL(
-                    TXIMPRequestId aReqId );
-
-
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoUnsubscribePresenceBlockListL(
-                    TXIMPRequestId aReqId );
-
-public: // Blocking presence information access from single presentities
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoBlockPresenceForPresentityL(
-                    const MXIMPIdentity& aPresentityId,
-                    TXIMPRequestId aReqId );
-    
-    /**
-	 * @see MProtocolPresenceAuthorization
-	 */
-    void DoCancelPresenceBlockFromPresentityL(
-                    const MXIMPIdentity& aPresentityId,
-                    TXIMPRequestId aReqId );
-
-	
-public: 
-
-	/**
-     * Creates data handler
-     */
-	void CreateDataHandlerL();
-	
-private:
-	
-	/**
-     * Request Id from ximpfw
-     */
-	TXIMPRequestId iRequestId;
-	
-	
-	/**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-	MOSSProtocolConnectionManager& iConnMan;	
-	
-	
-	
-	};
-
-#endif // __COSSPROTOCLPRESENCEAUTHORISATION_H_
-
-
-
-
-
-
-
-
-
-
-
-
--- a/imservices/ossprotocoladaptation/inc/presenceauthorization/cpresenceauthuserrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Response to authorization request
-*
-*/
-
-
-#ifndef __CPRESENCEAUTHUSERREQUEST_H__
-#define __CPRESENCEAUTHUSERREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MXIMPIdentity;
-class MPresenceInfoFilter;
-
-/**
- * CPresenceAuthUserRequest
- *
- * Issue Accept Response of add notification Request to Network Server
- *
- */
- 
- class CPresenceAuthUserRequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    static CPresenceAuthUserRequest* NewL( 	MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    static CPresenceAuthUserRequest* NewLC( MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CPresenceAuthUserRequest();
-
-private:
-
-    CPresenceAuthUserRequest( MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-
-private: // from CActive
-
-    void DoCancel();
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-    
-/**
- * Issue Accept Response of add notification Request to Network Server
- * 
- * @param aIdentity: conatct id
- * aPif : presence info filter
- */
-   void PresenceAuthUserRequestL(
-									const MXIMPIdentity & aIdentity,
-									const MPresenceInfoFilter & aPif);
- 
-
-private: // data
-
-    /**
-     * Request Id from ximpfw
-     */
-    TXIMPRequestId iRequestId;
- 
-    /**
-     * Send data request to pure data handler generates the id
-     */
-    TInt iSendId;
-    
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    };
-
-
-#endif // __CPRESENCEAUTHUSERREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presenceauthorization/csubscribepresencegrantrequestlistrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-/*
-* Copyright (c) 2007-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:  subscribing to get add notifications
-*
-*/
-
-
-#ifndef __CSUBSCRIBEPRESENCEGRANTREQUESTLISTREQUEST_H__
-#define __CSUBSCRIBEPRESENCEGRANTREQUESTLISTREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MXIMPIdentity;
-
-/**
- * CSubscribePresenceGrantRequestListRequest
- *
- * subscribing from ximpfw to grant presence 
- */
- 
- class CSubscribePresenceGrantRequestListRequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    static CSubscribePresenceGrantRequestListRequest* NewL( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    static CSubscribePresenceGrantRequestListRequest* NewLC( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CSubscribePresenceGrantRequestListRequest();
-
-private:
-
-    CSubscribePresenceGrantRequestListRequest( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-
-private: // from CActive
-
-    void DoCancel();
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-    
-   void SubscribePresenceGrantRequestListL();
- 
-
-private: // data
-
-    /**
-     * Request Id from ximpFw
-     */
-    
-    TXIMPRequestId iRequestId;
-    
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    };
-
-
-#endif // __CSUBSCRIBEPRESENCEGRANTREQUESTLISTREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presenceauthorization/cwithdrawpresencegrantfrompresentityrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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:  Response to authorization request
-*
-*/
-
-
-#ifndef __CWITHDRAWPRESENCEGRANTFROMPRESENTITYREQUEST_H__
-#define __CWITHDRAWPRESENCEGRANTFROMPRESENTITYREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MXIMPIdentity;
-class MPresenceInfoFilter;
-
-/**
- * CWithdrawPresenceGrantFromPresentityRequest
- *
- * Issue Rejecting Response of add notification Request to Network Server
- *
- */
- 
- class CWithdrawPresenceGrantFromPresentityRequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    static CWithdrawPresenceGrantFromPresentityRequest* NewL( 	MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    static CWithdrawPresenceGrantFromPresentityRequest* NewLC( MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CWithdrawPresenceGrantFromPresentityRequest();
-
-private:
-
-    CWithdrawPresenceGrantFromPresentityRequest( MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-	
-private: // from CActive
-
-    void DoCancel();
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-    
-	/**
-	* Send Rejecting Response of add notification Request to Network Server
-	*  @param aPresentityId: conatct id
-	*/
-    void WithdrawPresenceGrantFromPresentityL(
-     const MXIMPIdentity& aPresentityId);
- 
-
-private: // data
-
-    /**
-     * Request Id from PrFw
-     */
-    
-    TXIMPRequestId iRequestId;
- 
-    /**
-     * Send data request to wait timer generates the id
-     */
-    TInt iSendId;
-    
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    };
-
-
-#endif // __CWITHDRAWPRESENCEGRANTFROMPRESENTITYREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presencepublishing/cossprotocolpresencepublishing.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IMPS Protocol implementation for Presence Framework
-*
-*/
-
-
-#ifndef __COSSSPROTOCOLPRESENCEPUBLISHING_H__
-#define __COSSSPROTOCOLPRESENCEPUBLISHING_H__
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpcontext.h>
-#include <protocolpresencepublishing.h>
-#include <ximpprotocolconnection.h>
-#include <ximpbase.h>
-
-// FORWARD DECLARATIONS
-class MXIMPServiceInfo;
-class MOSSProtocolConnectionManager;
-class CPresenceNotificationHandler;
-class MProtocolPresencePublishing;
-
-/**
- * COssProtocolPresencePublishing
- *
- * Oss Protocol presence publishing Request Handling
- *
- */
-class COssProtocolPresencePublishing:
-					public CBase,
-					public MProtocolPresencePublishing
-	{
-
-public:
-
-    static COssProtocolPresencePublishing* NewL(MOSSProtocolConnectionManager& aConnManager);
-
-
-    ~COssProtocolPresencePublishing();
-
-
-private:
-
-    COssProtocolPresencePublishing(MOSSProtocolConnectionManager& aConnManager);
-
-
-    void ConstructL();
-                
-public:  //from MXIMPBase
-	/**
-	 * @see MXIMPBase
-	 */
-	TAny* GetInterface( TInt32 aInterfaceId,
-                        TIfGetOps  aOptions );
-    /**
-	 * @see MXIMPBase
-	 */
-    const TAny* GetInterface( TInt32 aInterfaceId,
-                              TIfGetOps  aOptions ) const;
-
-    /**
-	 * @see MXIMPBase
-	 */
-    TInt32 GetInterfaceId() const;
-
-public:	// From MProtocolPresencePublishing 
-	
-	/**
-	 * @see MProtocolPresencePublishing
-	 */
-	void DoPublishOwnPresenceL( const MPresenceInfo& aPresence,
-                                TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresencePublishing
-	 */
-    void DoSubscribeOwnPresenceL( const MPresenceInfoFilter& aPif,
-                                  TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresencePublishing
-	 */
-    void DoUpdateOwnPresenceSubscriptionPifL( const MPresenceInfoFilter& aPif,
-                                           TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresencePublishing
-	 */
-    void DoUnsubscribeOwnPresenceL( TXIMPRequestId aReqId );
-    
-    /**
-	 * @see MProtocolPresencePublishing
-	 */
-    void DoSubscribePresenceWatcherListL( TXIMPRequestId aReqId );
-
-	/**
-	 * @see MProtocolPresencePublishing
-	 */
-    void DoUnsubscribePresenceWatcherListL( TXIMPRequestId aReqId );	
-
-                                                      
-private:
-	
-	/**
-     * Request Id from PrFw
-     */
-	TXIMPRequestId iRequestId;
-	
-	/**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  
-     *** Write "Not own" if some other class owns this object.
-     */
-	MOSSProtocolConnectionManager& iConnMan;
-	
-	CPresenceNotificationHandler* iNotificationHandler;
-					
-	};
-
-#endif // __COSSSPROTOCOLPRESENCEPUBLISHING_H__
--- a/imservices/ossprotocoladaptation/inc/presencepublishing/cpresencenotificationhandler.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation of presence notification handler
-*
-*/
-
-
-#ifndef __CPRESENCENOTIFICATIONHANDLER_H__
-#define __CPRESENCENOTIFICATIONHANDLER_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-#include <presencecachewriter2.h>
-#include <mpresencebuddyinfo2.h>
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-/**
- * CPresenceNotificationHandler
- *
- * Handles presnce notifications recieved from the server
- * and updates presence cache 
- */
-
-class CPresenceNotificationHandler: public CActive
-
-
-	{
-
-	public:
-
-		static CPresenceNotificationHandler* NewL (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		static CPresenceNotificationHandler* NewLC (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		virtual ~CPresenceNotificationHandler();
-
-	private:
-
-		CPresenceNotificationHandler ( MOSSProtocolConnectionManager& aConnMan );
-		void ConstructL();
-
-	private: // from CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-        /**
-		 * Start listening presence from the server
-		 */
-		void StartListeningL();
-        /**
-		 * Process the recieved presence from the server
-		 */
-		void ProcessIncomingDataL();
-		
-	private: // data
-
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-        /**
-		 * Presence cache writer
-		 * Own
-		 */
-		MPresenceCacheWriter2* iPresenceCacheWriter;
-
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-		
-	};
-
-
-#endif // __CPRESENCENOTIFICATIONHANDLER_H__
-
--- a/imservices/ossprotocoladaptation/inc/presencepublishing/cpublishownpresencerequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IMPS Protocol implementation for Presence Framework
-*
-*/
-
-
-#ifndef __CPUBLISHOWNPRESENCEREQUEST_H__
-#define __CPUBLISHOWNPRESENCEREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MPresenceInfo;
-class MPresenceBuddyInfo2;
-
-/**
- * CPublishOwnPresencerequest
- *
- * Publishes own presence 
- *
- */
- 
- class CPublishOwnPresencerequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    static CPublishOwnPresencerequest* NewL( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    static CPublishOwnPresencerequest* NewLC( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CPublishOwnPresencerequest();
-
-private:
-
-    CPublishOwnPresencerequest( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-
-private: // from CActive
-
-    void DoCancel();
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-   /**
- 	* CPublishOwnPresencerequest
-	*
-	* Publishes update own presence to network server
-	*
-	*/ 
-   void PublishOwnPresenceL(const MPresenceInfo& aPresence);
-   
- 
-private: // data
-
-    /**
-     * Request Id from ximpfw
-     */
-    
-    TXIMPRequestId iRequestId;
-    
-    /**
-     * Send data request to pure data handler generates the id
-     */
-    TInt iSendId;
-	    
-    
-    /**
-     * Imps Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    //owns : own presence info
-    MPresenceBuddyInfo2* iOwnPresenceInfo;
-     
-    };
-
-
-#endif // __CPUBLISHOWNPRESENCEREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/caddcontactenotificationhandler.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation of add notification handler
-*
-*/
-
-
-#ifndef __CADDCONTACTNOTIFICATIONHANDLER_H__
-#define __CADDCONTACTNOTIFICATIONHANDLER_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-#include <presencecachewriter.h>
-#include <presencebuddyinfo.h>
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-/**
- * CAddContactNotificationHandler
- *
- * Handles add notifications recieved from the network server
- *
- */
-
-class CAddContactNotificationHandler: public CActive
-
-
-	{
-
-	public:
-
-		static CAddContactNotificationHandler* NewL (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		static CAddContactNotificationHandler* NewLC (
-		    MOSSProtocolConnectionManager& aConnMan
-		);
-
-		virtual ~CAddContactNotificationHandler();
-
-	private:
-
-		CAddContactNotificationHandler ( MOSSProtocolConnectionManager& aConnMan );
-		void ConstructL();
-
-	private: // from CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-       /**
-     	* Start listening for the add notifications
-     	*/
-		void StartListeningL();
-        /**
-     	* Process the recieved add notifications
-     	*/
-		void ProcessIncomingDataL();
-
-	private: // data
-
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-	};
-
-
-#endif // __CADDCONTACTNOTIFICATIONHANDLER_H__
-
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/caddpresentitygroupmemberrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Add presentity group member request
-*
-*/
-
-
-#ifndef __CADDPRESENTITYGROUPMEMBERREQUEST_H__
-#define __CADDPRESENTITYGROUPMEMBERREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MXIMPIdentity;
-
-/**
- * CAddPresentityGroupMemberRequest
- *
- * Issue Add Presentity Group Member Request to Network Server
- *
- */
- 
- class CAddPresentityGroupMemberRequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    										
-    static CAddPresentityGroupMemberRequest* NewLC( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CAddPresentityGroupMemberRequest();
-
-private:
-
-    CAddPresentityGroupMemberRequest( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-
-private: // from CActive
-
-    void DoCancel();
-    /*
-     * RunL() function also deletes the request object once the activity is done
-     *
-     */
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-     /**
-      * Add contact to the list
-      * @param aGroupId group identity
-      * @param aMemberId conatct identity
-      * @param aMemberDisplayName contact displayname
-      */
-   	void AddPresentityGroupMemberL(	const MXIMPIdentity& aGroupId,
-									const MXIMPIdentity& aMemberId,
-								    const TDesC16& aMemberDisplayName );
- 
-
-private: // data
-
-    /**
-     * Request Id from ximpfw
-     */
-    
-    TXIMPRequestId iRequestId;
-    
-    /**
-     * Send data request to pure data handler generates the id
-     */
-    TInt iSendId;
-    
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    /*
-     * Stores contactid
-     * Own
-     */
-    HBufC* iContactId;
-    };
-
-
-#endif // __CADDPRESENTITYGROUPMEMBERREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/ccontactsynchandler.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  handles synchronisation of contacts 
-*
-*/
-
-
-#ifndef __CCONTACTSYNCHANDLER_H__
-#define __CCONTACTSYNCHANDLER_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-#include <presencecachewriter.h>
-#include <presencebuddyinfo.h>
-
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-/**
- * CContactSyncHandler
- *
- * handles synchronisation of contacts from Network Server
- *
- */
-
-class CContactSyncHandler: public CActive
-
-
-	{
-
-	public:
-
-		static CContactSyncHandler* NewL ( MOSSProtocolConnectionManager& aConnMan );
-	
-		virtual ~CContactSyncHandler();
-
-	private:
-
-		CContactSyncHandler ( MOSSProtocolConnectionManager& aConnMan );
-
-	private: // from CActive
-
-		void DoCancel();
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-        
-        /**
-		 *  keep on listening for events
-		 */
-		void StartListening();
-         
-      	/**
-		 *  Processes the data from server and sends to ximpfw
-		 */ 
-		void ProcessAndSendL();
-
-	private: // data
-
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own. 
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-	};
-
-
-#endif // __CCONTACTSYNCHANDLER_H__
-
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/cossprotocolpresentitygroups.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss Protocol presentity groups
-*
-*/
-
-#ifndef COSSPROTOCOLPRESENTITYGROUPS_H__
-#define COSSPROTOCOLPRESENTITYGROUPS_H__
-
-
-#include <e32base.h>
-#include <protocolpresentitygroups.h>
-
-
-class MOSSProtocolConnectionManager;
-
-
-/**
- * COSSProtocolpresentitygroups
- *
- * implementation of MProtocolPresentityGroups methods.
- * these methods will called by ximp framework 
- *
- */
-class COSSProtocolpresentitygroups :   public CBase,
-                                        public MProtocolPresentityGroups
-    {
-
-public:
-
-    static COSSProtocolpresentitygroups* NewL( MOSSProtocolConnectionManager& aConnManager );
-    ~COSSProtocolpresentitygroups();
-
-
-private:
-
-    COSSProtocolpresentitygroups( MOSSProtocolConnectionManager& aConnManager );
-    void ConstructL();
-
-public:  // from MXIMPBase
-
-    /**
-	 * @see MXIMPBase
-	 */
-    TAny* GetInterface( TInt32 aInterfaceId,
-                        TIfGetOps  aOptions );
-	/**
-	 * @see MXIMPBase
-	 */
-    const TAny* GetInterface( TInt32 aInterfaceId,
-                              TIfGetOps aOptions ) const;
-	/**
-	 * @see MXIMPBase
-	 */
-    TInt32 GetInterfaceId() const;
-
-public: //From MProtocolPresentityGroups
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoSubscribePresentityGroupListL(
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoUnsubscribePresentityGroupListL(
-                    TXIMPRequestId aReqId );
-
-public: // Manage presentity groups
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoCreatePresentityGroupL(
-                    const MXIMPIdentity& aGroupId,
-                    const TDesC16& aDisplayName,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoDeletePresentityGroupL(
-                    const MXIMPIdentity& aGroupId,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoUpdatePresentityGroupDisplayNameL(
-                    const MXIMPIdentity& aGroupId,
-                    const TDesC16& aDisplayName,
-                    TXIMPRequestId aReqId );
-
-public: // Subscribe presentity group content
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoSubscribePresentityGroupContentL(
-                    const MXIMPIdentity& aGroupId,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-   void DoUnsubscribePresentityGroupContentL(
-                    const MXIMPIdentity& aGroupId,
-                    TXIMPRequestId aReqId );
-
-public: // Manage presentity group members
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoAddPresentityGroupMemberL(
-                    const MXIMPIdentity& aGroupId,
-                    const MXIMPIdentity& aMemberId,
-                    const TDesC16& aMemberDisplayName,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoRemovePresentityGroupMemberL(
-                    const MXIMPIdentity& aGroupId,
-                    const MXIMPIdentity& aMemberId,
-                    TXIMPRequestId aReqId );
-    /**
-	 * @see MProtocolPresentityGroups
-	 */
-    void DoUpdatePresentityGroupMemberDisplayNameL(
-                    const MXIMPIdentity& aGroupId,
-                    const MXIMPIdentity& aMemberId,
-                    const TDesC16& aMemberDisplayName,
-                    TXIMPRequestId aReqId );
-
-private:
-	/**
-     * Creates data handler
-     */
-	void CreateDataHandlerL();
-	
-private:    // data members
-    
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-
-    };
-
-#endif // COSSPROTOCOLPRESENTITYGROUPS_H__
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/cremovepresentitygroupmemberrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Remove presentity group member request
-*
-*/
-
-
-#ifndef __CREMOVEPRESENTITYGROUPMEMBERREQUEST_H__
-#define __CREMOVEPRESENTITYGROUPMEMBERREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MXIMPIdentity;
-
-
-/**
- * CRemovePresentityGroupMemberRequest
- *
- * Issue Remove Presentity Group Member Request to Network Server
- *
- */
- 
- class CRemovePresentityGroupMemberRequest: public CActive
-                                			   
-                                			   
-    {
-
-public:
-
-    
-    										
-    static CRemovePresentityGroupMemberRequest* NewLC( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId );
-    										
-    virtual ~CRemovePresentityGroupMemberRequest();
-
-private:
-
-    CRemovePresentityGroupMemberRequest( 
-    										MOSSProtocolConnectionManager& aConnMan,
-    										TXIMPRequestId aRequestId  );
-    void ConstructL();
-   
-private: // from CActive
-
-    void DoCancel();
-    /*
-     * RunL() function also deletes the request object once the activity is done
-     *
-     */
-    void RunL();
-    TInt RunError( TInt aError );
-    
-public:
-   	 /**
-      * Remove presentity group member from the list
-      * @param aGroupId group identity
-      * @param aGroupId group member identity
-      */  
-   void RemovePresentityGroupMemberL(const MXIMPIdentity& aGroupId,
-   									 const MXIMPIdentity& aMemberId);
- 
-private: // data
-
-    /**
-     * Request Id from ximpfw
-     */
-    TXIMPRequestId iRequestId;
-    
-    /**
-     * Send data request to pure data handler generates the id
-     */
-    TInt iSendId;
-   
-    /**
-     * Oss Protocol Plugin Connection Manager
-     * Not own.  *** Write "Not own" if some other class owns this object.
-     */
-    MOSSProtocolConnectionManager& iConnMan;
-    
-    // owns : userid id to delete
-    HBufC* iUserId;
-    
-    };
-
-
-#endif // __CREMOVEPRESENTITYGROUPMEMBERREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/presentitygroups/csubscribepresentitygroupcontentrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Subscribe Presentity Group Content Request
-*
-*/
-
-
-#ifndef __CSUBSCRIBEPRESENTITYGROUPCONTENTREQUEST_H__
-#define __CSUBSCRIBEPRESENTITYGROUPCONTENTREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-#include <e32des16.h>
-#include "ossprotocloliterals.h"
-// FORWARD DECLARATIONS
-
-class MOSSProtocolConnectionManager;
-
-class MXIMPIdentity;
-
-/**
- * CSubscribePresentityGroupContentRequest
- *
- * Fetches the contacts and update to ximp fw
- *
- */
-
-class CSubscribePresentityGroupContentRequest: public CActive
-
-
-	{
-
-	public:
-
-		static CSubscribePresentityGroupContentRequest* NewL (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId );
-
-		static CSubscribePresentityGroupContentRequest* NewLC (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId );
-
-		virtual ~CSubscribePresentityGroupContentRequest();
-
-	private:
-
-		CSubscribePresentityGroupContentRequest (
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId  );
-		void ConstructL();
-        /**
-		 * IssueRequest
-		 */
-		void IssueRequest();
-		/**
-		 * populate data
-		 */
-		void PopulateDataL();
-		
-	private: // from CActive
-
-		void DoCancel();
-		/*
-		 * RunL() function also deletes the request object once the activity is done
-		 *
-		 */
-		void RunL();
-		TInt RunError ( TInt aError );
-
-	public:
-		/**
-		 * subscribe to get group members of the list
-		 * @param aGroupId group identity
-		 */
-		void SubscribePresentityGroupContentL (
-		    const MXIMPIdentity& aGroupId );
-		
-	public:
-	
-
-		/**
-		 * parse the data and update the data cache of ximp.send event back to ximp
-		 */
-
-		void ProcessIncomingDataL();
-
-	private: // data
-
-		/**
-		 * Request Id from ximpfw
-		 */
-
-		TXIMPRequestId iRequestId;
-
-		/**
-		 * Send data request to pure data handler generates the id
-		 */
-		TInt iSendId;
-	
-		/**
-		 * Array of conatcts
-		 * Own
-		 */
-		//RPointerArray<HBufC>                   iContacts;
-		/**
-		 * Oss Protocol Plugin Connection Manager
-		 * Not own.  *** Write "Not own" if some other class owns this object.
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-
-		/*
-		 * Stores groupname
-		 * Own
-		 */
-		HBufC* iGroupName;
-		/*
-		 * Listcount
-		 */
-		TInt iListcount;
-	};
-
-
-#endif // __CSUBSCRIBEPRESENTITYGROUPCONTENTREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/processlauncher/processlaunher.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Offers launching of given process
-*
-*/
-
-
-
-#ifndef __CPROCESSLAUNCHER_H__
-#define __CPROCESSLAUNCHER_H__
-
-
-#include <e32base.h>
-
-
-/**
-*  CProcessLauncher
-*  The implementation for launching of  processes
-*
-*/
-
-class CProcessLauncher : public CActive
-	{
-
-	public:  // Constructors and destructor
-
-		/**
-		* Two-phased constructor.
-		*/
-		static CProcessLauncher* NewL ( const TDesC16& aprocessname );
-
-		/**
-		* Destructor.
-		*/
-		~CProcessLauncher();
-
-
-	public:
-
-		/**
-		* Does the launching of given process
-		*/
-		void LaunchProcessL();
-
-
-	private:
-
-		/**
-		* C++ default constructor.
-		* @param aReconnHandler Handler for global reconnect continuation query
-		*/
-		CProcessLauncher();
-
-		/**
-		* By default Symbian 2nd phase constructor is private.
-		*/
-		void ConstructL ( const TDesC16& aprocessname );
-
-
-	protected:
-		/**
-	   	 * @see CActive.
-	   	 */
-		void DoCancel();
-
-	   /**
-		* @see CActive.
-		*/
-		void RunL();
-
-	   /**
-		* @see CActive.
-		*/
-		TInt RunError ( TInt aError );
-
-	private:  //data
-	   /**
-		* process launcher
-		*/
-		RProcess iLauncher;
-	   /**
-		* name of the process to be launched 
-		*/
-		HBufC16* iProcessName;
-	};
-
-#endif  // __CPROCESSLAUNCHER_H__
-
-// End of File
--- a/imservices/ossprotocoladaptation/inc/search/cossprotocolsearch.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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:  Oss protocol search 
-*
-*/
-
-#ifndef COSSPROTOCOLSEARCH_H__
-#define COSSPROTOCOLSEARCH_H__
-
-
-#include <e32base.h>
-#include <protocolsearch.h>
-
-
-class MOSSProtocolConnectionManager;
-
-
-/**
- * COSSProtocolSearch
- * implementation of MProtocolSearch methods.
- * these methods will called by search feature plugin
- */
-class COSSProtocolSearch :   public CBase,
-                             public MProtocolSearch
-    {
-
-	public:
-
-	    static COSSProtocolSearch* NewL( MOSSProtocolConnectionManager& aConnManager );
-	    
-	    ~COSSProtocolSearch();
-
-
-	private:
-
-	    COSSProtocolSearch( MOSSProtocolConnectionManager& aConnManager );
-	    void ConstructL();
-
-	public:  //from MXIMPBase
-
-	   /**
-		*  @see MXIMPBase
-		*/
-	    TAny* GetInterface( TInt32 aInterfaceId,
-	                        TIfGetOps  aOptions );
-	   /**
-		*  @see MXIMPBase
-		*/
-	    const TAny* GetInterface( TInt32 aInterfaceId,
-	                              TIfGetOps aOptions ) const;
-	   /**
-		*  @see MXIMPBase
-		*/
-	    TInt32 GetInterfaceId() const;
-
-	public: // From MProtocolSearch
-	    
-	   /**
-		*  @see MProtocolSearch
-		*/
-	    void DoSearchL( const MXIMPIdentity& aSearchId,
-						const RPointerArray< MSearchElement >& aObjs,
-		                TInt  aSearchLimit,
-		        		TXIMPRequestId aReqId );
-	   /**
-		*  @see MProtocolSearch
-		*/        		
-		void DoGetSearchKeysL( TXIMPRequestId aReqId );
-	   
-	private:    // data members
-	    /**
-	     * Oss Protocol Plugin Connection Manager
-	     *   Not own. 
-	     */
-	    MOSSProtocolConnectionManager& iConnMan;
-
-    };
-
-#endif // COSSPROTOCOLSEARCH_H__
--- a/imservices/ossprotocoladaptation/inc/search/csearchgetsearchkeys.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles dynamic search label-key pair storing.
-*
-*/
-
-
-/*!	\def To avoid multiple inclusions
-*/
-#ifndef C_SEARCHGETSEARCHKEYS_H
-#define C_SEARCHGETSEARCHKEYS_H
-
-#include <e32base.h>
-#include <e32cmn.h>
-#include <ximpbase.h>
-#include "mossprotocolconnectionmanager.h"
-
-/*!	\file 
-*	\brief Interfaces for the get search key request
-*/
-
-
-/*!	\class CSearchGetSearchKeys csearchgetsearchkeys.h
-*	\brief This class derived from CActive impliments a request
-*	for the get search keys
-*/
-class CSearchGetSearchKeys : public CActive
-	{
-	
-	public:
-	
-	/*!	\fn
-	*	\brief static function to create a new object of this class
-	*/
-	static CSearchGetSearchKeys* NewL( 
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId );
-	
-	
-	/*!	\fn
-	*	\brief Default Constructor for this class
-	*/
-	CSearchGetSearchKeys( 
-		    MOSSProtocolConnectionManager& aConnMan,
-		    TXIMPRequestId aRequestId  );
-	
-	/*!	\fn
-	*	\brief destructor
-	*/
-	~CSearchGetSearchKeys();
-	
-	
-	/*!	\brief Function to issue a request, in this case 
-	*	it is geting search keys
-	*/
-	void GetSearchKeysL();
-	
-	
-	protected:
-	
-	/*!	\fn
-	*	\brief Called when a cancel is done on the active object
-	*/
-	void DoCancel();
-	
-	/*!	\fn
-	*	\brief Called when the request submitted by this object 
-	*	is completed
-	*/
-	void RunL();
-	
-	/*!	\fn
-	*	\brief Called when the RunL leaves
-	*/
-	TInt RunError( TInt aError );
-	
-	
-	
-	private:
-	
-	/*!	\fn
-	*	\brief 2nd phase constructor for this class
-	*/
-	void ConstructL();
-	
-	/*!	\var Data Id generated for the request
-	*/
-	TInt iSendId;
-	
-	
-	/*!	\var TXIMPRequestId Request Id
-	*	
-	*/
-	TXIMPRequestId iRequestId;
-	
-	/*!	\var iConnMan handle to connection manager
-	*	This variable is not owned by this class
-	*/
-	MOSSProtocolConnectionManager& iConnMan;
-	
-	};
-
-
-#endif //C_SEARCHGETSEARCHKEYS_H
--- a/imservices/ossprotocoladaptation/inc/search/csearchkeystore.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,148 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles dynamic search label-key pair storing.
-*
-*/
-
-
-/*!	/def To avoid multiple inclusions
-*/
-#ifndef C_SEARCHKEYSTORE_H
-#define C_SEARCHKEYSTORE_H
-
-//For CBase
-#include <e32base.h>
-//For RHashMap
-#include <e32hashtab.h>
-//For TDesC
-#include <e32cmn.h>
-//For CRepository
-#include <centralrepository.h>
-//For TSearchKey
-#include <searchelement.h>
-
-/*!	/file 	
-*	Interfaces for CSearchKeyStore class
-*/
-
-
-/*!	/var KLabelKeyStoreHash Uid to access central repository
-*/
-const TUid KLabelKeyStoreHash = { 0x200195A9 };
-/*!	/def Total no. of keys that the UI supports( for localization )
-*/
-#define NO_OF_KEYS_SUPPORTED 13
-
-
-/*!	/class CSearchKeyStore csearchkeystore.h
-*
-*	/brief This class stores the localizable search labels, and maps
-*	the labels got from get search keys to enums( Localizable ) and 
-*	strings( non localizable ). 
-*
-*	/brief Background : The search key labels from server are not standardized.
-*	So gizmo can give for 'First Name' a label 'First' and gtalk can give it as
-*	'Name'. We will have possible values for 'First Name' in cen rep. And 
-*	whenever a get search keys done and labels got, we wil try to map those
-*	to enums('Name', 'First' for EFirstName). If for 'first name' the label
-*	for some xyz server is 'Given' then it is non localizable. And wil be 
-*	sent to UI as a string
-*/
-class CSearchKeyStore : public CBase
-	{
-	
-	public : 
-		/*!	/fn
-		*	/brief Static function that creates a new object
-		*	of type CSearchKeyStore
-		*/
-		static CSearchKeyStore* NewL();
-		
-		/*!	/fn
-		*	/brief constructor for the CSearchKeyStore class
-		*/
-		CSearchKeyStore();	
-		
-		/*!	/fn
-		*	/brief destructor for the CSearchKeyStore class
-		*/
-		virtual ~CSearchKeyStore();
-		
-		/*!	/fn
-		*	/brief Maps the labels from server got by making a get 
-		*	search keys request to server. Those are mapped to localizable
-		*	enums and non localizable strings
-		*
-		*	/param aLabels Labels to be classified
-		*/
-		void MapLabelsToEnumL( RPointerArray<TDesC>& aLabels );
-		
-		/*!	/fn
-		*	/brief Gets the label (for server) for the given enum(search field)
-		*
-		*	/param aEnum search field
-		*	/return HBufC* string corresponding to the enum. The ownership of
-		*	returned pointer is transfered to callee.
-		*/
-		HBufC* GetLabelFromEnumL( TSearchKey aEnum );
-		
-		/*!	/brief This function returns an array of pointers to the
-		*	supported keys( Supported labels are the labels that have 
-		*	support in the UI for logical strings)
-		*
-		*	/return an array of pointers to enums
-		*/	
-		RPointerArray<TSearchKey>	GetSupportedEnums();
-		
-				
-		/*!	/brief This function returns a handle to the array of not
-		*	supported label strings. Not supported here means that
-		*	there are no logical strings in UI for these labels
-		*
-		*	/return const handle to not supported strings
-		*/
-
-		const RPointerArray<TDesC> GetNotSupportedLabels();
-		
-	private:
-		
-		/*!	/fn
-		*	/brief ConstructL reads labels from the cen rep
-		*	and maps them to enums
-		*/
-		void ConstructL();
-		
-		/*!	/var iLabelKeyHashRep Handle to cen rep
-		*/
-		CRepository* iLabelKeyHashRep;//owned
-		
-		/*!	/var iEnumLabels maps the labels to enums
-		*/
-		RHashMap<TInt, TPtr16> iEnumLabels;//owned
-		
-		/*!	/var iNotSupportedLabels Has the labels that can not
-		*	be localized.
-		*/
-		RPointerArray<TDesC> iNotSupportedLabels;//owned
-		
-		/*!	/var iSupportedLabels Hash Map of the search labels and
-		*	to search field enums
-		*/
-		RHashMap<TInt, TPtr16> iSupportedLabels;//owned
-
-	};
-
-
-
-#endif //C_SEARCHKEYSTORE_H
--- a/imservices/ossprotocoladaptation/inc/search/csearchrequest.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +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:  Search implementation
-*
-*/
-
-
-#ifndef __CSEARCHREQUEST_H__
-#define __CSEARCHREQUEST_H__
-
-
-//  INCLUDES
-#include <e32base.h>
-#include <ximpbase.h>
-
-#include <searchinfo.h>
-
-// FORWARD DECLARATIONS
-class MOSSProtocolConnectionManager;
-class MSearchElement;
-class MXIMPIdentity;
-
-/**
- * CSearchrequest
- *
- * Issue Search Request to Network Server
- *
- */
- 
-class CSearchrequest: public CActive
-                                			   
-                                			   
-	{
-
-	public:
-	    										
-	    static CSearchrequest* NewLC( MOSSProtocolConnectionManager& aConnMan,
-	    										TXIMPRequestId aRequestId );
-	    										
-	    virtual ~CSearchrequest();
-
-	private:
-
-	    CSearchrequest( MOSSProtocolConnectionManager& aConnMan,
-	    										TXIMPRequestId aRequestId  );
-	    void ConstructL();
-
-	private: // from CActive
-
-	    void DoCancel();
-	    void RunL();
-	    TInt RunError( TInt aError );
-	 
-	 private : 
-	 	/**
-	     * parse the data
-	     * @param aResponse: response contains searched data 
-	     * @param alen: length
-	     * @param aSearchInfo: search info
-	     * @param aKeytype: search key type
-	     */
-	    void ParseAndSetL(char* aResponse, TInt alen, MSearchInfo& aSearchInfo, TInfoType aKeytype);   
-	    
-	public:
-	    /**
-	     * Issue search request to network server
-	     * @param aSearchId: search id
-	     * @param aObjs: array of search elements
-	     * @param aSearchLimit: search limit
-	     */
-	  	void SearchL(const MXIMPIdentity& aSearchId,const  RPointerArray< MSearchElement >& aObjs,TInt aSearchLimit);
-
-	private: // data
-
-	    /**
-	     * Request Id 
-	     */
-	    TXIMPRequestId iRequestId;
-	    
-	    /**
-	     * Send data request to pure data handler generates the id
-	     */
-	    TInt iSendId;
-		/**
-	     * Search Id 
-	     */   
-	   	HBufC16*                  iSearchId;
-	    /**
-	     * Oss Protocol Plugin Connection Manager
-	     * Not own.  *** Write "Not own" if some other class owns this object.
-	     */
-	    MOSSProtocolConnectionManager& iConnMan;
-	    
-	};
-
-
-#endif // __CSEARCHREQUEST_H__
-
--- a/imservices/ossprotocoladaptation/inc/waittimer.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,337 +0,0 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Header for Waittimer.h.
-*
-*/
-
-#ifndef WAITTIMER_H
-#define WAITTIMER_H
-
-#include <e32base.h> // For CActive, link against: euser.lib
-#include <e32std.h>  // For RTimer, link against: euser.lib
-#include <e32property.h>
-// FORWARD DECLARATIONS
-
-class COssSendDataOperation;
-class COSSProtocolConnectionManager;
-class MOSSProtocolConnectionManager;
-class MXIMPProtocolConnectionHost;
-
-enum TDataFetchSteps
-	{
-	EDataFetchingStep1 = -1, // three	
-	EDataFetchingStep2 ,	 // -1
-//	EDataFetchingStep3,		//  0
-	EDataFetchComplete		// 1 done
-	};
-
-/**
- * CWaitTimer implementation.
- * Responsible for sending filled message queue and
- * reading response message queue when it is updated
- * keep track of updation of message queue
- */
-class CWaitTimer : public CActive
-	{
-
-	public:
-		// Cancel and destroy
-		~CWaitTimer();
-
-		// Two-phased constructor.
-		static CWaitTimer* NewL (MOSSProtocolConnectionManager& aConnMan);
-
-
-	public: // New functions
-		/**
-		 *  Function for making the initial request
-		 */
-		TInt SendDataL ( TRequestStatus& aStatus, char* msg, TInt nBytes );
-        /**
-		 *  Get response data based on the transaction id
-		 */
-		char* ResponseL ( TInt aTransId );
-		/**
-		 *  start listening on the queue to keep track of the queue updation
-		 */
-		void StartListeningL();
-		/**
-		 *  Increase operation id
-		 */
-		void IncreaseOpId();
-		/**
-		 *  Get operation id
-		 */
-		TInt GetOpId();
-		/**
-		 *  Listen Incoming data
-		 */
-
-		void ListenIncomingData ( TRequestStatus& aStatus );
-
-		/**
-		 *  Listen Incoming data count
-		 */
-
-		TInt IncomingDataCount();
-		/**
-		 *  Returns searched data count
-		 */	
-		TInt SearchDataCount();
-		
-		/**
-		 *  Returns ContactsChange Response Count
-		 */	
-		TInt ContactsChangeResponseCount();
-		
-		/** 
-		 *Listen Incoming message
-     	 */
-		TInt ListenIncomingMsg ( TRequestStatus& aStatus );
-		/**
-		 *  Cancel incoming data listening
-		 */
-		void CancelListening();
-
-		/**
-		 *  Listen Incoming message listening
-		 */
-		void CancelListeningMsg();
-		/**
-		 * returns fetchingcontinue flag
-		 */
-        TBool IsFetchingContinue();
-
-		/**
-		 *  Listen Incoming Presence notifications
-         */
-		TInt ListenIncomingPresence ( TRequestStatus& aStatus );
-		/**
-		 *  Cancel Incoming presence listening
-		 */
-		void CancelListeningPres();
-		/**
-		 *  Listen Incoming Added contact notifications
-         */
-		TInt ListenAddNotification ( TRequestStatus& aStatus );
-		/**
-		 *  Cancel listening Incoming Added contact notifications
-		 */
-		void CancelListeningAddNotication();
-		/**
-		 *  Listen Incoming network server Error notifications
-         */
-		TInt ListenIncomingServerError ( TRequestStatus& aStatus );
-		/**
-		 *  Cancel Incoming server error listening
-		 */
-		void CancelListeningServerErrors();
-		
-		/**
-		 *  issue the releasing reuest and exit
-		 */
-		void IssueReleaseRequestL();
-		
-		/**
-		 *  return ETrue if server disconnect has happen
-		 */
-		TBool IsServerDisconnect();
-		/**
-		 *  Listen any contacts change events
-         */
-		void ListenContactsChange( TRequestStatus& aStatus );
-		
-		/**
-		 *  Cancel any contacts change events listening
-		 */
-		void CancelContactsChangeListening();
-		/**
-		 *  ETrue.if fetching contacts is completed
-		 */
-		TBool IsFetchContactsCompleted();
-		
-	private:
-		/**
-		 *  C++ constructor
-		 */
-		CWaitTimer ( MOSSProtocolConnectionManager& aConnMan );
-
-		/**
-		 *  Second-phase constructor
-		 */
-		void ConstructL();
-
-	private: // From CActive
-	
-		/**
-		 *  Handles recieved message queue data.
-		 */
-		void RunL();
-
-		/**
-		 *  How to cancel me
-		 */
-		void DoCancel();
-		/**
-		 * Override to handle leaves from RunL(). Default implementation causes
-		 * the active scheduler to panic.
-		 */
-		TInt RunError ( TInt aError );
-
-	private: // new private functions
-
-		/**
-		 *  Find operationl
-		 *
-		 *  @return index in array
-		 */
-		TInt FindOperation ( TInt aOpId, TInt ( COssSendDataOperation:: *aIdFunc ) () const ) const;
-		TInt FindOperationL ( TInt aOpId, TInt ( COssSendDataOperation:: *aIdFunc ) () const ) const;
-		/**
-		 * set presence as pending into the presence cache
-		 * for the remote pending contacts
-		 * @param armsg: message to parse to get remote contacts
-		 */
-		void PendingPresenceContactsL(char* aRmessage);      
-	private:
-	    /**
-		 *  State of the active object
-		 */
-		TInt iState;  
-		/**
-		 *  Request status
-		 */
-		TRequestStatus*             iStatus1;
-		/**
-		 *  Send data operations
-		 * Own
-		 * Elements OWNed
-		 */
-		RPointerArray<COssSendDataOperation>   iOperations;
-		/**
-		 *  Logs Id iteration
-		 */
-		TInt                                    iOpidIterator;
-		/**
-		 *  Id iteration
-		 */
-		TInt                                    iOpId;
-
-		/**
-		 *  Max number of active requests
-		 */
-		TInt                                    iMaxActive;
-
-		/**
-		 *  Incoming data queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iIncomingData;
-		/**
-		 *  Incoming message queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iIncomingMsg;
-		/**
-		 *  Incoming presence information queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iIncomingPres;
-		/**
-		 *  Incoming server error queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iIncomingServerError;
-		/**
-		 *  Incoming add notifications queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iAddNotification;
-		/**
-		 *  Incoming search elements queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iSearchElements;
-		/**
-		 *  Incoming conatct change queue
-		 *  OWN
-		 */
-		RPointerArray<char>                   iContactChangeList;
-		/**
-		 *  data Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iIncReqStatus;
-		/**
-		 *   Message Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iIncMsgReqStatus;
-		/**
-		 *  Presence Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iIncPresReqStatus;
-		/**
-		 *  Error Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iIncErrorReqStatus;
-		/**
-		 *  Add Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iIncAddReqStatus;
-		/**
-		 *  Contacts Change Request Status
-		 *  OWN
-		 */
-		TRequestStatus*       iContactsChangeStatus;
-		
-		/**
-		 *  Id which is used to do logs more human readable
-		 *  OWN
-		 */
-		TInt                                    iConnectionLogsId;
-		
-	    
-        /**
-		 *  flag for checking fetching is done
-		 */
-	    TBool                                iFetchingContinue;	
-	    
-	    /**
-		 *  connection manager
-		 */
-		MOSSProtocolConnectionManager& iConnMan;
-		/**
-		 *  Flag to denote whether Msg Queue was created
-		 * this will help us in reusing the created msgqueue
-		 */
-		TBool 									iResponseMsgQCreated ;
-		/**
-		 *  ETrue if server disconnect has happen 
-		 */
-		TBool iServerDisconnected;
-		/**
-		 *  timer to trigger message queue uptation checking
-		 */
-		RTimer iTimer;
-		/**
-		 *  stores fetching steps
-		 */ 
-		TInt iFetchingStep;
-	};
-
-#endif // WAITTIMER_H
--- a/imservices/ossprotocoladaptation/rom/ossprotocoladaptation.iby	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:IBY for ossadaptation
-*
-*/
-
-
-#ifndef __OSSPROTOCOLADAPTATION_IBY__
-#define __OSSPROTOCOLADAPTATION_IBY__
-
-file=ABI_DIR\BUILD_DIR\OpenCStringUtilsLib.dll          	SHARED_LIB_DIR\OpenCStringUtilsLib.dll
-
-ECOM_PLUGIN( OSSProtocolAdaptation.dll, ossprotocoladaptation.rsc )
-
-#endif
-
-
--- a/imservices/ossprotocoladaptation/rom/ossprotocoladaptation.pkg	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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: Pkg file for ossadaptation
-;
-;Header
-#{"XIMP-TELEPATHY Adaptation Plugin"}, (0x10292DE8), 1, 0, 0
-
-;Language
-&EN
-
-;Localised VendorID
-%{"Nokia"}
-
-;VendorID
-:"Nokia"
-
-(0x101F7961), 0, 0, 0, {"Series60ProductID"}
-
-;Test data
-
-;EUnit test dlls 
-"\EPOC32\RELEASE\ARMV5\UDEB\TelepathyAdaptation.dll" - "!:\sys\bin\TelepathyAdaptation.dll"
-
-;resources 
-"\EPOC32\DATA\Z\Resource\Plugins\TelepathyAdaptation.RSC"-"!:\resource\plugins\TelepathyAdaptation.rsc"
--- a/imservices/ossprotocoladaptation/rss/ossprotocoladaptation.rss	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  ECOM registery info for Presence Framework Test Protocol
-*
-*/
-
-
-#include <ecom/registryinfov2.rh>
-
-#include <ximpprotocolpluginifids.hrh>
-
-// ---------------------------------------------------------------------------
-// ECOM registery info for XIMP Framework ECOM hook
-// ---------------------------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO theInfo
-    {
-    resource_format_version = RESOURCE_FORMAT_VERSION_2;
-    dll_uid = 0x101FB3E7;                                   // dll's own uid
-
-    interfaces =
-        {
-        INTERFACE_INFO
-            {                                               // implemented interface
-            interface_uid = XIMP_ECOM_IF_UID_PROTOCOL_PLUGIN_BASE_INTERFACE;
-            implementations =
-                {
-                IMPLEMENTATION_INFO
-                    {
-                    implementation_uid = 0x101FB3E7;        // implementation's identifier uid
-                    version_no         = 1;
-                    display_name       = "XMPP";     // Protocol display name
-                    default_data       = "XMPP";            // Protocol Id string
-                    
-                    }
-                };
-            }
-        };
-    }
-
--- a/imservices/ossprotocoladaptation/src/cosscontactmanager.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-/*
-* Copyright (c) 2007-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:  contact manager
-*
-*/
-
-#include "cosscontactmanager.h"
-#include "mossprotocolconnectionmanager.h"
-
-#include <ximpobjectfactory.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpidentity.h>
-#include <ximpobjectcollection.h>
-#include <presenceobjectfactory.h>
-#include <protocolpresencedatahost.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <presencegrantrequestinfo.h>
-#include <protocolpresenceauthorizationdatahost.h>
-#include <mpresencebuddyinfo2.h>
-#include <presencecachewriter2.h>
-#include <avabilitytext.h>
-#include "cossprotocolconnectionmanager.h"
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::COSSContactManager()
-// ---------------------------------------------------------------------------
-//
-COSSContactManager::COSSContactManager(MOSSProtocolConnectionManager& aConnMan):
-    iConnMan ( aConnMan )
-	{
-	
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSContactManager::ConstructL()
-	{	
-	iFetchContactsFirstTime  = EFalse;
-	iFetchInvitationsFirstTime = EFalse;	
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSContactManager* COSSContactManager::NewL(MOSSProtocolConnectionManager& aConnMan)
-	{
-
-	COSSContactManager* self = new ( ELeave )COSSContactManager(aConnMan);
-
-	CleanupStack::PushL ( self );
-
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::~COSSProtocolConnectionManager()
-// ---------------------------------------------------------------------------
-//
-COSSContactManager::~COSSContactManager()
-	{	
-	iContacts.ResetAndDestroy();
-	iInvitationList.ResetAndDestroy();
-	}
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::IsFetchForFirstTime()
-// ---------------------------------------------------------------------------
-//  
-TBool COSSContactManager::IsFetchContactsFirstTime()
-    { 
-    return iFetchContactsFirstTime;    
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::IsFetchInvitationsForFirstTime()
-// ---------------------------------------------------------------------------
-//  
-TBool COSSContactManager::IsFetchInvitationsForFirstTime()
-    { 
-    return iFetchInvitationsFirstTime;    
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::SetFetchForFirstTime()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::SetFetchContactsFirstTime(TBool aValue)
-    { 
-    iFetchContactsFirstTime = aValue;    
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::SetFetchInvitationsForFirstTime()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::SetFetchInvitationsForFirstTime(TBool aValue)
-    { 
-    iFetchInvitationsFirstTime = aValue;    
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::GetContactsListL()
-// ---------------------------------------------------------------------------
-//  
-RPointerArray<HBufC>& COSSContactManager::GetContactsListL()
-    {
-    return iContacts;
-    }
-// ---------------------------------------------------------------------------
-// COSSContactManager::GetInvitationListL()
-// ---------------------------------------------------------------------------
-//  
-RPointerArray<HBufC>& COSSContactManager::GetInvitationListL()
-    {
-    return iInvitationList;
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::ReturnContactsListL()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::ReturnInvitationListL()
-    {
-    MXIMPObjectFactory& prfwObjFact = iConnMan.HandleToHost().ObjectFactory();
-
-    MPresenceObjectFactory& prObjFact = iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory();
-
-    MXIMPIdentity* AuthReqIdentity = NULL ;
-    MPresenceGrantRequestInfo* presenceGrant = NULL;
-
-    MXIMPObjectCollection* listOfInvitations =  prfwObjFact.NewObjectCollectionLC();
-    
-    for ( TInt i = 0; i<iInvitationList.Count(); i++ )
-        {
-        presenceGrant = prObjFact.NewPresenceGrantRequestInfoLC();//1
-        AuthReqIdentity = prfwObjFact.NewIdentityLC();//2
-        AuthReqIdentity->SetIdentityL(*(iInvitationList[ i ] ));
-        iInvitationList[i]->Des().Fold();
-        presenceGrant->SetRequestorIdL(AuthReqIdentity);
-        listOfInvitations->AddObjectL( presenceGrant );
-        CleanupStack::Pop ( 2 );//presenceGrant, AuthReqIdentity      
-        }
-    
-    iConnMan.HandleToHost().ProtocolPresenceDataHost().AuthorizationDataHost().HandlePresenceGrantRequestListL( listOfInvitations );
-    CleanupStack::Pop ( 1 );//listOfInvitations
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::ReturnContactsListL()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::ReturnContactsListL()
-    {
-    MXIMPObjectFactory& prfwObjFact = iConnMan.HandleToHost().ObjectFactory();
-
-    MPresenceObjectFactory& prObjFact = iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory();
-
-    MXIMPIdentity* contactIdentity = NULL;
-    MPresentityGroupMemberInfo* groupMemberInfo = NULL;
-
-    MXIMPObjectCollection* listOfContacts =  prfwObjFact.NewObjectCollectionLC();
-    for(TInt i = 0;i<iContacts.Count();i++)
-        {
-        contactIdentity = prfwObjFact.NewIdentityLC();
-        groupMemberInfo = prObjFact.NewPresentityGroupMemberInfoLC();
-        contactIdentity->SetIdentityL ( *(iContacts[ i ] ));
-        groupMemberInfo->SetGroupMemberIdL ( contactIdentity );
-        groupMemberInfo->SetGroupMemberDisplayNameL ( *(iContacts[ i ] ) );
-        listOfContacts->AddObjectL ( groupMemberInfo ); 
-        CleanupStack::Pop ( 2 );//groupMemberInfo, contactIdentity
-        }
-    MXIMPIdentity* groupIdentity = prfwObjFact.NewIdentityLC();    
-    groupIdentity->SetIdentityL ( iConnMan.GroupId() );    
-    iConnMan.HandleToHost().ProtocolPresenceDataHost().GroupsDataHost().HandlePresentityGroupContentL ( groupIdentity, listOfContacts );
-    CleanupStack::Pop ( 2 );//groupIdentity,listOfContacts 
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::RemoveContactFromLocalL()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::RemoveContactFromLocalL(const TDesC& aContactName)
-    {
-    HBufC* contactName = aContactName.AllocLC();
-    MXIMPObjectFactory& ximpObjFact = iConnMan.HandleToHost().ObjectFactory();
-    MXIMPIdentity* contactIdentity = ximpObjFact.NewIdentityLC();
-    MXIMPIdentity* groupIdentity = ximpObjFact.NewIdentityLC();    
-    groupIdentity->SetIdentityL ( iConnMan.GroupId());
-    contactIdentity->SetIdentityL(*contactName);
-    //removing from the local copy of the contacts
-    for(TInt i = 0; i<iContacts.Count(); i++)
-        {                    
-        if (!contactName->Compare(*(iContacts[i])))
-            {                                                
-            iContacts.Remove( i );
-            //give info after removing. to ximp fw and client
-            iConnMan.HandleToHost().ProtocolPresenceDataHost().GroupsDataHost().HandlePresentityGroupMemberRemovedL ( groupIdentity, contactIdentity );
-            break;
-            }
-        }
-    CleanupStack::Pop( 2 ); // contactIdentity , groupIdentity
-    CleanupStack::PopAndDestroy( 1 ); //contactName
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::AddContactToLocalL()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::AddContactToLocalL(const TDesC& aContactName)
-    {    
-    HBufC* contactName = aContactName.AllocLC();
-    MXIMPObjectFactory& ximpObjFact = iConnMan.HandleToHost().ObjectFactory();
-    MXIMPIdentity* contactIdentity = ximpObjFact.NewIdentityLC();
-    MXIMPIdentity* groupIdentity = ximpObjFact.NewIdentityLC();    
-    groupIdentity->SetIdentityL ( iConnMan.GroupId());
-    contactIdentity->SetIdentityL(*contactName);    
-    iContacts.AppendL(contactName);
-    groupIdentity->SetIdentityL ( iConnMan.GroupId());
-    contactIdentity->SetIdentityL(*contactName);
-    MPresentityGroupMemberInfo* groupMemberInfo = iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory().NewPresentityGroupMemberInfoLC();   
-    groupMemberInfo->SetGroupMemberIdL ( contactIdentity );
-    groupMemberInfo->SetGroupMemberDisplayNameL ( *contactName );                
-    iConnMan.HandleToHost().ProtocolPresenceDataHost().GroupsDataHost().HandlePresentityGroupMemberAddedL ( groupIdentity, groupMemberInfo );    
-
-    //set presence as pending for the added contact
-    MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
-   
-    MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-    CleanupDeletePushL(presenceCacheWriter);
-    HBufC* name = HBufC::NewLC( aContactName.Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-    TPtr namePtr( name->Des() );
-    namePtr.Zero();
-    namePtr.Append(iConnMan.ServiceName() ); // prepend service name
-    namePtr.Append(KColon);
-    namePtr.Append(aContactName );
-    buddyPresInfo->SetIdentityL(namePtr);
-    buddyPresInfo->SetAnyFieldL(KExtensionKey,KPendingRequestExtensionValue());
-    CleanupStack::PopAndDestroy(1);//name
-
-    // Writing into Presence Cache
-    TInt cacheerror = presenceCacheWriter->WritePresenceL(buddyPresInfo);
-    User::LeaveIfError ( cacheerror);
-    CleanupStack::PopAndDestroy(2);//presenceCacheWriter,buddyPresInfo
-    CleanupStack::Pop( 4 ); // contactName, contactIdentity , groupIdentity , groupMemberInfo    
-    }
-
-// ---------------------------------------------------------------------------
-// COSSContactManager::RemoveInvitationFromLocalL()
-// ---------------------------------------------------------------------------
-//  
-void COSSContactManager::RemoveInvitationFromLocalL(const TDesC& aContactName)
-    {
-    MXIMPObjectFactory& ObjFact = iConnMan.HandleToHost().ObjectFactory();
-    MPresenceObjectFactory& prfwObjFact = iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory();
-    MXIMPIdentity* authReqIdentity = ObjFact.NewIdentityLC();//1
-    if( authReqIdentity )
-        {
-        authReqIdentity->SetIdentityL(aContactName);   
-        for(TInt i = 0; i<iInvitationList.Count(); i++)
-            {
-            HBufC* findInvitation = iInvitationList[i];
-            if ( findInvitation && !aContactName.Compare( *findInvitation) )
-                {                                                
-                iInvitationList.Remove( i ); 
-                delete findInvitation;
-                findInvitation = NULL;
-                iInvitationList.Compress();
-                iConnMan.HandleToHost().ProtocolPresenceDataHost().AuthorizationDataHost().HandlePresenceGrantRequestObsoletedL(authReqIdentity);
-                CleanupStack::Pop();   //AuthReqIdentity
-                return;
-                }
-            }          
-        CleanupStack::PopAndDestroy();   //AuthReqIdentity
-        }
-    }
-// End of File
-
-
--- a/imservices/ossprotocoladaptation/src/cossprotocolconnection.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,415 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss protocol plugin connection
-*
-*/
-
-#include "cossprotocolconnection.h"
-
-#include <badesca.h>
-#include <ximpcontextclientinfo.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpprotocolconnection.h>
-#include <protocolpresencefeatures.h>
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <presenceinfo.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpserviceinfo.h>
-#include <ximpfeatureinfo.h>
-
-#include "cossprotocolconnectionmanager.h"
-#include "cossprotocolpresencefeatures.h"
-#include "cossprotocolimfeatures.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolloginrequest.h"
-#include "mossprotocolconnectionmanager.h"
-
-#include <protocolsearchfeature.h>
-#include "cossprotocolsearchfeatures.h"
-#include "cossprotocollogoutrequest.h"
-#include <ximperrors.hrh>
-
-// ======== COSSProtocolConnection - MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::COSSProtocolConnection()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnection::COSSProtocolConnection()
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::COSSProtocolConnection() Start-End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::ConstructL (
-    const MXIMPServiceInfo&  aServiceInfo ,
-    const MXIMPContextClientInfo& aClientCtxInfo )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ConstructL() Start" ) );
-
-	PLUGIN_UNUSED_PARAM ( aClientCtxInfo );
-	iConnMan = COSSProtocolConnectionManager::NewL();
-
-	iConnMan->SetConnectionParamsL ( aServiceInfo.UserId(),
-	                                 aServiceInfo.Password(),
-	                                 aServiceInfo.IapId() );
-	iPresFeatures = COSSProtocolPresenceFeatures::NewL ( *iConnMan );
-	iImFeatures = COSSProtocolImFeatures::NewL ( *iConnMan );
-	iSearchFeatures= COSSProtocolSearchFeature::NewL ( *iConnMan );
-	LOGGER ( TXT ( "COSSProtocolConnection::ConstructL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnection* COSSProtocolConnection::NewL (
-    const MXIMPServiceInfo& aServiceInfo,
-    const MXIMPContextClientInfo& aClientCtxInfo )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::NewL() Start" ) );
-
-	COSSProtocolConnection* self = new ( ELeave ) COSSProtocolConnection;
-	CleanupStack::PushL ( self );
-	self->ConstructL ( aServiceInfo, aClientCtxInfo );
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolConnection::NewL() End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::~COSSProtocolConnection()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnection::~COSSProtocolConnection()
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::~COSSProtocolConnection() Start" ) );
-
-    delete iSearchFeatures;
-	delete iConnMan;
-	delete iPresFeatures;
-	delete iImFeatures;
-	LOGGER ( TXT ( "COSSProtocolConnection::~COSSProtocolConnection() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolConnection::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MXIMPProtocolConnection::KInterfaceId )
-		{
-		MXIMPProtocolConnection* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolConnection, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolConnection::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::GetInterface() const
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolConnection::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::GetInterface() const Start" ) );
-
-	if ( aInterfaceId == MXIMPProtocolConnection::KInterfaceId )
-		{
-		const MXIMPProtocolConnection* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-		{
-		User::Panic ( KOSSProtocolConnection, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolConnection::GetInterface() const End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::GetInterfaceId() const
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolConnection::GetInterfaceId() const
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::GetInterfaceId() Start-End" ) );
-	return MXIMPProtocolConnection::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::PrimeHost()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::PrimeHost ( MXIMPProtocolConnectionHost& aHost )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::PrimeHost() Start" ) );
-
-	iConnMan->SetHost ( aHost );
-
-	LOGGER ( TXT ( "COSSProtocolConnection::PrimeHost() Start" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::OpenSessionL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::OpenSessionL (
-    const MXIMPContextClientInfo& /*aClientCtxInfo*/,
-    TXIMPRequestId aOpId )
-	{
-	if( iConntectionCreated )
-		{
-		iConntectionCreated++;
-		iConnMan->HandleToHost().HandleRequestCompleted(aOpId,KErrNone);
-		}
-	else
-		{
-		LOGGER(TXT("COSSProtocolConnection::OpenSessionL \n"));
-		COSSProtocolLoginRequest* req = 
-		COSSProtocolLoginRequest::NewLC( *iConnMan, aOpId );
-
-		req->IssueLoginRequestL();
-		CleanupStack::Pop( req );	
-		iConntectionCreated++;	
-		}
-
-	LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::OpenSessionL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::OpenSessionL ( const TInt& aServiceId,
-        TXIMPRequestId aReqId )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionLsettingsid \n" ) );
-	if( iConntectionCreated )
-		{
-		iConntectionCreated++;
-		iConnMan->HandleToHost().HandleRequestCompleted(aReqId,KErrNone);
-		}
-	else
-		{
-		TInt error = iConnMan->SetConnectionParamsL ( aServiceId );
-		LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionL settings id is %d" ), aServiceId );
-
-		if( error == KErrNotFound )
-			{
-			iConnMan->HandleToHost().HandleRequestCompleted(aReqId,KXIMPErrServiceGeneralError);
-			}
-		else
-			{
-			COSSProtocolLoginRequest* req =
-			COSSProtocolLoginRequest::NewLC ( *iConnMan, aReqId );	
-			req->IssueLoginRequestL();
-			CleanupStack::Pop ( req );
-			iConntectionCreated++;	
-			}
-		}
-
-	LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionLsettingsid() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::OpenSessionL()
-// ---------------------------------------------------------------------------
-//
-
-void COSSProtocolConnection::OpenSessionL (
-    const MXIMPContextClientInfo& /*aContextClient*/,
-    const TInt& /*aSettingsId*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::CloseSession()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::CloseSession (
-    const MXIMPContextClientInfo& /*aClientCtxInfo*/,
-    TXIMPRequestId aOpId )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::CloseSession() Start" ) );
-    iConntectionCreated--;
-    
-    // if server already disconnected no need to issue logout request
-    TBool serverdisconnect = iConnMan->IsServerDisconnect();
-    
-    if(!iConntectionCreated && !serverdisconnect ) 
-		{
-		iRequestId = aOpId;
-        TRAPD(error,LogoutRequestL(aOpId));
-        	if( KErrNone != error )
-        	{
-			iConnMan->HandleToHost().HandleRequestCompleted(aOpId,error);
-			
-        	}
-		}
-	else
-		{
-		iConnMan->HandleToHost().HandleRequestCompleted(aOpId,KErrNone);
-		}
-	LOGGER ( TXT ( "COSSProtocolConnection::CloseSession() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::ReOpenSessionsL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::ReOpenSessionsL ( TXIMPRequestId /*aOpId*/ )
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ReOpenSessionsL() Start" ) );
-
-	LOGGER ( TXT ( "COSSProtocolConnection::ReOpenSessionsL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::GetSupportedFeaturesL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::GetSupportedFeaturesL ( CDesC8Array& aFeatures ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::GetSupportedFeaturesL() Start End" ) );
-	// first empty the whole array
-	aFeatures.Reset();
-	// then add our features there
-	// currently we are not doing any negotiation from the server for the supported features.
-	// based on our implimentation we are hardcoding these values.
-	// actual implimentatiion requires client server negotiation to tackle supported features.
-	
-	using namespace NXIMPFeature::Presence;
-	aFeatures.AppendL( KPublish );
-	aFeatures.AppendL( KFetch );
-	aFeatures.AppendL( KSubscribe );    
-	aFeatures.AppendL( KUnsubscribe );    
-	aFeatures.AppendL( KAddContact  );
-	aFeatures.AppendL( KDeleteContact  );	
-	aFeatures.AppendL( KAvatar  );
-	
-	using namespace NXIMPFeature::InstantMessage;
-	aFeatures.AppendL( KInstantMessage );
-	
-	using namespace NXIMPFeature::Search;
-	aFeatures.AppendL( KSearch );
-
-	LOGGER ( TXT ( "COSSProtocolConnection::GetSupportedFeaturesL" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::ProtocolPresenceFeatures()
-// ---------------------------------------------------------------------------
-//
-MProtocolPresenceFeatures& COSSProtocolConnection::ProtocolPresenceFeatures()
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ProtocolPresenceFeatures() Start " ) );
-	return *iPresFeatures;
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::ProtocolImFeatures()
-// ---------------------------------------------------------------------------
-//
-/*
-CProtocolImFeatures* COSSProtocolConnection::ProtocolImFeatures()
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ProtocolImFeatures() Start " ) );
-	return iImFeatures;
-	}*/
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::ReleaseConnectionL()
-// ---------------------------------------------------------------------------
-//
-
-void COSSProtocolConnection::ReleaseConnectionL()
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ReleaseConnectionL() Start " ) );
-	if( iConnMan )
-		{
-		iConnMan->ReleaseConnectionL();
-		}
-
-	LOGGER ( TXT ( "COSSProtocolConnection::ReleaseConnectionL() End" ) );
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::LogoutRequestL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnection::LogoutRequestL(TXIMPRequestId aOpId)
-	{
-		COSSProtocolLogoutRequest* req = COSSProtocolLogoutRequest::NewLC ( *iConnMan, aOpId );
-
-		req->IssueLogoutRequestL();
-
-		CleanupStack::Pop ( req );
-	
-	
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::GetProtocolInterface
-// ---------------------------------------------------------------------------
-//	
-	
-TAny* COSSProtocolConnection::GetProtocolInterface(TInt aInterfaceId)
-	{
-	LOGGER ( TXT ( "COSSProtocolConnection::ProtocolImFeatures() Start " ) );
-	
-	//return iImFeatures->GetInterface(aInterfaceId, MXIMPBase::EPanicIfUnknown );
-	
-	if(aInterfaceId == CProtocolImFeatures::KInterfaceId)
-		{
-		return iImFeatures->GetInterface(aInterfaceId, MXIMPBase::EPanicIfUnknown ); 
-		}
-		
-    else if(aInterfaceId == MProtocolSearchFeature::KInterfaceId)
-		{
-		return  iSearchFeatures->GetInterface(aInterfaceId, MXIMPBase::EPanicIfUnknown ) ;
-		}		
-	
-    return NULL;
-	}
-
--- a/imservices/ossprotocoladaptation/src/cossprotocolconnectionmanager.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,371 +0,0 @@
-/*
-* Copyright (c) 2007-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:  connection manager
-*
-*/
-
-#include "cossprotocolconnectionmanager.h"
-#include "cossprotocolservererrorhandler.h"
-#include "ccontactsynchandler.h"
-#include <e32std.h>
-#include <e32base.h>
-#include <ximpobjectfactory.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpstatus.h>
-#include "xmppservicesettingsapi.h"
-#include "xmppparams.h" //from xmppsettingsapi
-
-#include "xmppsettingsfetcher.h"
-#include "xmppparameters.h"
-#include "waittimer.h"
-
-#include <spsettings.h>
-#include <spentry.h>
-#include <spproperty.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::COSSProtocolConnectionManager()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnectionManager::COSSProtocolConnectionManager()
-	{
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnectionManager::ConstructL()
-	{
-	iXmppParams = CXmppParameters::NewL();
-	iTimer = CWaitTimer::NewL (*this);
-	iTimer->StartListeningL();  //start listening message queue updation
-	iNotifier = CPresenceNotificationHandler::NewL ( *this );
-	iNotifier->StartListeningL();  //start listening presence notifications
-	iSearchKeyStore = CSearchKeyStore::NewL();
-	iContactManager = COSSContactManager::NewL( *this );
-	
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnectionManager* COSSProtocolConnectionManager::NewL()
-	{
-
-	COSSProtocolConnectionManager* self = new ( ELeave )
-									      COSSProtocolConnectionManager();
-
-	CleanupStack::PushL ( self );
-
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::~COSSProtocolConnectionManager()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolConnectionManager::~COSSProtocolConnectionManager()
-	{
-	delete iXmppParams;
-	delete iNotifier;
-	delete iRecvHandler;
-	delete iServerErrorHandler;
-	delete iAddNotificationHanlder;
-	delete iContactSyncHandler;
-	delete iUserName;
-	delete iPassword;
-	delete iTimer;
-	delete iGroupId;
-	delete iContactManager;
-	delete iSearchKeyStore;
-	if(iServiceName)
-	    {
-	    delete iServiceName;
-	    }
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::Username
-// ---------------------------------------------------------------------------
-//
-TDesC& COSSProtocolConnectionManager::UserName()
-	{
-	return *iUserName;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::Password
-// ---------------------------------------------------------------------------
-//
-TDesC& COSSProtocolConnectionManager::Password()
-	{
-	return *iPassword;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GroupID
-// ---------------------------------------------------------------------------
-//
-TDesC& COSSProtocolConnectionManager::GroupId()
-	{
-	return *iGroupId;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GroupID
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnectionManager::SetGroupIDL(TDesC& aGroupId)
-	{
-	HBufC* tmpId = aGroupId.AllocL();
-	delete iGroupId;
-	iGroupId=NULL;
-	iGroupId = tmpId ;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::XmppParams
-// ---------------------------------------------------------------------------
-//
-CXmppParameters& COSSProtocolConnectionManager::XmppParams()
-	{
-	return *iXmppParams;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::DataHandler()
-// ---------------------------------------------------------------------------
-//
-CWaitTimer& COSSProtocolConnectionManager::DataHandler()
-	{
-	return *iTimer;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::HandleToHost()
-// ---------------------------------------------------------------------------
-//
-MXIMPProtocolConnectionHost& COSSProtocolConnectionManager::HandleToHost()
-	{
-	return *iHostHandle;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::SetHost()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnectionManager::SetHost ( MXIMPProtocolConnectionHost& aHost )
-	{
-	iHostHandle = &aHost;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::SetConnectionParamsL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnectionManager::SetConnectionParamsL ( const TDesC& aUserName,
-        const TDesC& aPassword,
-        const TInt32 aServiceId )
-	{
-
-	// first store the login parameters
-
-	HBufC* tmpBuf = aUserName.AllocL();
-	delete iUserName;
-	iUserName = tmpBuf;
-
-	tmpBuf = aPassword.AllocL();
-	delete iPassword;
-	iPassword = tmpBuf;
-
-	SetConnectionParamsL( aServiceId, EFalse );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::ManufactureDataHandlerL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolConnectionManager::ManufactureDataHandlerL()
-	{
-	if(!iIsDataHandlerReady)
-		{
-		iRecvHandler = CReceiveMessageHandler::NewL ( *this );
-		iRecvHandler->StartListeningL();//start listening incoming messages
-		iServerErrorHandler = COssprotocolServerErrorHandler::NewL ( *this );
-		iServerErrorHandler->StartListeningL();//start listening incoming messages
-		iAddNotificationHanlder = CAddContactNotificationHandler::NewL ( *this );
-		iContactSyncHandler = CContactSyncHandler::NewL(*this);
-		iContactSyncHandler->StartListening(); // listening for contacts changes
-		iIsDataHandlerReady = ETrue;
-		}
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::SetConnectionParamsL
-// ---------------------------------------------------------------------------
-//
-TInt COSSProtocolConnectionManager::SetConnectionParamsL ( const TUint32 aServiceId , TBool aReadNeeded /* = ETrue*/ )
-	{
-		// Get the service setting id and service name	
-	TInt error = KErrNone;
-	
-	CSPSettings* settings = CSPSettings::NewLC();
-	
-	if(aReadNeeded)
-		{
-		TInt settingsId = 0; 
-		CSPProperty* property = CSPProperty::NewLC();
-		settings->FindPropertyL( aServiceId,
-		               			 ESubPropertyIMSettingsId,
-		                		*property );    
-		if ( property )
-			{
-			property->GetValue( settingsId );
-			}
-		// read settings
-
-		error = CXmppSettingsFetcher::ReadSettingsL ( settingsId, *iXmppParams ); //settings id is used to read settings
-
-		CleanupStack::PopAndDestroy(); // property
-
-		}
-	// read service name 	
-	CSPEntry* entry = CSPEntry::NewLC();
-    settings->FindEntryL( aServiceId, *entry ) ;
-    
-    // set the service name to presence cache updater
-    if(iServiceName)
-        {
-        delete iServiceName;
-        iServiceName = NULL;
-        }
-    iServiceName = entry->GetServiceName().AllocL();
-    CleanupStack::PopAndDestroy(2); // entry, settings
-    
-	return error;
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::PresenceAuthGrantReqList()
-// ---------------------------------------------------------------------------
-//	
-RArray< HBufC >* COSSProtocolConnectionManager::PresenceAuthGrantReqList()
-	{
-	return &iPresenceAuthGrantReqList;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::ReleaseConnectionL()
-// ---------------------------------------------------------------------------
-//	
-void COSSProtocolConnectionManager::ReleaseConnectionL()
-	{
-	if( iTimer )
-		{
-		iTimer->IssueReleaseRequestL();	
-		}
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::IsServerDisconnect()
-// ---------------------------------------------------------------------------
-//	
-TBool COSSProtocolConnectionManager::IsServerDisconnect()
-	{
-	return iTimer->IsServerDisconnect();	
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::SetImHost
-// ---------------------------------------------------------------------------
-//	
-	
-void COSSProtocolConnectionManager::SetImHost(MProtocolImDataHost& aHost)
-	{
-	iHost = &aHost ;
-	}	
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GetImHost()
-// ---------------------------------------------------------------------------
-//
-MProtocolImDataHost& COSSProtocolConnectionManager::GetImHost()
-	{
-	return *iHost;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GetAddNotificationHandler()
-// ---------------------------------------------------------------------------
-//
-CAddContactNotificationHandler& COSSProtocolConnectionManager::GetAddNotificationHandler()
-    {
-    return *iAddNotificationHanlder;
-    }
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::SetSearchHost
-// ---------------------------------------------------------------------------
-//		
-void COSSProtocolConnectionManager::SetSearchHost(MProtocolSearchDataHost& aSearchHost)
-	{
-	iSearchHost = &aSearchHost ;
-	}	
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GetSearchHost()
-// ---------------------------------------------------------------------------
-//	
-MProtocolSearchDataHost& COSSProtocolConnectionManager::GetSearchHost()
-	{
-	return *iSearchHost;
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GetSearchKeyStore()
-// ---------------------------------------------------------------------------
-//	
-CSearchKeyStore& COSSProtocolConnectionManager::GetSearchKeyStore()
-	{
-	return *iSearchKeyStore;		
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::GetContactManager()
-// ---------------------------------------------------------------------------
-//
-COSSContactManager& COSSProtocolConnectionManager::GetContactManager()
-    {
-    return *iContactManager;
-    }
-// ---------------------------------------------------------------------------
-// COSSProtocolConnectionManager::ServiceName()
-// ---------------------------------------------------------------------------
-//
-const TDesC& COSSProtocolConnectionManager::ServiceName()
-    {
-    return *iServiceName;
-    }
-// End of File
-
-
--- a/imservices/ossprotocoladaptation/src/cossprotocolimfeatures.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss protocol plugin im features
-*
-*/
-
-#include "cossprotocolimfeatures.h"
-#include <protocolimconversation.h>
-#include <badesca.h>
-#include "cossprotocolimconversation.h"
-#include "ossprotocolpluginlogger.h"
-
-_LIT ( KOSSProtocolImFeatures, "COSSProtocolImFeatures" );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::COSSProtocolImFeatures()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImFeatures::COSSProtocolImFeatures(COSSProtocolConnectionManager& aConnMan) : iConnMan (aConnMan)
-	{
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImFeatures::ConstructL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-	iImConversation = COSSProtocolImConversation::NewL ( aConnMan );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImFeatures* COSSProtocolImFeatures::NewL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-
-	COSSProtocolImFeatures* self = new ( ELeave ) COSSProtocolImFeatures(aConnMan);
-	CleanupStack::PushL ( self );
-	self->ConstructL ( aConnMan );
-	CleanupStack::Pop ( self );
-
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::~COSSProtocolImFeatures()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImFeatures::~COSSProtocolImFeatures()
-	{
-	delete iImConversation;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolImFeatures::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	if ( aInterfaceId == CProtocolImFeatures::KInterfaceId )
-		{
-		CProtocolImFeatures* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolImFeatures, KErrExtensionNotSupported );
-		}
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolImFeatures::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-
-	if ( aInterfaceId == CProtocolImFeatures::KInterfaceId )
-		{
-		const CProtocolImFeatures* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-		{
-		User::Panic ( KOSSProtocolImFeatures, KErrExtensionNotSupported );
-		}
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::GetInterfaceId() const
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolImFeatures::GetInterfaceId() const
-	{
-	return CProtocolImFeatures::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::ImConversation()
-// ---------------------------------------------------------------------------
-//
-MProtocolImConversation& COSSProtocolImFeatures::ImConversation()
-	{
-	return *iImConversation;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::ImGroup()
-// ---------------------------------------------------------------------------
-//
-MProtocolImGroup& COSSProtocolImFeatures::ImGroup()
-	{
-	MProtocolImGroup* dummyGroup = NULL;
-	return *dummyGroup;
-	//Not supported
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::ImInvitation()
-// ---------------------------------------------------------------------------
-//
-MProtocolImInvitation& COSSProtocolImFeatures::ImInvitation()
-	{
-	//Not supported
-	MProtocolImInvitation* dummyInvitation = NULL;
-	return *dummyInvitation;
-	
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::SupportedSubInterfaces()
-// ---------------------------------------------------------------------------
-//
-TInt COSSProtocolImFeatures::SupportedSubInterfaces() const
-    {
-    return KErrNone;
-    
-    }
-// ---------------------------------------------------------------------------
-// COSSProtocolImFeatures::ImSearch()
-// ---------------------------------------------------------------------------
-//
-MProtocolImSearch& COSSProtocolImFeatures::ImSearch()
-	{
-	//ignore compiler worning ,Not supported
-	MProtocolImSearch* dummySearch = NULL;
-	return *dummySearch;
-
-	}
-void COSSProtocolImFeatures::SetHost(MProtocolImDataHost& aHost )
-	{
-		iHost = &aHost ;
-		iConnMan.SetImHost(aHost) ;
-	}
-	
-// End of file
--- a/imservices/ossprotocoladaptation/src/cossprotocolloginrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,420 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Login Request to the Network Server.
-*
-*/
-
-
-#include "cossprotocolloginrequest.h"
-#include <ximpprotocolconnectionhost.h>
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolconnection.h"
-#include "cossprotocolconnectionmanager.h"
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "xmppparameters.h"
-#include "waittimer.h"
-#include <e32math.h>
-
-#include <ximperrors.hrh>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::COSSProtocolLoginRequest()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLoginRequest::COSSProtocolLoginRequest (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId ) :
-		CActive ( CActive::EPriorityStandard  ),
-		iRequestId ( aRequestId ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest Start" ) );
-	CActiveScheduler::Add ( this );
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest End" ) );
-	}
-
-// COSSProtocolLoginRequest::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLoginRequest::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest Start-End" ) );
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::COSSProtocolLoginRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLoginRequest* COSSProtocolLoginRequest::NewL (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::NewL Start" ) );
-
-	COSSProtocolLoginRequest* self =
-	    new ( ELeave ) COSSProtocolLoginRequest ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::NewLC()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLoginRequest* COSSProtocolLoginRequest::NewLC (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::NewLC Start" ) );
-
-	COSSProtocolLoginRequest* self =
-	    COSSProtocolLoginRequest::NewL ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::~COSSProtocolLoginRequest()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLoginRequest::~COSSProtocolLoginRequest()
-	{
-	LOGGER ( TXT ( "::~COSSProtocolLoginRequest Start-End" ) );
-	Cancel();
-	if( iUserName )
-	    {
-	    delete iUserName;
-	    }
-
-	LOGGER ( TXT ( "::~COSSProtocolLoginRequest End\n" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLoginRequest::DoCancel()
-	{
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLoginRequest::RunL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL Start" ) );
-	message_hdr_resp* msg_struct = NULL;
-	User::LeaveIfError ( iStatus.Int() );
-    char* pResponse = NULL;  
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-
-	msg_struct = ( message_hdr_resp* )pResponse ;
-	if( !( msg_struct->response ) )
-	{
-		switch( msg_struct->error_type )
-		{
-		case ELOGIN_NETWORK_ERROR:
-		    LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL ELOGIN_NETWORK_ERROR" ) );
-		case ELOGIN_NONE_SPECIFIED:
-		    //XImpfw is not giving any error code for canceling accespoint so we are using KErrDisconnected
-		    //once error code is provided by ximpfw we can remove 
-		    LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL ELOGIN_NONE_SPECIFIED" ) );
-		    iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrDisconnected );
-		    break;
-		case ELOGIN_AUTHENTICATION: //The username or password was invalid. 
-		    LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL ELOGIN_AUTHENTICATION" ) );
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceAuthenticationFailed );
-		       break;
-		default:  //for all other error codes like ssl related are mapped to general error ELOGIN_AUTHORIZATION
-                LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL defualt" ) );
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-		       break;       
-		}	
-	}
-	else
-	    {
-	    iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	    MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
-	    MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-	    HBufC* userName = HBufC::NewLC( iUserName->Length() + iConnMan.ServiceName().Length() + KColon().Length() );     
-	    TPtr namePtr( userName->Des() );
-	    namePtr.Zero();
-	    namePtr.Append(iConnMan.ServiceName()); // prepend service name
-	    namePtr.Append(KColon);
-	    namePtr.Append(iUserName->Des() );
-	    buddyPresInfo->SetIdentityL(namePtr);
-	    LOGGER ( TXT ( "COSSProtocolLoginRequest::owndata:%S " ), userName ); 
-	    CleanupStack::PopAndDestroy();//userName      
-	    _LIT(KAvailable,"available");//since not getting the own status from downlayer.here 
-	    _LIT(KStatusTest,"Online");//is hardcoded once logged in is successfully
-	    HBufC16 *message = KAvailable().AllocLC();      
-	    buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EAvailable,*message);                 
-	    HBufC16 *statusmessage = KStatusTest().AllocLC();
-	    buddyPresInfo->SetStatusMessageL(*statusmessage);
-
-	    TInt cacheerror = presenceCacheWriter->WritePresenceL(buddyPresInfo);
-	    User::LeaveIfError ( cacheerror);
-	    CleanupStack::PopAndDestroy ( 3 ); //buddyPresInfo, message ,statusmessage
-	    delete presenceCacheWriter ;
-	    }
-	   
-	    
-	free( pResponse );
-	delete this;
-
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL End" ) );
-
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::RunError()
-// ---------------------------------------------------------------------------
-//
-TInt COSSProtocolLoginRequest::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::RunError Start" ) );
-
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, aError );
-
-	delete this;
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::RunError End" ) );
-	return KErrNone;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::IssueLoginRequestL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLoginRequest::IssueLoginRequestL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::IssueLoginRequestL Start" ) );
-
-	char *smsg = NULL;
-	char *tmpmsg = NULL;
-	message_hdr_req msgHdr = {0,};
-	int userLen = 0;
-	int totalLen = 0;
-	int err = 0;
-
-	smsg = ( char* ) User::AllocLC(MAX_MSG_SIZE);
-
-	tmpmsg = ( char* ) User::AllocLC(MAX_MSG_SIZE);
-
-	HBufC* buffer = HBufC::NewLC ( MAX_MSG_SIZE );
-	TPtr bufferPtr ( buffer->Des() );
-	bufferPtr.Zero();
-	memset ( smsg, '\0', MAX_MSG_SIZE );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-
-	msgHdr.message_type = ELogin_Request;
-	iConnMan.DataHandler().IncreaseOpId();
-	TInt Opid = iConnMan.DataHandler().GetOpId();
-	msgHdr.request_id = Opid;
-	memcpy ( smsg, &msgHdr, sizeof ( message_hdr_req ) );
-	totalLen += sizeof ( message_hdr_req );
-	bufferPtr.Zero();
-
-	if ( iConnMan.UserName().Length() == 0 && iConnMan.Password().Length() == 0 ) //if username and pwd are not passed from client.read default settings
-		{
-		bufferPtr.Append ( iConnMan.XmppParams().UserName() );
-		iUserName = bufferPtr.AllocL();
-		LOGGER ( TXT ( "COSSProtocolLoginRequest::UserName:%S " ), & ( iConnMan.XmppParams().UserName() ) );
-		memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-		err = tbufC16tochar ( bufferPtr, tmpmsg );
-		if( -1 == err)
-		{
-		iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, err );
-		}
-		userLen = strlen ( tmpmsg ) + 1; //for '\0'
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-		totalLen += userLen;
-
-		bufferPtr.Zero();
-		bufferPtr.Append ( iConnMan.XmppParams().Passwd() );
-		memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-		err = tbufC16tochar ( bufferPtr, tmpmsg );
-		userLen = strlen ( tmpmsg ) + 1; //for '\0'
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-		totalLen += userLen;
-		}
-	else
-		{
-		iUserName =  iConnMan.UserName().AllocL();
-		bufferPtr.Append ( iConnMan.UserName() );
-		LOGGER ( TXT ( "COSSProtocolLoginRequest::UserName:%S " ), & ( iConnMan.UserName() ) );
-		memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-		err = tbufC16tochar ( bufferPtr, tmpmsg );
-		userLen = strlen ( tmpmsg ) + 1; //for '\0'
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-		totalLen += userLen;
-
-		bufferPtr.Zero();
-		bufferPtr.Append ( iConnMan.Password() );
-		memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-		err = tbufC16tochar ( bufferPtr, tmpmsg );
-		userLen = strlen ( tmpmsg ) + 1; //for '\0'
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-		totalLen += userLen;
-
-		}
-
-	bufferPtr.Zero();
-
-	bufferPtr.Append ( iConnMan.XmppParams().ServerAddress() );
-	LOGGER ( TXT ( "COSSProtocolLoginRequest::RunL:ServerAddress:%S " ), & ( iConnMan.XmppParams().ServerAddress() ) );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-	//resource
-	bufferPtr.Zero();
-    bufferPtr.Append ( 	GenResourceId(iConnMan.XmppParams().Resource()) );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-	//ssl
-	bufferPtr.Zero();
-	bufferPtr.AppendNum ( iConnMan.XmppParams().Ssl() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-	//ServerPort
-	bufferPtr.Zero();
-	bufferPtr.AppendNum ( iConnMan.XmppParams().ServerPort() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-	//IapId
-	bufferPtr.Zero();
-	bufferPtr.AppendNum ( iConnMan.XmppParams().IapId() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-	
-	//connmgr_bus
-	bufferPtr.Zero();
-	bufferPtr.Append ( iConnMan.XmppParams().ConnMgrBus() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-	
-	//connmgr_path
-	bufferPtr.Zero();
-	bufferPtr.Append ( iConnMan.XmppParams().ConnMgrPath() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-	
-	//protocol
-	bufferPtr.Zero();
-	bufferPtr.Append ( iConnMan.XmppParams().Protocol() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-#ifdef __WINSCW__
-	//ProxyServer
-	bufferPtr.Zero();
-	bufferPtr.Append ( iConnMan.XmppParams().ProxyServer() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-
-	//ProxyPort
-	bufferPtr.Zero();
-	bufferPtr.AppendNum ( iConnMan.XmppParams().ProxyPort() );
-	memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-	err = tbufC16tochar ( bufferPtr, tmpmsg );
-	userLen = strlen ( tmpmsg ) + 1; //for '\0'
-	memcpy ( smsg + totalLen, tmpmsg, userLen );
-	totalLen += userLen;
-#endif
-
-
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-
-	// signal the scheduler
-	SetActive();
-	CleanupStack::PopAndDestroy (buffer);
-	CleanupStack::PopAndDestroy (tmpmsg);
-	CleanupStack::PopAndDestroy (smsg);
-	LOGGER ( TXT ( "COSSProtocolConnection::OpenSessionL() End" ) );
-	}
-// ---------------------------------------------------------------------------
-// COSSProtocolLoginRequest::GenResourceId()
-// ---------------------------------------------------------------------------
-//
-TPtrC COSSProtocolLoginRequest::GenResourceId( const TDesC& aResourceId )
-    {
-    	TBuf<KImpsMaxResourceIdLen> tempRId = aResourceId;
-        //initialise client id
-	    iResourceId.SetLength(0);
-	    
-	    //generate Resourse here
-	    iResourceId.Append(tempRId);
-		    
-	    TTime time;
-		time.HomeTime();
-		TInt64 seed = time.Int64();
-	    
-	    TInt i = Math::Rand( seed );
-
-		iResourceId.AppendFormat( _L("%d"), i);
-	
-		return iResourceId;
-     }  
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/cossprotocollogoutrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Login Request to the Network Server.
-*
-*/
-
-
-#include "cossprotocollogoutrequest.h"
-#include <ximpprotocolconnectionhost.h>
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolconnection.h"
-#include "cossprotocolconnectionmanager.h"
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include "msgliterals.h"
-#include "xmppparameters.h"
-#include "msg_enums.h"
-#include <ximpobjectfactory.h>
-
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::COSSProtocolLogoutRequest()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLogoutRequest::COSSProtocolLogoutRequest (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId ) :
-		CActive ( CActive::EPriorityStandard  ),
-		iRequestId ( aRequestId ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::COSSProtocolLogoutRequest Start" ) );
-	CActiveScheduler::Add ( this );
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::COSSProtocolLogoutRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLogoutRequest::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::COSSProtocolLogoutRequest Start-End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLogoutRequest* COSSProtocolLogoutRequest::NewL (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::NewL Start" ) );
-
-	COSSProtocolLogoutRequest* self =
-	    new ( ELeave ) COSSProtocolLogoutRequest ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::NewLC()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLogoutRequest* COSSProtocolLogoutRequest::NewLC (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::NewLC Start" ) );
-
-	COSSProtocolLogoutRequest* self =
-	    COSSProtocolLogoutRequest::NewL ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::~COSSProtocolLogoutRequest()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolLogoutRequest::~COSSProtocolLogoutRequest()
-	{
-	LOGGER ( TXT ( "::~COSSProtocolLogoutRequest Start" ) );
-	Cancel();
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLogoutRequest::DoCancel()
-	{
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLogoutRequest::RunL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::RunL Start" ) );
-	message_hdr_resp* msg_struct = NULL;
-
-	User::LeaveIfError ( iStatus.Int() );
-    char* pResponse = NULL;  
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-	msg_struct = ( message_hdr_resp* )pResponse ;
-
-	if( !( msg_struct->response ) )
-		{
-		switch( msg_struct->error_type )
-			{
-
-			default:  //for all other error codes like ssl related are mapped to general error
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-			   break;       
-			}	
-		}
-	else
-		{
-		iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-		}
-
-	free( pResponse );
- 
-
- 	delete this;
-
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::RunL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::RunError()
-// ---------------------------------------------------------------------------
-//
-TInt COSSProtocolLogoutRequest::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::RunError Start" ) );
-
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, aError );
-
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::RunError - id:  %d" ), aError );
-
-	delete this;
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::RunError End" ) );
-	return KErrNone;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolLogoutRequest::IssueLogoutRequestL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolLogoutRequest::IssueLogoutRequestL()
-	{
-	LOGGER ( TXT ( "COSSProtocolLogoutRequest::IssueLogoutRequestL Start" ) );
-
-	message_hdr_req msgHdr = {0,};
-
-	msgHdr.message_type = ELogout_Request;
-
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, ( char* ) &msgHdr, sizeof ( message_hdr_req ) );
-
-	// signal the scheduler
-	SetActive();
-
-	LOGGER ( TXT ( "COSSProtocolConnection::IssueLogoutRequestL() End" ) );
-	}
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/cossprotocolplugin.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
-* Copyright (c) 2007-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:  adaptation for open source
-*
-*/
-
-#include "cossprotocolplugin.h"
-
-#include "cossprotocolconnection.h"
-#include "ossprotocolpluginlogger.h"
-
-#include <badesca.h>
-#include <ecom/implementationproxy.h>
-#include <ximpserviceinfo.h>
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <presenceinfo.h>
-#include <ximpprotocolconnectionhost.h>
-#include <ximpcontextclientinfo.h>
-#include <featmgr.h>
-#include <bldvariant.hrh>
-#include "processlaunher.h"
-#include "cuserafter.h"
-
-_LIT ( KOSSProtocolPlugin, "COSSProtocolPlugin" );
-_LIT ( KIsoserver, "isoserver.exe" );
-
- 
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-// Key value pair table to identify correct constructor
-// function for the requested interface.
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
-	{
-	IMPLEMENTATION_PROXY_ENTRY ( 0x101FB3E7, COSSProtocolPlugin::NewL )
-	};
-
-
-// ---------------------------------------------------------------------------
-// Exported function to return the implementation proxy table
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy ( TInt& aTableCount )
-	{
-
-	aTableCount = sizeof ( ImplementationTable ) / sizeof ( TImplementationProxy );
-
-	return ImplementationTable;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::COSSProtocolPlugin()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPlugin::COSSProtocolPlugin()
-	{
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::COSSProtocolPlugin() Start-End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolPlugin::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::ConstructL() Start" ) );
-	iIsoServerLauncher = CProcessLauncher::NewL ( KIsoserver );
-	LOGGER ( TXT ( "COSSProtocolPlugin::ConstructL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::NewLC()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPlugin* COSSProtocolPlugin::NewLC()
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::NewLC() Start" ) );
-
-	COSSProtocolPlugin* self = COSSProtocolPlugin::NewL();
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::NewLC() End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPlugin* COSSProtocolPlugin::NewL()
-	{
-	LOGGER ( TXT ( "=============================START=========================================" ) );
-	LOGGER ( TXT ( "COSSProtocolPlugin::NewL() Start" ) );
-
-	COSSProtocolPlugin* self = new ( ELeave ) COSSProtocolPlugin();
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::NewL() End :Address of %d" ), &self );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::~COSSProtocolPlugin()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPlugin::~COSSProtocolPlugin()
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::~COSSProtocolPlugin() Start" ) );
-	delete iIsoServerLauncher;
-
-	iConnections.ResetAndDestroy();
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::~COSSProtocolPlugin() End" ) );
-	LOGGER ( TXT ( "=============================END=========================================" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::PrimeHost()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolPlugin::PrimeHost ( MXIMPProtocolPluginHost& aHost )
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::PrimeHost() Start" ) );
-
-	iHost = &aHost;
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::PrimeHost() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::AcquireConnectionL()
-// ---------------------------------------------------------------------------
-//
-MXIMPProtocolConnection& COSSProtocolPlugin::AcquireConnectionL (
-    const MXIMPServiceInfo& aServiceInfo,
-    const MXIMPContextClientInfo& aClientCtxInfo )
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::AcquireConnectionL() Start" ) );
-
-	TInt count = iConnections.Count();
-	//COSSProtocolConnection* connection = NULL;
-	// count how many connections are there in plugin
-	// create new connection if array is empty
-	// create existing connection based on check if it
-	if ( count == 0 )
-		{
-		COSSProtocolConnection* connection = COSSProtocolConnection::NewL ( aServiceInfo, aClientCtxInfo );
-		CleanupStack::PushL ( connection );
-		iConnections.AppendL ( connection );
-		CleanupStack::Pop ( connection );
-		iIsoServerLauncher->LaunchProcessL();	
-		LOGGER ( TXT ( "COSSProtocolPlugin::isoserver launched" ) );
-		LOGGER ( TXT ( "COSSProtocolPlugin::AcquireConnectionL() End" ) );
-		return *connection;
-
-		}
-	else if ( count == 1 )
-		{
-		LOGGER(TXT("COSSProtocolPlugin::AcquireConnectionL() End") );
-		return *iConnections[0];
-		}
-	else
-		{
-		// even if there are many connection objects, we just return
-		// the reference to the first connection object which is 
-		// initiated by CCH
-		return *iConnections[0];
-		}
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::ReleaseConnection()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolPlugin::ReleaseConnection ( MXIMPProtocolConnection& aConnection )
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::ReleaseConnection() Start" ) );
-
-	TInt connectionsCount = iConnections.Count();
-
-	for ( TInt i ( connectionsCount - 1 ); i >= 0; i-- )
-		{
-		MXIMPProtocolConnection* tmp = iConnections[i];
-
-		if ( tmp == &aConnection )
-			{
-			TRAP_IGNORE( iConnections[i]->ReleaseConnectionL() );
-			delete iConnections[i];
-			iConnections.Remove ( i );
-			}
-		}
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::ReleaseConnection() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolPlugin::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions  )
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MXIMPProtocolPlugin::KInterfaceId )
-		{
-		MXIMPProtocolPlugin* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolPlugin, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolPlugin::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::GetInterface() const Start" ) );
-
-	if ( aInterfaceId == MXIMPProtocolPlugin::KInterfaceId )
-		{
-		const MXIMPProtocolPlugin* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolPlugin, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolPlugin::GetInterface() const End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPlugin::GetInterfaceId() const
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolPlugin::GetInterfaceId() const
-	{
-	LOGGER ( TXT ( "COSSProtocolPlugin::GetInterface() without parameters Start-End" ) );
-	return MXIMPProtocolPlugin::KInterfaceId;
-	}
-
-
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/cossprotocolpresencefeatures.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,179 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss presence features implementation for XIMP Framework
-*
-*/
-
-#include "cossprotocolpresencefeatures.h"
-#include <protocolpresentitygroups.h>
-#include <protocolpresencepublishing.h>
-#include <protocolpresenceauthorization.h>
-#include <badesca.h>
-#include "cossprotocolpresentitygroups.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolpresencepublishing.h"
-#include "cossprotocolpresenceauthorization.h"
-
-_LIT ( KOSSProtocolPresenceFeatures, "COSSProtocolPresenceFeatures" );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::COSSProtocolPresenceFeatures()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPresenceFeatures::COSSProtocolPresenceFeatures()
-	{
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolPresenceFeatures::ConstructL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-	iPresentityGroups = COSSProtocolpresentitygroups::NewL ( aConnMan );
-	iPresencePublishing = COssProtocolPresencePublishing::NewL ( aConnMan );
-	iAuthrozation = COssProtocolPresenceAuthorization::NewL ( aConnMan );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPresenceFeatures* COSSProtocolPresenceFeatures::NewL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-
-	COSSProtocolPresenceFeatures* self = new ( ELeave ) COSSProtocolPresenceFeatures;
-	CleanupStack::PushL ( self );
-	self->ConstructL ( aConnMan );
-	CleanupStack::Pop ( self );
-
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::~COSSProtocolPresenceFeatures()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolPresenceFeatures::~COSSProtocolPresenceFeatures()
-	{
-	delete iPresentityGroups;
-	delete iPresencePublishing;
-	delete iAuthrozation;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolPresenceFeatures::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	if ( aInterfaceId == MProtocolPresenceFeatures::KInterfaceId )
-		{
-		MProtocolPresenceFeatures* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolPresenceFeatures, KErrExtensionNotSupported );
-		}
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolPresenceFeatures::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-
-	if ( aInterfaceId == MProtocolPresenceFeatures::KInterfaceId )
-		{
-		const MProtocolPresenceFeatures* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-		{
-		User::Panic ( KOSSProtocolPresenceFeatures, KErrExtensionNotSupported );
-		}
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::GetInterfaceId()
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolPresenceFeatures::GetInterfaceId() const
-	{
-	return MProtocolPresenceFeatures::KInterfaceId;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::PresenceWatching()
-// ---------------------------------------------------------------------------
-//
-MProtocolPresenceWatching& COSSProtocolPresenceFeatures::PresenceWatching()
-	{
-	MProtocolPresenceWatching* dummyWatch = NULL;
-	return *dummyWatch;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::PresencePublishing()
-// ---------------------------------------------------------------------------
-//
-MProtocolPresencePublishing& COSSProtocolPresenceFeatures::PresencePublishing()
-	{
-	return	*iPresencePublishing;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::PresentityGroups()
-// ---------------------------------------------------------------------------
-//
-MProtocolPresentityGroups& COSSProtocolPresenceFeatures::PresentityGroups()
-	{
-	return *iPresentityGroups;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolPresenceFeatures::PresenceAuthorization()
-// ---------------------------------------------------------------------------
-//
-MProtocolPresenceAuthorization& COSSProtocolPresenceFeatures::PresenceAuthorization()
-	{
-	return *iAuthrozation;
-	}
-
-// End of file
-
-
-
-
-
-
-
--- a/imservices/ossprotocoladaptation/src/cossprotocolsearchfeatures.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss protocol plugin search features
-*
-*/
-
-#include "cossprotocolsearchfeatures.h"
-#include <badesca.h>
-#include "cossprotocolsearch.h"
-#include "ossprotocolpluginlogger.h"
-
-_LIT ( KOSSProtocolSearchFeatures, "COSSProtocolSearchFeature" );
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolConnection::COSSProtocolSearchFeature()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearchFeature::COSSProtocolSearchFeature(COSSProtocolConnectionManager& aConnMan) : iConnMan (aConnMan)
-	{
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolSearchFeature::ConstructL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-	iSearch = COSSProtocolSearch::NewL ( aConnMan );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearchFeature* COSSProtocolSearchFeature::NewL (
-    COSSProtocolConnectionManager& aConnMan )
-	{
-
-	COSSProtocolSearchFeature* self = new ( ELeave ) COSSProtocolSearchFeature(aConnMan);
-	CleanupStack::PushL ( self );
-	self->ConstructL ( aConnMan );
-	CleanupStack::Pop ( self );
-
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::~COSSProtocolSearchFeature()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearchFeature::~COSSProtocolSearchFeature()
-	{
-	delete iSearch;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolSearchFeature::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	MProtocolSearchFeature* self = NULL;
-	if ( aInterfaceId == MProtocolSearchFeature::KInterfaceId )
-		{
-	    self = this;
-		}
-    else
-	   {
-	   if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-			{
-			User::Panic ( KOSSProtocolSearchFeatures, KErrExtensionNotSupported );
-			}	
-	   }
-
-	return self;
-	}
-	
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::SetHost
-// ---------------------------------------------------------------------------
-//
-
-void COSSProtocolSearchFeature::SetHost(MProtocolSearchDataHost& aSearchHost )
-	{
-	iConnMan.SetSearchHost(aSearchHost) ; // set this in connection manager.
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolSearchFeature::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
- 
-	const MProtocolSearchFeature* self = NULL;
-	if ( aInterfaceId == MProtocolSearchFeature::KInterfaceId )
-		{
-	    self = this;
-		}
-    else
-	   {
-	   if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-			{
-			User::Panic ( KOSSProtocolSearchFeatures, KErrExtensionNotSupported );
-			}	
-	   }
-
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::GetInterfaceId() const
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolSearchFeature::GetInterfaceId() const
-	{
-	return MProtocolSearchFeature::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearchFeature::search()
-// ---------------------------------------------------------------------------
-//
-MProtocolSearch& COSSProtocolSearchFeature::Search()
-	{
-	return *iSearch;
-	}
-
-	
-// End of file
--- a/imservices/ossprotocoladaptation/src/cossprotocolservererrorhandler.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2007-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:  server error handler
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cossprotocolservererrorhandler.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-#include "cossprotocolconnectionmanager.h"
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <e32des16.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "msgliterals.h"
-#include <gtypes.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::COssprotocolServerErrorHandler
-// ---------------------------------------------------------------------------
-//
-COssprotocolServerErrorHandler::COssprotocolServerErrorHandler (
-    MOSSProtocolConnectionManager& aConnMan ) :
-		CActive ( EPriorityNormal ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::COssprotocolServerErrorHandler Start" ) );
-	CActiveScheduler::Add ( this );
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::COssprotocolServerErrorHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::ConstructL
-// ---------------------------------------------------------------------------
-//
-void COssprotocolServerErrorHandler::ConstructL()
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::ConstructL Start-End" ) );
-
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::NewL
-// ---------------------------------------------------------------------------
-//
-COssprotocolServerErrorHandler* COssprotocolServerErrorHandler::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::NewL Start" ) );
-
-	COssprotocolServerErrorHandler* self = new ( ELeave )
-	COssprotocolServerErrorHandler ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::NewLC
-// ---------------------------------------------------------------------------
-//
-COssprotocolServerErrorHandler* COssprotocolServerErrorHandler::NewLC (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::NewLC Start" ) );
-
-	COssprotocolServerErrorHandler* self =
-	    COssprotocolServerErrorHandler::NewL ( aConnMan );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::~COssprotocolServerErrorHandler
-// ---------------------------------------------------------------------------
-//
-COssprotocolServerErrorHandler::~COssprotocolServerErrorHandler()
-	{
-	LOGGER ( TXT ( "::~COssprotocolServerErrorHandler Start" ) );
-
-	Cancel();
-
-	LOGGER ( TXT ( "::~COssprotocolServerErrorHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void COssprotocolServerErrorHandler::DoCancel()
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::DoCancel Start" ) );
-
-	iConnMan.DataHandler().CancelListeningServerErrors();
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::DoCancel End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::RunL()
-// ---------------------------------------------------------------------------
-//
-void COssprotocolServerErrorHandler::RunL()
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::RunL Start" ) );
-
-	// something is coming from the xmpp server
-	User::LeaveIfError ( iStatus.Int() );
-
-	ProcessIncomingDataL();
-//	StartListeningL();
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::RunL End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::ProcessIncomingDataL()
-// ---------------------------------------------------------------------------
-//
-void COssprotocolServerErrorHandler::ProcessIncomingDataL()
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::ProcessIncomingDataL Start" ) );
-	TInt senderidlen = 0;
-	TInt messagelen = 0;
-	char* sender = NULL;
-    char* recvdmessage = NULL;
-    guint messagetype = NULL;
-    guint time;
-    char* pResponse = NULL, *pOrigResponse = NULL;  
-	User::LeaveIfError ( iStatus.Int() );
-	pOrigResponse = pResponse = iConnMan.DataHandler().ResponseL ( 3 );
-	CleanupStack::PushL(pOrigResponse) ;
-    //parse message type
-
-	memcpy ( &messagetype, pResponse, sizeof ( guint ) );
-	memcpy ( &time, pResponse + sizeof ( guint ), sizeof ( guint ) );
-	
-	senderidlen = strlen(pResponse + sizeof ( guint ) * 2 );
-    sender = ( char* ) User::AllocLC ( senderidlen + 1 );
-	memset ( sender, '\0', senderidlen );
-	memcpy ( sender, pResponse + sizeof ( guint ) * 2, senderidlen + 1);
-	
-	messagelen = strlen(pResponse + sizeof ( guint ) * 2 + senderidlen + 1 );
-    recvdmessage = ( char* ) User::AllocLC ( messagelen + 1 );
-	memset ( recvdmessage, '\0', messagelen );
-	memcpy ( recvdmessage, pResponse + sizeof ( guint ) * 2 + 1 +  senderidlen, messagelen + 1 );
-	CleanupStack::PopAndDestroy ( recvdmessage );
-	CleanupStack::PopAndDestroy ( sender );
-	CleanupStack::PopAndDestroy(pOrigResponse) ;//pOrigResponse
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::ProcessIncomingDataL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::RunError
-// ---------------------------------------------------------------------------
-//
-TInt COssprotocolServerErrorHandler::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::RunError Start %d" ), aError );
-
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// COssprotocolServerErrorHandler::StartListeningL
-// ---------------------------------------------------------------------------
-//
-void COssprotocolServerErrorHandler::StartListeningL()
-	{
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::StartListeningL Start" ) );
-
-	if ( ! ( this->IsActive() ) )
-		{
-		iConnMan.DataHandler().ListenIncomingServerError ( iStatus );
-		SetActive();
-		}
-	LOGGER ( TXT ( "COssprotocolServerErrorHandler::StartListeningL End" ) );
-	}
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/cosssenddataoperation.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2007-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: cosssenddataoperation.cpp
-*
-*/
-
-//  INCLUDES
-#include    <e32std.h>
-
-#include    "cosssenddataoperation.h"
-#include    "ossprotocolpluginlogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::COssSendDataOperation()
-// ---------------------------------------------------------------------------
-//
-COssSendDataOperation::COssSendDataOperation () 
-						: iOpId ( KErrNone )
-		{
-		iData = NULL;
-		LOGGER ( TXT ( "COssSendDataOperation::COssSendDataOperation Start End" ) );
-		}
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::~COssSendDataOperation()
-// ---------------------------------------------------------------------------
-//
-COssSendDataOperation::~COssSendDataOperation () 
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::~COssSendDataOperation Start" ) );
-		delete iData;
-
-		if ( iStatus )
-			{
-			User::RequestComplete ( iStatus, KErrCancel );
-			}
-
-		LOGGER ( TXT ( "COssSendDataOperation::~COssSendDataOperation End" ) );
-		}
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::SetIds()
-// ---------------------------------------------------------------------------
-//
-void COssSendDataOperation::SetIds ( TInt aOperationId, TInt aLogId )
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::SetIds Start" ) );
-		iOpId = aOperationId;
-		iLogId = aLogId;
-		LOGGER ( TXT ( "COssSendDataOperation::SetIds End" ) );
-		}
-	
-	
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::SetRequestStatus()
-// ---------------------------------------------------------------------------
-//
-void COssSendDataOperation::SetRequestStatus ( TRequestStatus& aStatus )
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::SetRequestStatus Start" ) );
-		iStatus = &aStatus;
-		LOGGER ( TXT ( "COssSendDataOperation::SetRequestStatus End" ) );
-		} 
-	
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::Status()
-// ---------------------------------------------------------------------------
-//
-TRequestStatus* COssSendDataOperation::Status()
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::Status Start-End" ) );
-		return iStatus;
-		}
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::OperationId()
-// ---------------------------------------------------------------------------
-//
-TInt COssSendDataOperation::OperationId() const
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::OperationId Start-End" ) );
-		return iOpId;
-		}
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::NewLC()
-// ---------------------------------------------------------------------------
-//
- COssSendDataOperation* COssSendDataOperation::NewLC()
-	{
-	LOGGER ( TXT ( "COssSendDataOperation::NewLC Start-End" ) );
-	COssSendDataOperation* self = new ( ELeave )
-	COssSendDataOperation();
-
-	CleanupStack::PushL ( self );
-	LOGGER ( TXT ( "COssSendDataOperation::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::CompletedOperation()
-// ---------------------------------------------------------------------------
-//
- void COssSendDataOperation::CompletedOperation ( TInt aCode )
-	{
-	LOGGER ( TXT ( "COssSendDataOperation::CompletedOperation Start :id:%d,code:%d" ),
-	         iOpId,
-	         aCode );
-
-	if ( !iStatus )
-		{
-		LOGGER ( TXT ( "COssSendDataOperation::CompletedOperation:!!Double Completion!!!" ) );
-		return;
-		}
-
-	User::RequestComplete ( iStatus, aCode );
-
-	iStatus = NULL;
-	}
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::SetResponse()
-// ---------------------------------------------------------------------------
- void COssSendDataOperation::SetResponse ( char* aBuff )
-	{
-	LOGGER ( TXT ( "CPEngPureDataHandler::SetResponse - id:  %d" ), iOpId );
-	delete iData;
-	iData = aBuff;
-	LOGGER ( TXT ( "COssSendDataOperation::SetResponse End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COssSendDataOperation::Response()
-// ---------------------------------------------------------------------------
-//
- char* COssSendDataOperation::Response()
-	{
-	LOGGER ( TXT ( "CPEngPureDataHandler::Response Start" ) );
-	char* b = iData;
-	iData = NULL;
-	LOGGER ( TXT ( "CPEngPureDataHandler::Response End" ) );
-	return b;
-	}
-
-
-// End of File
--- a/imservices/ossprotocoladaptation/src/im/cossprotocolimconversation.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss Protocol im conversation implementation
-*
-*/
-
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <ximpprotocolconnectionhost.h>
-#include "cossprotocolimconversation.h"
-#include "cossprotocolconnectionmanager.h"
-#include "cosssendmessagerequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocolpluginpanics.h"
-#include "ossprotocolpluginlogger.h"
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolImConversation::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MProtocolImConversation::KInterfaceId )
-		{
-		MProtocolImConversation* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolConversation, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolImConversation::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolImConversation::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MProtocolImConversation::KInterfaceId )
-		{
-		const MProtocolImConversation* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolConversation, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolImConversation::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::GetInterfaceId()
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolImConversation::GetInterfaceId() const
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::GetInterfaceId() Start-End" ) );
-	return MProtocolImConversation::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::COSSProtocolImConversation()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImConversation::COSSProtocolImConversation (
-    MOSSProtocolConnectionManager& aConnMan )
-		: iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "Groups::COSSProtocolImConversation() Start-End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::ConstructL() Start" ) );
-	LOGGER ( TXT ( "COSSProtocolImConversation::ConstructL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImConversation* COSSProtocolImConversation::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::NewL() Start" ) );
-
-	COSSProtocolImConversation* self =
-	    new ( ELeave ) COSSProtocolImConversation ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL( );
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolImConversation::NewL() End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::~COSSProtocolImConversation()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolImConversation::~COSSProtocolImConversation()
-	{
-	LOGGER ( TXT ( "Groups::~COSSProtocolImConversation() Start" ) );
-
-	LOGGER ( TXT ( "Groups::~COSSProtocolImConversation() End" ) );
-	}
-
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoSendMessageL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::DoSendMessageL (
-    const MImConversationInfo& aImMessage,
-    TXIMPRequestId aReqId )
-	{
-	LOGGER ( TXT ( "Groups::DoSendMessageL() Start" ) );
-
-
-	COSSSendMessageRequest* req =
-	    COSSSendMessageRequest::NewLC ( iConnMan, aReqId );
-
-	req->SendMessageL ( aImMessage );
-
-	CleanupStack::Pop ( req );
-
-	LOGGER ( TXT ( "Groups::DoSendMessageL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoForwardMessageL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::DoForwardMessageL (
-    const MImConversationInfo& /*aImMessage*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoSendMessageToGroupL()
-// ---------------------------------------------------------------------------
-//
-void  COSSProtocolImConversation::DoSendMessageToGroupL (
-    const MImConversationInfo& /*aImMessage*/,
-    const TDesC* /*aGroupId*/, TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoBlockUsersL()
-// ---------------------------------------------------------------------------
-//
-TXIMPRequestId COSSProtocolImConversation::DoBlockUsersL (
-    const MDesCArray* /*aUserIds*/,
-    TXIMPRequestId aReqId )
-	{
-	//Not Supported
-	 return aReqId; 
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoUnBlockUsersL()
-// ---------------------------------------------------------------------------
-//
-TXIMPRequestId COSSProtocolImConversation::DoUnBlockUsersL (
-    const MDesCArray* /*aUserIds*/,
-    TXIMPRequestId aReqId )
-	{
-    //Not Supported
-    return aReqId;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoGetBlockedListRequestL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::DoGetBlockedListRequestL (
-    const MXIMPIdentity& /*aImMessageId*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoGetMessageListL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::DoGetMessageListL (
-    const MXIMPIdentity& /*aImMessageId*/,
-    const TDesC* /*aGroupId*/,
-    const TInt /*aMessageCount*/,
-    TBool /*aDeliveryReportWanted*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::DoRejectMessageL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::DoRejectMessageL (
-    const MXIMPIdentity& /*aImMessageId*/,
-    const TDesC& /*aMessageID*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolImConversation::CreateDataHandlerL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolImConversation::CreateDataHandlerL()
-	{
-	LOGGER ( TXT ( "COSSProtocolImConversation::CreateDataHandler() Start" ) );
-
-	iConnMan.ManufactureDataHandlerL();
-
-	LOGGER ( TXT ( "COSSProtocolImConversation::CreateDataHandler() End" ) );
-	}
-
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/im/cosssendmessagerequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,278 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Send message Request to the Network Server
-*
-*/
-
-#include "cosssendmessagerequest.h"
-#include <ximpprotocolconnectionhost.h>
-#include "cossprotocolconnectionmanager.h"
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presenceobjectfactory.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <ximpdatasubscriptionstate.h>
-#include <protocolpresencedatahost.h>
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocloliterals.h"
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include <badesca.h>
-
-#include<imconversationinfo.h>
-#include<imerrors.hrh>
-#include "ossprotocoladaptutils.h"
-
-/**
-* operations state enums variables 
-*/
-
-enum ImStates
-	{
-	RecipientOffline = 1,
-	SenderBlocked = 3,
-	NotSupported = 5,
-	  
-	// add if  required
-	};
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::COSSSendMessageRequest()
-// ---------------------------------------------------------------------------
-//
-COSSSendMessageRequest::COSSSendMessageRequest (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId ) :
-
-		CActive ( EPriorityNormal ),
-		iRequestId ( aRequestId ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::COSSSendMessageRequest Start" ) );
-	CActiveScheduler::Add ( this );
-
-	LOGGER ( TXT ( "COSSSendMessageRequest::COSSSendMessageRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSSendMessageRequest::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::ConstructL Start-End" ) );
-
-
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSSendMessageRequest* COSSSendMessageRequest::NewL (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::NewL Start" ) );
-
-	COSSSendMessageRequest* self = new ( ELeave )
-	COSSSendMessageRequest ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSSendMessageRequest::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::NewLC()
-// ---------------------------------------------------------------------------
-//
-COSSSendMessageRequest* COSSSendMessageRequest::NewLC (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::NewLC Start" ) );
-
-	COSSSendMessageRequest* self =
-	    COSSSendMessageRequest::NewL ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "COSSSendMessageRequest::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::~COSSSendMessageRequest()
-// ---------------------------------------------------------------------------
-//
-COSSSendMessageRequest::~COSSSendMessageRequest()
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::~COSSSendMessageRequest Start" ) );
-	LOGGER ( TXT ( "COSSSendMessageRequest::~COSSSendMessageRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void COSSSendMessageRequest::DoCancel()
-	{
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void COSSSendMessageRequest::RunL()
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::RunL start" ) );
-	message_hdr_resp* msg_struct = NULL;
-	User::LeaveIfError ( iStatus.Int() );
-    char* pResponse = NULL;  
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-
-	msg_struct = ( message_hdr_resp* )pResponse ;
-	if( !( msg_struct->response ) )
-	{
-		switch( msg_struct->error_type )
-		{
-	
-		case RecipientOffline: //The username or password was invalid. 
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KImApiErrRecipientNotLogged );
-		       break;
-		case SenderBlocked: //The username or password was invalid. 
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KImApiErrSenderBlocked );
-		       break;
-		case NotSupported: //The username or password was invalid. 
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KImErrServiceRequestTypeNotSupported );
-		       break;
-		default:  //for all other error codes like ssl related are mapped to general error
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KImErrServiceGeneralError );
-		       break;       
-		}	
-	}
-	else
-	{
-	  iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	}
-
-	free( pResponse );
-
-	delete this;
-
-	LOGGER ( TXT ( "COSSSendMessageRequest::RunL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::RunError()
-// ---------------------------------------------------------------------------
-//
-TInt COSSSendMessageRequest::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::RunError Start" ) );
-
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, aError );
-
-	delete this;
-	LOGGER ( TXT ( "COSSSendMessageRequest::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// COSSSendMessageRequest::SendMessageL()
-// ---------------------------------------------------------------------------
-//
-void COSSSendMessageRequest::SendMessageL ( const MImConversationInfo& aImMessage )
-	{
-	LOGGER ( TXT ( "COSSSendMessageRequest::SendMessageL Start" ) );
-
-	TPtrC16 message = aImMessage.TextMessage();
-	const MDesCArray& recipients = aImMessage.RecipientL();
-
-	int userLen = 0;
-	int totalLen = 0;
-
-	message_hdr_req msgHdr = {0,};
-	msgHdr.message_type = ESend_Request; 
-	totalLen += sizeof ( message_hdr_req );
-
-	RArray<charFormatData> recipientArray;	
-	for ( TInt i = 0; i < recipients.MdcaCount(); i++ )
-		{
-		TPtrC16 recipientsPtr = recipients.MdcaPoint( i );
-		charFormatData recipient = OssProtocolAdapUtils::ConvertTUint16ToCharLC( recipientsPtr );
-        recipientArray.AppendL( recipient );//will get it back when writting to final buffer.
-	    userLen = recipient.dataSize;
-		totalLen += userLen;
-		}
-	totalLen++;
-	
-	charFormatData charData = OssProtocolAdapUtils::ConvertTUint16ToCharLC( message );
-    char* msg = charData.data;
-	userLen = charData.dataSize;
-	totalLen += userLen;
-	
-	User::LeaveIfError ( totalLen > MAX_MSG_SIZE );
-	
-	char* outMessage = ( char* ) User::AllocLC( totalLen );
-	memset( outMessage , '\0' ,  totalLen );
-
-    userLen  = 0;
-	totalLen = 0;
-	totalLen += sizeof ( message_hdr_req );
-	
-
-	memcpy( outMessage , &msgHdr , totalLen ); //copy header.
-	
-	//now copy recipients one by one.
-	TInt recipientCount = recipientArray.Count();
-	for( TInt count = 0 ; count < recipientCount ; count++)
-		{
-		charFormatData receiver = recipientArray[count];
-		userLen = receiver.dataSize;		
-		memcpy( outMessage + totalLen , receiver.data , userLen );	
-		totalLen += userLen;
-		}
-		
-	totalLen++;	
-	userLen = charData.dataSize;	
-	memcpy ( outMessage + totalLen , msg , userLen );
- 
-	totalLen += userLen;
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, outMessage, totalLen );
-
-	// signal the scheduler
-	SetActive();
-	CleanupStack::PopAndDestroy( recipientCount + 2 );//outMessage,msg,
-	recipientArray.Close();  
-	
-	LOGGER ( TXT ( "COSSSendMessageRequest::SendMessageL End" ) );
-	}
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/im/creceivemessagehandler.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation of receive message handler
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "creceivemessagehandler.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-#include "cossprotocolconnectionmanager.h"
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <protocolpresencepublishingdatahost.h>
-#include <protocolpresencedatahost.h>
-#include <presenceobjectfactory.h>
-#include <presencegrantrequestinfo.h>
-#include <personpresenceinfo.h>
-#include <servicepresenceinfo.h>
-#include <devicepresenceinfo.h>
-#include <presenceinfo.h>
-#include <presenceinfofield.h>
-#include <presenceinfofieldcollection.h>
-#include <presenceinfofieldvalueenum.h>
-#include <presenceinfofieldvaluetext.h>
-#include <ximpcontext.h>
-#include <ximpclient.h>
-#include <devicepresenceinfo.h>
-#include <protocolpresencewatchingdatahost.h>
-#include <presencegrantrequestinfo.h>
-#include <protocolpresenceauthorizationdatahost.h>
-#include <e32des16.h>
-#include <imconversationinfo.h>
-#include <imobjectfactory.h>
-#include <protocolimdatahost.h>
-#include <protocolimconversationdatahost.h>
-#include <glib/gprintf.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <glib/gstrfuncs.h>
-#include "ossprotocoladaptutils.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::CReceiveMessageHandler
-// ---------------------------------------------------------------------------
-//
-CReceiveMessageHandler::CReceiveMessageHandler (
-    MOSSProtocolConnectionManager& aConnMan ) :
-
-		CActive ( EPriorityNormal ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "::CReceiveMessageHandler Start" ) );
-	CActiveScheduler::Add ( this );
-
-	LOGGER ( TXT ( "::CReceiveMessageHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CReceiveMessageHandler::ConstructL()
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::ConstructL Start-End" ) );
-
-
-	}
-
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CReceiveMessageHandler* CReceiveMessageHandler::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::NewL Start" ) );
-
-	CReceiveMessageHandler* self = new ( ELeave )
-	CReceiveMessageHandler ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "CReceiveMessageHandler::NewL End" ) );
-	return self;
-	}
-
-
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::~CReceiveMessageHandler
-// ---------------------------------------------------------------------------
-//
-CReceiveMessageHandler::~CReceiveMessageHandler()
-	{
-	LOGGER ( TXT ( "::~CReceiveMessageHandler Start" ) );
-
-	Cancel();
-
-	LOGGER ( TXT ( "::~CReceiveMessageHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CReceiveMessageHandler::DoCancel()
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::DoCancel Start" ) );
-
-	iConnMan.DataHandler().CancelListeningMsg();
-
-	LOGGER ( TXT ( "CReceiveMessageHandler::DoCancel End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::RunL()
-// ---------------------------------------------------------------------------
-//
-void CReceiveMessageHandler::RunL()
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::RunL Start" ) );
-
-	// something is coming from the xmpp server
-	User::LeaveIfError ( iStatus.Int() );
-	
-	TRAPD( error, ProcessIncomingDataL() );
-    if ( error != KErrNone )
-    {
-    	Cancel();
-    }
-   
-    // start listening again for next incoming message
-	StartListeningL();
-
-	LOGGER ( TXT ( "CReceiveMessageHandler::RunL End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::ProcessIncomingDataL()
-// ---------------------------------------------------------------------------
-//
-void CReceiveMessageHandler::ProcessIncomingDataL()
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::ProcessIncomingDataL Start" ) );
-	
-	char* pResponse = iConnMan.DataHandler().ResponseL ( 1 );
-	CleanupStack::PushL( pResponse );
-	
-	//-----Response format--------
-	//|------|------/0|-------/0|
-	//|header|sender/0|message/0|
-	
-	//parse sender.
-	char* sender = pResponse + sizeof( message_hdr_resp );
-	HBufC16 *sendername = OssProtocolAdapUtils::ConvertCharToTUint16LC(sender); 
-	
-	//parse message.
-	char* recvdmessage = pResponse + sizeof( message_hdr_resp ) + strlen(sender) + 1;
-    HBufC16 *message = OssProtocolAdapUtils::ConvertCharToTUint16LC(recvdmessage);
-		
-	MXIMPObjectFactory& objFact = iConnMan.HandleToHost().ObjectFactory();
-	MImObjectFactory& imObjFact = iConnMan.GetImHost().ImObjectFactory();
-	MXIMPIdentity* identity = objFact.NewIdentityLC();
-	MImConversationInfo* convinfo = imObjFact.NewImConversationInfoLC();
-	
-	identity->SetIdentityL ( *sendername );
-	convinfo->SetMessageIdL ( identity );
-	convinfo->SetTextMessageL ( *message );   //SetTextMessageL(const TDesC16& aMessage )
-	iConnMan.GetImHost().ConversationDataHost().HandleNewTextMessageL ( convinfo );
-	
-	CleanupStack::Pop( 2 ); //convinfo,identity
-	CleanupStack::PopAndDestroy( 3 ); //message,sendername,pResponse. 
-	
-	LOGGER ( TXT ( "CReceiveMessageHandler::ProcessIncomingDataL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CReceiveMessageHandler::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::RunError Start %d" ), aError );
-
-	// restart listening incoming data
-	iConnMan.DataHandler().ListenIncomingMsg ( iStatus );
-	SetActive();
-
-	LOGGER ( TXT ( "CReceiveMessageHandler::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CReceiveMessageHandler::StartListeningL
-// ---------------------------------------------------------------------------
-//
-void CReceiveMessageHandler::StartListeningL()
-	{
-	LOGGER ( TXT ( "CReceiveMessageHandler::StartListeningL Start" ) );
-
-	// Ready to receive notification from the server
-	TInt count = 0;
-
-	// signal the scheduler
-
-	if ( ! ( this->IsActive() ) )
-		{
-		count = iConnMan.DataHandler().ListenIncomingMsg ( iStatus );
-		SetActive();
-		}
-
-	for ( TInt x ( 0 ) ;  x < count ; ++x )
-		{
-		ProcessIncomingDataL();
-		}
-
-	LOGGER ( TXT ( "CReceiveMessageHandler::StartListeningL End" ) );
-	}
-
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/ossprotocoladaptutils.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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:  Utils for OSSProtocolAdaptation modules.
-*
-*/
-
-
-// INCLUDES
-#include "ossprotocoladaptutils.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "escapeutils.h"
-#include "stringutils.h"
-  
-
-// ---------------------------------------------------------------------------
-// OssProtocolAdapUtils::OssProtocolAdapUtils::ConvertCharToTUint16L
-// ---------------------------------------------------------------------------
-//
-HBufC16* OssProtocolAdapUtils::ConvertCharToTUint16LC( const char *pcSrc )
-	{
-	TUint8* scr = (TUint8*)pcSrc;
-	TPtrC8 ptr;
-	ptr.Set(scr);
-	HBufC16* buf = EscapeUtils::ConvertToUnicodeFromUtf8L(ptr);
-	CleanupStack::PushL(buf);
-	return buf;	
-	}
-	
-
-// ---------------------------------------------------------------------------
-// OssProtocolAdapUtils::OssProtocolAdapUtils::ConvertTUint16ToCharL
-// ---------------------------------------------------------------------------
-//	
-charFormatData OssProtocolAdapUtils::ConvertTUint16ToCharLC( const TDesC &aData )
-	{
-	HBufC8 * data = EscapeUtils::ConvertFromUnicodeToUtf8L( aData );
-	CleanupStack::PushL(data);
-	
-	TPtr8 ptr = data->Des();
-	TInt length = ptr.Length();
-	
-	//allocate new contiguous buffer as returned buffer may be fragmented.	
-	HBufC8* newBuf = HBufC8::NewLC( length + 1 );//+1 space for '\0'
-	TPtr8 newBufPtr = newBuf->Des();
-	newBufPtr.Copy(ptr);
-	
-	char* chPtrTemp = ( char* )newBufPtr.PtrZ(); 
-	char* chPtr = (char*) User::AllocL( length + 1 );
-	strcpy( chPtr , chPtrTemp );
-	
-	CleanupStack::PopAndDestroy( 2 );//newBuf,data.
-	
-	charFormatData charData ;
-	charData.data = chPtr;
-	charData.dataSize = length + 1; //+1 space for '\0'
-	
-	CleanupStack::PushL(chPtr);
-	return charData;
-	}
-// ---------------------------------------------------------------------------
-// OssProtocolAdapUtils::ConvertTDesC8toChar
-// ---------------------------------------------------------------------------
-//
-void OssProtocolAdapUtils::ConvertTDesC8toChar(const TDesC8& aSrc, char* aDes)
-{
-    char *temp = (char*)aSrc.Ptr();
-    const TInt size = aSrc.Length();
-    *(temp + size) = '\0';
-    memcpy( aDes, temp, size );
-}
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/ossprotocolpluginlogger.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Logger implementation
-*
-*/
-
-// INCLUDE FILES
-
-#include <e32svr.h>
-#include <e32std.h>
-#include <flogger.h>
-
-#include "ossprotocolpluginlogger.h"
-
-
-/**
- * Handler used by logger to truncate the string
- * rather than panic in case of buffer overflow.
-*/
-
-NONSHARABLE_CLASS ( TAdaptOverflowTruncate ) : public TDes16Overflow
-	{
-
-public:
-	void Overflow ( TDes16& /*aDes*/ ) {}
-	};
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// TLogger::WriteLog()
-// -----------------------------------------------------------------------------
-//
-void TLogger::WriteLog ( TRefByValue<const TDesC> aFmt, ... )
-	{
-#ifdef ENABLE_DEBUG_LOGS
-	( void ) aFmt;//Suppress unused formal parameter warning
-	TBuf< KTAdaptMaxLogLineLength > buffer;
-	buffer.Append ( _L ( "[" ) );           // CSI: 78 #
-	buffer.Append ( RThread().Name() );
-	buffer.Append ( _L ( "] " ) );          // CSI: 78 #
-	TAdaptOverflowTruncate overflow;
-	VA_LIST list;
-	VA_START ( list, aFmt );
-	buffer.AppendFormatList ( aFmt, list, &overflow );
-	RFileLogger logger;
-
-	if ( logger.Connect() == KErrNone )
-		{
-		logger.SetDateAndTime ( ETrue, ETrue );
-		logger.CreateLog ( KTAdaptDebugOutputDir, KTAdaptDebugOutputFileName,
-		                   EFileLoggingModeAppend );
-		logger.Write ( buffer );
-		logger.CloseLog();
-		logger.Close();
-		}
-
-#endif
-
-	}
-
-
-
-
-
-
-// End of File
-
-
--- a/imservices/ossprotocoladaptation/src/presenceauthorization/cossprotocolpresenceauthorization.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss Protocol implementation for Presence Framework
-*
-*/
-
-
-#include <badesca.h>
-
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <ximpprotocolconnectionhost.h>
-
-#include "cossprotocolpresenceauthorization.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolconnectionmanager.h"
-
-#include "csubscribepresencegrantrequestlistrequest.h"
-#include "ossprotocolpluginpanics.h"
-#include "cpresenceauthuserrequest.h"
-#include "cwithdrawpresencegrantfrompresentityrequest.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CImpsConnection::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COssProtocolPresenceAuthorization::GetInterface( TInt32 aInterfaceId,
-                                TIfGetOps aOptions )
-    {
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::GetInterface() Start") );
-    if( aInterfaceId == MProtocolPresenceAuthorization::KInterfaceId )
-        {
-        MProtocolPresenceAuthorization* self = this;
-        return self;
-        }
-
-    if( aOptions == MXIMPBase::EPanicIfUnknown ) 
-        {
-        User::Panic( KOSSProtocolPresenceAuthorization, KErrExtensionNotSupported );
-        }
-	LOGGER ( TXT("COssProtocolPresenceAuthorization::GetInterface() End") );
-    return NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CImpsConnection::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COssProtocolPresenceAuthorization::GetInterface( TInt32 aInterfaceId,
-                                      TIfGetOps aOptions ) const
-    {
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::GetInterface() Start") );
-    if( aInterfaceId == MProtocolPresenceAuthorization::KInterfaceId )
-        {
-        const MProtocolPresenceAuthorization* self = this;
-        return self;
-        }
-
-    if( aOptions == MXIMPBase::EPanicIfUnknown ) 
-        {
-        User::Panic( KOSSProtocolPresenceAuthorization, KErrExtensionNotSupported );
-        }
-	LOGGER ( TXT("COssProtocolPresenceAuthorization::GetInterface() End") );
-    return NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CImpsConnection::NewInstanceLC()
-// ---------------------------------------------------------------------------
-//
-TInt32 COssProtocolPresenceAuthorization::GetInterfaceId() const
-    {
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::GetInterfaceId() Start-End") );
-    return MProtocolPresenceAuthorization::KInterfaceId;
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::COssProtocolPresenceAuthorization()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresenceAuthorization::COssProtocolPresenceAuthorization(
-									MOSSProtocolConnectionManager& aConnMan)
-	:iConnMan(aConnMan)
-    {
-   	LOGGER ( TXT("::COssProtocolPresenceAuthorization() Start-End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::ConstructL()
-    {
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::ConstructL() Start") );                                    
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::ConstructL() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::NewL()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresenceAuthorization* COssProtocolPresenceAuthorization::NewL( 
-						MOSSProtocolConnectionManager& aConnMan )
-    {
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::NewL() Start") );
-
-    COssProtocolPresenceAuthorization* self = 
-    					new( ELeave ) COssProtocolPresenceAuthorization( aConnMan);
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-
-    LOGGER ( TXT("COssProtocolPresenceAuthorization::NewL() End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::~COssProtocolPresenceAuthorization()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresenceAuthorization::~COssProtocolPresenceAuthorization()
-    {
-    LOGGER ( TXT("Authorization::~COssProtocolPresenceAuthorization() Start") );
-    
-        
-	LOGGER ( TXT("Authorization::~COssProtocolPresenceAuthorization() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUnsubscribePresenceWatcherListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoSubscribePresenceGrantRequestListL( 
-			TXIMPRequestId aReqId )
-    {
-    LOGGER ( TXT("Authorization::DoSubscribePresenceGrantRequestListL() Start") );
-    if( ! iConnMan.GetContactManager().IsFetchInvitationsForFirstTime() )
-        {
-        iConnMan.GetContactManager().SetFetchInvitationsForFirstTime(ETrue);
-        CreateDataHandlerL();
-
-        iConnMan.GetAddNotificationHandler().StartListeningL();
-        iConnMan.HandleToHost().HandleRequestCompleted( aReqId, KErrNone );
-        }	
-	else
-	    {
-	    iConnMan.GetContactManager().ReturnInvitationListL();
-	    iConnMan.HandleToHost().HandleRequestCompleted ( aReqId, KErrNone );
-	    }
-    
-    LOGGER ( TXT("Authorization::DoSubscribePresenceGrantRequestListL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUnsubscribePresenceWatcherListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoUnsubscribePresenceGrantRequestListL( 
-			TXIMPRequestId aReqId )
-    {
-    LOGGER ( TXT("Authorization::DoUnsubscribePresenceGrantRequestListL() Start") );
-  
-    // complete the request successfully
-    iConnMan.HandleToHost().HandleRequestCompleted( aReqId, KErrNone );
-    	
-    LOGGER ( TXT("Authorization::DoUnsubscribePresenceGrantRequestListL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoGrantPresenceForPresentityL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoGrantPresenceForPresentityL( 
-												const MXIMPIdentity& aIdentity,
-                                                const MPresenceInfoFilter& aPif,
-                                                TXIMPRequestId aReqId )
-    {
-    LOGGER ( TXT("Authorization::DoGrantPresenceForPresentityL() Start") );
-	CreateDataHandlerL();
- 		
- 	CPresenceAuthUserRequest* req = 
- 	CPresenceAuthUserRequest::NewLC( iConnMan, aReqId );
- 	
- 	
-	req->PresenceAuthUserRequestL(aIdentity,aPif);
-	
-	CleanupStack::Pop( req );
-    LOGGER ( TXT("Authorization::DoGrantPresenceForPresentityL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUpdateGrantPresenceForPresentityL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoUpdatePresenceGrantPifForPresentityL( 
-											const MXIMPIdentity&/*aIdentity*/,
-                                            const MPresenceInfoFilter &/*aPif*/,
-                                            TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoUpdatePresenceGrantPifForPresentityL() Start") );
-    LOGGER ( TXT("Authorization::DoUpdatePresenceGrantPifForPresentityL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUpdateGrantPresenceForPresentityGroupMembersL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoWithdrawPresenceGrantFromPresentityL( 
-											const MXIMPIdentity &aIdentity,
-                                            TXIMPRequestId aReqId )
-    {
-    LOGGER ( TXT("Authorization::DoWithdrawPresenceGrantFromPresentityL() Start") );
-    CreateDataHandlerL();
- 		
- 	CWithdrawPresenceGrantFromPresentityRequest* req = 
- 	CWithdrawPresenceGrantFromPresentityRequest::NewLC( iConnMan, aReqId );
- 	
- 	
-	req->WithdrawPresenceGrantFromPresentityL( aIdentity );
-	
-	CleanupStack::Pop( req );
-
-    
-    LOGGER ( TXT("Authorization::DoWithdrawPresenceGrantFromPresentityL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoGrantPresenceForPresentityGroupMembersL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoGrantPresenceForPresentityGroupMembersL( 
-											const  MXIMPIdentity&/*aIdentity*/,
-                                            const MPresenceInfoFilter& /*aPif*/,
-                                            TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoGrantPresenceForPresentityGroupMembersL() Start") );
-    
-    LOGGER ( TXT("Authorization::DoGrantPresenceForPresentityGroupMembersL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUpdateGrantPresenceForPresentityGroupMembersL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoUpdatePresenceGrantPifForPresentityGroupMembersL( 
-											const MXIMPIdentity&/*aIdentity*/,
-                                            const MPresenceInfoFilter&/*aPif*/,
-                                            TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("DoUpdatePresenceGrantPifForPresentityGroupMembersL() Start") );
-    
-    LOGGER ( TXT("DoUpdatePresenceGrantPifForPresentityGroupMembersL() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUpdateGrantPresenceForPresentityGroupMembersL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoWithdrawPresenceGrantFromPresentityGroupMembersL( 
-											const MXIMPIdentity&/*aIdentity*/,
-											TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("DoWithdrawPresenceGrantFromPresentityGroupMembersL() Start") );
-    
-    LOGGER ( TXT("DoWithdrawPresenceGrantFromPresentityGroupMembersL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoGrantPresenceForEveryoneL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoGrantPresenceForEveryoneL( 
-											const MPresenceInfoFilter& /*aPif*/,
- 											TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT("Authorization::DoGrantPresenceForEveryoneL() Start") );
-	
-    LOGGER ( TXT("Authorization::DoGrantPresenceForEveryoneL() End") );
-	}
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUpdatePresenceGrantPifForEveryoneL()
-// ---------------------------------------------------------------------------
-//											 
-void COssProtocolPresenceAuthorization::DoUpdatePresenceGrantPifForEveryoneL(
-											const MPresenceInfoFilter& /*aPif*/,
-						                    TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT("Authorization::DoUpdatePresenceGrantPifForEveryoneL() Start") );
-	
-    LOGGER ( TXT("Authorization::DoUpdatePresenceGrantPifForEveryoneL() End") );
-	}
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoWithdrawPresenceGrantFromEveryoneL()
-// ---------------------------------------------------------------------------
-//                  
-void COssProtocolPresenceAuthorization::DoWithdrawPresenceGrantFromEveryoneL( 
-						TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT("Authorization::DoWithdrawPresenceGrantFromEveryoneL() Start") );
-	
-    LOGGER ( TXT("Authorization::DoWithdrawPresenceGrantFromEveryoneL() End") );
-	} 
-	
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoSubscribePresenceBlockListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoSubscribePresenceBlockListL( 
-						TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoSubscribePresenceBlockListL() Start") );
-    
-    LOGGER ( TXT("Authorization::DoSubscribePresenceBlockListL() End") );
-    }
-    
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoUnsubscribePresenceBlockListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoUnsubscribePresenceBlockListL( 
-				TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoUnsubscribePresenceBlockListL() Start") );
-    LOGGER ( TXT("Authorization::DoUnsubscribePresenceBlockListL() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoBlockPresenceForPresentityL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoBlockPresenceForPresentityL( 
-											const MXIMPIdentity& /*aPresentityId*/,
-											TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoBlockPresenceForPresentityL() Start") );
-    
-    LOGGER ( TXT("Authorization::DoBlockPresenceForPresentityL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::DoCancelPresenceBlockFromPresentityL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::DoCancelPresenceBlockFromPresentityL( 
-											const MXIMPIdentity& /*aPresentityId*/,
-											TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Authorization::DoCancelPresenceBlockFromPresentityL() Start") );
-  
-    LOGGER ( TXT("Authorization::DoCancelPresenceBlockFromPresentityL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresenceAuthorization::CreateDataHandlerL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresenceAuthorization::CreateDataHandlerL()
-	{
-	LOGGER ( TXT("Authorization::CreateDataHandler() Start"));
-	iConnMan.ManufactureDataHandlerL();		
-	LOGGER ( TXT("Authorization::CreateDataHandler() End"));
-	}
-	
-
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/presenceauthorization/cpresenceauthuserrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Request for accepting add invite to the Network Server.
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cpresenceauthuserrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include <presenceinfo.h>
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <presenceinfofilter.h>
-
-#include <glib/gstrfuncs.h>
-#include <gtypes.h>
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <glib/gprintf.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "waittimer.h"
-#include <ximperrors.hrh>
-#include "ossprotocoladaptutils.h"
-	
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::CPresenceAuthUserRequest
-// ---------------------------------------------------------------------------
-//
-CPresenceAuthUserRequest::CPresenceAuthUserRequest( 
-						MOSSProtocolConnectionManager& aConnMan,
-						TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CPresenceAuthUserRequest Start") );
-    CActiveScheduler::Add( this );
-    LOGGER ( TXT("::CPresenceAuthUserRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CPresenceAuthUserRequest::ConstructL()
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::ConstructL Start-End") );
-    
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::NewL
-// ---------------------------------------------------------------------------
-//
-CPresenceAuthUserRequest* CPresenceAuthUserRequest::NewL(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::NewL Start") );
-    
-    CPresenceAuthUserRequest* self = 
-    				new( ELeave ) CPresenceAuthUserRequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    LOGGER ( TXT("CPresenceAuthUserRequest::NewL End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CPresenceAuthUserRequest* CPresenceAuthUserRequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::NewLC Start") );
-    
-    CPresenceAuthUserRequest* self = 
-    				 CPresenceAuthUserRequest::NewL( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-       
-    LOGGER ( TXT("CPresenceAuthUserRequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::~CPresenceAuthUserRequest
-// ---------------------------------------------------------------------------
-//
-CPresenceAuthUserRequest::~CPresenceAuthUserRequest()
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::~CPresenceAuthUserRequest Start") );
-
-    CActive::Cancel();
-    LOGGER ( TXT("CPresenceAuthUserRequest::~CPresenceAuthUserRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CPresenceAuthUserRequest::DoCancel()
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::DoCancel Start") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CPresenceAuthUserRequest::RunL()
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::RunL Start") );
-    
-   	message_hdr_resp* msg_struct = NULL;
-	User::LeaveIfError( iStatus.Int() );
-    char* pResponse = NULL;  
-	pResponse = iConnMan.DataHandler().ResponseL( iSendId ); 
-	
-	msg_struct = ( message_hdr_resp* )pResponse ;
-
-	if( !( msg_struct->response ) )
-	{
-		//for all other error codes like ssl related are mapped to general error
-	  iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-	}
-	else
-	{
-	  iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	}
-	free(pResponse);
-	delete this;
-	LOGGER ( TXT("CPresenceAuthUserRequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CPresenceAuthUserRequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CPresenceAuthUserRequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    
-    delete this;
-	LOGGER ( TXT("CPresenceAuthUserRequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceAuthUserRequest::PresenceAuthUserRequest
-// ---------------------------------------------------------------------------
-//
-void CPresenceAuthUserRequest::PresenceAuthUserRequestL(	
-									const MXIMPIdentity & aIdentity,
-                                    const MPresenceInfoFilter &/*aPif*/ )
-    {   
-    LOGGER ( TXT("CPresenceAuthUserRequest::PresenceAuthUserRequest Start") );
-
-	char *smsg = NULL;
-	int totalLen = 0;
-	
-    message_hdr_req msgHdr = {0,};
-	msgHdr.message_type = EAccept_Contact_Request ;
-	TInt headerSize = sizeof( message_hdr_req ) ;
-
-	charFormatData tmpmsgData = OssProtocolAdapUtils::ConvertTUint16ToCharLC( aIdentity.Identity() );
-	char* tmpmsg = tmpmsgData.data;
-	TInt  tmpmsgLength = tmpmsgData.dataSize;	
-	totalLen = headerSize + tmpmsgLength;
-	 
-	smsg = ( char* ) User::AllocLC(totalLen);
-	memcpy( smsg, &msgHdr, headerSize );
-	memcpy ( smsg + headerSize, tmpmsg, tmpmsgLength );
-	
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-
-	// signal the scheduler
-	SetActive();
-
-	CleanupStack::PopAndDestroy ( 2 );	//smsg, tmpmsg.
-	LOGGER ( TXT("CPresenceAuthUserRequest::PresenceAuthUserRequest End") );
-    }
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presenceauthorization/csubscribepresencegrantrequestlistrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
-* Copyright (c) 2007-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:  subscribe to grant presence request list
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "csubscribepresencegrantrequestlistrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include <protocolpresenceauthorizationdatahost.h>
-
-#include "cossprotocolconnectionmanager.h"
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <ximpdatasubscriptionstate.h>
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::CSubscribePresenceGrantRequestListRequest
-// ---------------------------------------------------------------------------
-//
-CSubscribePresenceGrantRequestListRequest::CSubscribePresenceGrantRequestListRequest( 
-												MOSSProtocolConnectionManager& aConnMan,
-												TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CSubscribePresenceGrantRequestListRequest Start") );
-    CActiveScheduler::Add( this );
-    LOGGER ( TXT("::CSubscribePresenceGrantRequestListRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresenceGrantRequestListRequest::ConstructL()
-    {
-    LOGGER ( TXT("::ConstructL Start") );
-	LOGGER ( TXT("::ConstructL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::NewL
-// ---------------------------------------------------------------------------
-//
-CSubscribePresenceGrantRequestListRequest* CSubscribePresenceGrantRequestListRequest::NewL(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::NewL Start") );
-    
-    CSubscribePresenceGrantRequestListRequest* self = new( ELeave ) 
-    		CSubscribePresenceGrantRequestListRequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::NewL End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CSubscribePresenceGrantRequestListRequest* CSubscribePresenceGrantRequestListRequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::NewLC Start") );
-    
-    CSubscribePresenceGrantRequestListRequest* self =  
-    		CSubscribePresenceGrantRequestListRequest::NewL( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-           
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::~CSubscribePresenceGrantRequestListRequest
-// ---------------------------------------------------------------------------
-//
-CSubscribePresenceGrantRequestListRequest::~CSubscribePresenceGrantRequestListRequest()
-    {
-    LOGGER ( TXT("::~CSubscribePresenceGrantRequestListRequest Start") );
-    
-    CActive::Cancel();
-    
-    LOGGER ( TXT("::~CSubscribePresenceGrantRequestListRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresenceGrantRequestListRequest::DoCancel()
-    {
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::DoCancel Start") );
-    iConnMan.DataHandler().CancelListeningAddNotication();
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresenceGrantRequestListRequest::RunL()
-    {
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::RunL Start") );
-    
-	User::LeaveIfError( iStatus.Int() );
-	
-	iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, KErrNone);
-    
-	delete this;
-	LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CSubscribePresenceGrantRequestListRequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    
-    delete this;
-	LOGGER ( TXT("CSubscribePresenceGrantRequestListRequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CSubscribePresenceGrantRequestListRequest::SubscribePresenceGrantRequestListL
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresenceGrantRequestListRequest::SubscribePresenceGrantRequestListL()
-    {   
-    LOGGER ( TXT("::SubscribePresenceGrantRequestListL Start") );
-	// signal the scheduler
-	SetActive();
-	
-	//by default adaptation 1.2 is ready for receiving presence authorisation requests from the server.no need to subscribe for it  
-	TRequestStatus *status = &iStatus;
-	User::RequestComplete( status, KErrNone);
-	
-	LOGGER ( TXT("::SubscribePresenceGrantRequestListL End") );
-    }
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presenceauthorization/cwithdrawpresencegrantfrompresentityrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Request for Rejecting add invite to the Network Server.
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cwithdrawpresencegrantfrompresentityrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include <presenceinfo.h>
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <presenceinfofilter.h>
-
-#include <glib/gstrfuncs.h>
-#include <gtypes.h>
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <glib/gprintf.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "waittimer.h"
-#include <ximperrors.hrh>
-#include "ossprotocoladaptutils.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::CWithdrawPresenceGrantFromPresentityRequest
-// ---------------------------------------------------------------------------
-//
-CWithdrawPresenceGrantFromPresentityRequest::CWithdrawPresenceGrantFromPresentityRequest( 
-						MOSSProtocolConnectionManager& aConnMan,
-						TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CWithdrawPresenceGrantFromPresentityRequest Start") );
-    CActiveScheduler::Add( this );
-    LOGGER ( TXT("::CWithdrawPresenceGrantFromPresentityRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CWithdrawPresenceGrantFromPresentityRequest::ConstructL()
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::ConstructL Start-End") );
-    
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::NewL
-// ---------------------------------------------------------------------------
-//
-CWithdrawPresenceGrantFromPresentityRequest* CWithdrawPresenceGrantFromPresentityRequest::NewL(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::NewL Start") );
-    
-    CWithdrawPresenceGrantFromPresentityRequest* self = 
-    				new( ELeave ) CWithdrawPresenceGrantFromPresentityRequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::NewL End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CWithdrawPresenceGrantFromPresentityRequest* CWithdrawPresenceGrantFromPresentityRequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::NewLC Start") );
-    
-    CWithdrawPresenceGrantFromPresentityRequest* self = 
-    				 CWithdrawPresenceGrantFromPresentityRequest::NewL( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-       
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::~CWithdrawPresenceGrantFromPresentityRequest
-// ---------------------------------------------------------------------------
-//
-CWithdrawPresenceGrantFromPresentityRequest::~CWithdrawPresenceGrantFromPresentityRequest()
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::~CWithdrawPresenceGrantFromPresentityRequest Start") );
-    CActive::Cancel();
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::~CWithdrawPresenceGrantFromPresentityRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CWithdrawPresenceGrantFromPresentityRequest::DoCancel()
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::DoCancel Start") );
-    
-  //  iConnMan.DataHandler().CancelSending( iSendId );
-    
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CWithdrawPresenceGrantFromPresentityRequest::RunL()
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::RunL Start") );
-    
-   	message_hdr_resp* msg_struct = NULL;
-   	char* pResponse = NULL;  
-    TInt error_code(KErrNone);
-	User::LeaveIfError( iStatus.Int() );
-   
-	pResponse = iConnMan.DataHandler().ResponseL( iSendId ); 
-	
-	msg_struct = ( message_hdr_resp* )pResponse ;
-    error_code = msg_struct->error_type;
-	if( !( msg_struct->response ) )
-	{
-	    iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, error_code );
-	}
-	else
-	{
-	  iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	}
-
-	free( pResponse );	
-	delete this;
-	LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CWithdrawPresenceGrantFromPresentityRequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    
-    delete this;
-	LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CWithdrawPresenceGrantFromPresentityRequest::WithdrawPresenceGrantFromPresentityL
-// ---------------------------------------------------------------------------
-//
-void CWithdrawPresenceGrantFromPresentityRequest::WithdrawPresenceGrantFromPresentityL(
-													const MXIMPIdentity& aIdentity)
-    {   
-    LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::WithdrawPresenceGrantFromPresentity Start") );
-   	char *smsg 		= NULL;
-	char *tmpmsg 	= NULL;	
-	int userLen 	= 0;
-	int totalLen	= 0;
-
-    message_hdr_req msgHdr 	= {0,};
-	msgHdr.message_type 	= EReject_Contact_Request ;
-    
-    TInt headerLength = sizeof( message_hdr_req );
-	totalLen += headerLength;
-	// adding add contact
-	charFormatData tmpmsgData = OssProtocolAdapUtils::ConvertTUint16ToCharLC( aIdentity.Identity() );
-    tmpmsg 	= tmpmsgData.data;
-    userLen = tmpmsgData.dataSize;	
-	totalLen += userLen;
-	 
-	 if ( totalLen > MAX_MSG_SIZE ) 
-    	{
-		User::Leave(KErrArgument);		
-    	}
-    	
-    smsg = ( char* ) User::AllocLC(totalLen);
-    memcpy( smsg, &msgHdr, headerLength );
-	memcpy ( smsg + headerLength, tmpmsg, userLen );
-    
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-
-	// signal the scheduler
-	SetActive();
-
-	CleanupStack::PopAndDestroy ( 2 );//smsg, tmpmsg. 	
-	
-	LOGGER ( TXT("CWithdrawPresenceGrantFromPresentityRequest::WithdrawPresenceGrantFromPresentity End") );
-    }
-
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presencepublishing/cossprotocolpresencepublishing.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,266 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IMPS Protocol Publishing implementation for Presence Framework
-*
-*/
-
-
-#include <badesca.h>
-
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <ximpprotocolconnectionhost.h>
-
-#include "cossprotocolpresencepublishing.h"
-#include "ossprotocolpluginlogger.h"
-#include "cossprotocolconnectionmanager.h"
-//#include "csubscribeownpresencerequest.h"
-#include "cpresencenotificationhandler.h"
-//#include "cunsubscribeownpresencerequest.h"
-#include "cpublishownpresencerequest.h"
-//#include "csubscribepresencewatcherlistrequest.h"
-//#include "cupdateownpresencesubscriptionpifrequest.h"
-
-#include "ossprotocolpluginpanics.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COssProtocolPresencePublishing::GetInterface(
- 	TInt32 aInterfaceId,
-    TIfGetOps aOptions )
-    {
-    LOGGER ( TXT("CImpsProtocolPresentityGroups::GetInterface() Start") );
-    
-
-    if( aInterfaceId == MProtocolPresencePublishing::KInterfaceId )
-        {
-        MProtocolPresencePublishing* self = this;
-        return self;
-        }
-
-    if( aOptions == MXIMPBase::EPanicIfUnknown )
-        {
-        User::Panic( KOSSProtocolPresencePublishing, KErrExtensionNotSupported );
-        }
-
-	LOGGER ( TXT("COssProtocolPresencePublishing::GetInterface() End") );
-    return NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COssProtocolPresencePublishing::GetInterface( 
-	TInt32 aInterfaceId,
-    TIfGetOps aOptions ) const
-    {
-    LOGGER ( TXT("CImpsProtocolPresentityGroups::GetInterface() Start") );
-    
-    if( aInterfaceId == MProtocolPresencePublishing::KInterfaceId )
-        {
-        const MProtocolPresencePublishing* self = this;
-        return self;
-        }
-
-    if( aOptions == MXIMPBase::EPanicIfUnknown )
-        {
-        User::Panic( KOSSProtocolPresencePublishing, KErrExtensionNotSupported );
-        }
-
-	LOGGER ( TXT("COssProtocolPresencePublishing::GetInterface() End") );
-    return NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::NewInstanceLC()
-// ---------------------------------------------------------------------------
-//
-TInt32 COssProtocolPresencePublishing::GetInterfaceId() const
-    {
-    LOGGER ( TXT("COssProtocolPresencePublishing::GetInterfaceId() Start-End") );
-    return MProtocolPresencePublishing::KInterfaceId;
-    }
-    
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::COssProtocolPresencePublishing()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresencePublishing::COssProtocolPresencePublishing(
-									MOSSProtocolConnectionManager& aConnMan)
-:iConnMan(aConnMan)
-    {
-   	LOGGER ( TXT("Publishing::COssProtocolPresencePublishing() Start") );
-   	LOGGER ( TXT("Publishing::COssProtocolPresencePublishing() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::ConstructL()
-    {
-    LOGGER ( TXT("COssProtocolPresencePublishing::ConstructL() Start") );    
-    
-    //iNotificationHandler = CPresenceNotificationHandler::NewL( iConnMan );	
- 	
- 	                                      
-    LOGGER ( TXT("COssProtocolPresencePublishing::ConstructL() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::NewL()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresencePublishing* COssProtocolPresencePublishing::NewL(  
-										MOSSProtocolConnectionManager& aConnMan  )
-
-    {
-    LOGGER ( TXT("COssProtocolPresencePublishing::NewL() Start") );
-
-    COssProtocolPresencePublishing* self = 
-    				new( ELeave ) COssProtocolPresencePublishing(aConnMan);
-    CleanupStack::PushL( self );
-    self->ConstructL( );
-    CleanupStack::Pop( self );
-
-    LOGGER ( TXT("COssProtocolPresencePublishing::NewL() End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::~COssProtocolPresencePublishing()
-// ---------------------------------------------------------------------------
-//
-COssProtocolPresencePublishing::~COssProtocolPresencePublishing()
-    {
-    LOGGER ( TXT("Publishing::~COssProtocolPresencePublishing() Start") );
-    
-    //delete iNotificationHandler;
-    
-	LOGGER ( TXT("Publishing::~COssProtocolPresencePublishing() End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoSubscribeOwnPresenceL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoSubscribeOwnPresenceL( 
-	const MPresenceInfoFilter& /*aPif*/,
-    TXIMPRequestId /*aReqId*/ )
-    {
-    LOGGER ( TXT("Publishing::DoSubscribeOwnPresenceL() Start") );
-
-	LOGGER ( TXT("Publishing::DoSubscribeOwnPresenceL() End") );
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoUnsubscribeOwnPresenceL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoUnsubscribeOwnPresenceL( 
-	TXIMPRequestId /*aReqId*/ )
-    {
-	LOGGER ( TXT("Publishing::DoUnsubscribeOwnPresenceL() Start") );
-	
-	LOGGER ( TXT("Publishing::DoUnsubscribeOwnPresenceL() End") );
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoUpdateOwnPresenceSubscriptionL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoUpdateOwnPresenceSubscriptionPifL( 
-	const MPresenceInfoFilter& /*aPif*/,
-    TXIMPRequestId /*aReqId*/ )
-    {
-	LOGGER ( TXT("Publishing::DoUpdateOwnPresenceSubscriptionPifL() Start") );
-	   
-	
-	LOGGER ( TXT("Publishing::DoUpdateOwnPresenceSubscriptionPifL() End") );
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoPublishOwnPresenceL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoPublishOwnPresenceL( 
-	const MPresenceInfo& aPresence,
-    TXIMPRequestId aReqId )
-    {
-    LOGGER ( TXT("Publishing::DoPublishOwnPresenceL() Start") );
-    
-
- 		
- 	CPublishOwnPresencerequest* req = 
- 	CPublishOwnPresencerequest::NewLC( iConnMan, aReqId );
- 	
-	
-	req->PublishOwnPresenceL(aPresence);
-	
-	CleanupStack::Pop( req );
-	
-    LOGGER ( TXT("Publishing::DoPublishOwnPresenceL() End") );
-    }
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoSubscribePresenceWatcherListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoSubscribePresenceWatcherListL( 
-	TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT("Publishing::DoSubscribePresenceWatcherListL() Start") );
-
-
-	
-	LOGGER ( TXT("Publishing::DoSubscribePresenceWatcherListL() End") );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COssProtocolPresencePublishing::DoUnsubscribePresenceWatcherListL()
-// ---------------------------------------------------------------------------
-//
-void COssProtocolPresencePublishing::DoUnsubscribePresenceWatcherListL(
-	TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT("Publishing::DoUnsubscribePresenceWatcherListL() Start") );
-    
-	
-	LOGGER ( TXT("Publishing::DoUnsubscribePresenceWatcherListL() End") );
-	}
-
-
-
-
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/presencepublishing/cpresencenotificationhandler.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  Implementation for handling presence notification
- *
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cpresencenotificationhandler.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-#include "cossprotocolconnectionmanager.h"
-
-#include <e32des16.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "msgliterals.h"
-
-#include "ossprotocoladaptationuids.h"
-#include "ossprotocoladaptutils.h"
-
-#include<avabilitytext.h>
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::CPresenceNotificationHandler
-// ---------------------------------------------------------------------------
-//
-CPresenceNotificationHandler::CPresenceNotificationHandler (
-        MOSSProtocolConnectionManager& aConnMan ) :
-        CActive ( EPriorityNormal ),
-        iConnMan ( aConnMan )
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::CPresenceNotificationHandler Start" ) );
-    CActiveScheduler::Add ( this );
-    LOGGER ( TXT ( "CPresenceNotificationHandler::CPresenceNotificationHandler End" ) );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CPresenceNotificationHandler::ConstructL()
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::ConstructL Start-End" ) );
-    iPresenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CPresenceNotificationHandler* CPresenceNotificationHandler::NewL (
-        MOSSProtocolConnectionManager& aConnMan )
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::NewL Start" ) );
-
-    CPresenceNotificationHandler* self = new ( ELeave ) CPresenceNotificationHandler ( aConnMan );
-    CleanupStack::PushL ( self );
-    self->ConstructL();
-    CleanupStack::Pop ( self );
-
-    LOGGER ( TXT ( "CPresenceNotificationHandler::NewL End" ) );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::NewLC
-// ---------------------------------------------------------------------------
-//
-CPresenceNotificationHandler* CPresenceNotificationHandler::NewLC (
-        MOSSProtocolConnectionManager& aConnMan )
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::NewLC Start" ) );
-
-    CPresenceNotificationHandler* self = CPresenceNotificationHandler::NewL ( aConnMan );
-    CleanupStack::PushL ( self );
-
-    LOGGER ( TXT ( "CPresenceNotificationHandler::NewLC End" ) );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::~CPresenceNotificationHandler
-// ---------------------------------------------------------------------------
-//
-CPresenceNotificationHandler::~CPresenceNotificationHandler()
-    {
-    LOGGER ( TXT ( "::~CPresenceNotificationHandler Start" ) );
-
-    Cancel();
-    //
-    if ( iPresenceCacheWriter )
-        {
-        iPresenceCacheWriter->DeleteService( iConnMan.ServiceName() );
-        delete iPresenceCacheWriter ;
-        }
-    LOGGER ( TXT ( "::~CPresenceNotificationHandler End" ) );
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CPresenceNotificationHandler::DoCancel()
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::DoCancel Start" ) );
-
-    iConnMan.DataHandler().CancelListeningPres();
-
-    LOGGER ( TXT ( "CPresenceNotificationHandler::DoCancel End" ) );
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::RunL()
-// ---------------------------------------------------------------------------
-//
-void CPresenceNotificationHandler::RunL()
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::RunL Start" ) );
-
-    // something is coming from the xmpp server
-    User::LeaveIfError ( iStatus.Int() );
-    ProcessIncomingDataL();
-    StartListeningL();
-
-    LOGGER ( TXT ( "CPresenceNotificationHandler::RunL End" ) );
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::ProcessIncomingDataL()
-// ---------------------------------------------------------------------------
-/* This Function is used to convert the received 
- *  presence notification from Isolation Server Message queue 
- *  into the ximpfw data types. and storing the presence information
- *  in to the presence cache ( available in ximpfw ) 
- *  client has to read the presence information from the 
- *  presence cache. when the change in status notification is received
- *  while updating presence cache, client will receive the notification if subscribed.
- */
-void CPresenceNotificationHandler::ProcessIncomingDataL()
-    {	
-    LOGGER ( TXT ( "CPresenceNotificationHandler::ProcessIncomingDataL Start" ) );
-
-    char* pResponse = NULL, *pOrigResponse = NULL;  
-    pOrigResponse = pResponse = iConnMan.DataHandler().ResponseL ( 2 );// 2 is to differentiate presence notification from server initiated request
-    CleanupStack::PushL(pOrigResponse) ; 	
-    MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
-
-    // pResponse contians "<MsgHdr>ContactId/0AvailabilityStatus/0StatusMessage".
-    pResponse += sizeof ( message_hdr_resp ); // Skipping Message Header
-
-    ///////// Geting Contact-id from message queue
-    char* contactid = pResponse; // contactid
-    HBufC16 *contactName = OssProtocolAdapUtils::ConvertCharToTUint16LC( contactid );   
-    HBufC* name = HBufC::NewLC( contactName->Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-    TPtr namePtr( name->Des() );
-    namePtr.Zero();
-    namePtr.Append(iConnMan.ServiceName() ); // prepend service name
-    namePtr.Append(KColon);
-    namePtr.Append(contactName->Des() );
-    buddyPresInfo->SetIdentityL(namePtr);
-    LOGGER ( TXT ( "CPresenceNotificationHandler::ProcessIncomingDataL  :ContactName:%S " ), contactName );	
-    CleanupStack::PopAndDestroy();//name
-    CleanupStack::PopAndDestroy();//contactName
-
-    ///////// End Getting Contact-id 
-
-    int toklength = strlen(pResponse) + 1 ; // finding length of contactid + '/0' 
-    pResponse += toklength;	  // skipping the contactid
-
-    ///////// Getting availibility text
-    char* availability = pResponse;	  // availability text
-    HBufC16 *message = OssProtocolAdapUtils::ConvertCharToTUint16LC( availability );	    
-    switch (*(pResponse))
-        {
-        case 'd': //compares the first char of "dnd"
-            {
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,KDndState); 
-            break;
-	        }
-        case 'b':
-            {
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,*message); 
-            break;
-            }
-        case 'o':  //compares the first char of "offline"
-            {
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::ENotAvailable,*message);            
-            break;
-            }
-        case 'a':  ////compares the first char of "away" and "available"
-            {
-            if ('v' == *(pResponse + 1))
-                {
-                buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EAvailable,*message);                 
-                } 
-            else 
-                {
-                // EAway  - is not available in  presence cache
-                buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,*message);              	              
-                }
-            break;
-            }
-        case 'x':  
-            {
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,KAwayState ); 
-            break;
-            }
-        case 'h':  
-            {
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EUnknownAvailability,KInvisibleState ); 
-            break;
-            }
-        default:
-            buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EUnknownAvailability,*message);
-            break;
-        }
-    CleanupStack::PopAndDestroy( message );
-    ///////// End getting availability message
-
-    toklength = strlen(pResponse) + 1; // finding length of availability text + '/0'
-    pResponse += toklength;		// skipping availability text 
-
-    ///////// Getting status message if exists
-    if(toklength >1)
-        {
-        char* statustext = pResponse;		
-        HBufC16 *statusmessage = OssProtocolAdapUtils::ConvertCharToTUint16LC( statustext );
-        buddyPresInfo->SetStatusMessageL(*statusmessage);
-        CleanupStack::PopAndDestroy( statusmessage );
-        }	
-    ///////// End Getting status message
-
-    // Writing into Presence Cache
-    TInt cacheerror = iPresenceCacheWriter->WritePresenceL(buddyPresInfo);
-    User::LeaveIfError ( cacheerror);
-    // End
-    CleanupStack::PopAndDestroy ( 1 ); //buddyPresInfo	
-    CleanupStack::PopAndDestroy(pOrigResponse) ;//pOrigResponse
-    LOGGER ( TXT ( "CPresenceNotificationHandler::ProcessIncomingDataL End" ) );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CPresenceNotificationHandler::RunError ( TInt  aError )
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::RunError Start %d" ), aError );
-
-    LOGGER ( TXT ( "CPresenceNotificationHandler::RunError End" ) );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CPresenceNotificationHandler::StartListeningL
-// ---------------------------------------------------------------------------
-//
-void CPresenceNotificationHandler::StartListeningL()
-    {
-    LOGGER ( TXT ( "CPresenceNotificationHandler::StartListeningL Start" ) );
-
-    if ( ! ( this->IsActive() ) )
-        {
-        iConnMan.DataHandler().ListenIncomingPresence ( iStatus );
-        SetActive();
-        }
-    LOGGER ( TXT ( "CPresenceNotificationHandler::StartListeningL End" ) );
-    }
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presencepublishing/cpublishownpresencerequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,488 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  IMplementaion for publising own presence
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cpublishownpresencerequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-
-#include "cossprotocolconnectionmanager.h"
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresencepublishingdatahost.h>
-
-#include <presentitygroupinfo.h>
-#include <presenceinfofieldvaluetext.h>
-#include <presenceinfofieldvalueenum.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <presenceinfo.h>
-#include <personpresenceinfo.h>
-#include <servicepresenceinfo.h>
-#include <devicepresenceinfo.h>
-#include <presenceinfofield.h>
-#include <presenceinfofieldcollection.h>
-#include <presenceinfofieldvaluebinary.h>
-
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "xmppparameters.h"
-#include "waittimer.h"
-#include <e32math.h>
-#include "ossprotocoladaptutils.h"
-#include <avabilitytext.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::CPublishOwnPresencerequest
-// ---------------------------------------------------------------------------
-//
-CPublishOwnPresencerequest::CPublishOwnPresencerequest( 
-									MOSSProtocolConnectionManager& aConnMan,
-									TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CPublishOwnPresencerequest Start") );
-    CActiveScheduler::Add( this );
-    
-    LOGGER ( TXT("::CPublishOwnPresencerequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CPublishOwnPresencerequest::ConstructL()
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::ConstructL Start-End") );
-    
-	
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::NewL
-// ---------------------------------------------------------------------------
-//
-CPublishOwnPresencerequest* CPublishOwnPresencerequest::NewL(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::NewL Start") );
-    
-    CPublishOwnPresencerequest* self = new( ELeave ) 
-    			CPublishOwnPresencerequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    
-    LOGGER ( TXT("CPublishOwnPresencerequest::NewL End") );
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CPublishOwnPresencerequest* CPublishOwnPresencerequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::NewLC Start") );
-    
-    CPublishOwnPresencerequest* self = 
-    					CPublishOwnPresencerequest::NewL(aConnMan, aRequestId);
-    CleanupStack::PushL( self );
-    
-    LOGGER ( TXT("CPublishOwnPresencerequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::~CPublishOwnPresencerequest
-// ---------------------------------------------------------------------------
-//
-CPublishOwnPresencerequest::~CPublishOwnPresencerequest()
-    {
-    LOGGER ( TXT("::~CPublishOwnPresencerequest Start") );
-    
-	CActive::Cancel();
-    
-    delete iOwnPresenceInfo;
-    iOwnPresenceInfo = NULL;
-    LOGGER ( TXT("::~CPublishOwnPresencerequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CPublishOwnPresencerequest::DoCancel()
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::DoCancel Start") );
-    
-  //  iConnMan.DataHandler().CancelSending( iSendId );
-    
-    LOGGER ( TXT("CPublishOwnPresencerequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CPublishOwnPresencerequest::RunL()
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::RunL Start") );
-	message_hdr_resp* msg_struct = NULL;
-	User::LeaveIfError ( iStatus.Int() );
-    char* pResponse = NULL;  
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-
-	msg_struct = ( message_hdr_resp* )pResponse ;
-	if( !( msg_struct->response ) )
-		{
-		switch( msg_struct->error_type )
-			{
-
-			default:  //for all other error codes like ssl related are mapped to general error
-			iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-			break;       
-			}	
-		}
-	else
-		{
-		if( iOwnPresenceInfo )
-			{
-			// set or clear avatar
-			MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-			TInt cacheerror = presenceCacheWriter->WritePresenceL( iOwnPresenceInfo );
-			User::LeaveIfError ( cacheerror);
-			delete iOwnPresenceInfo ;
-			iOwnPresenceInfo = NULL;
-			delete presenceCacheWriter;	
-			}
-		iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-		}
-
-	free( pResponse );
-
-	delete this;
-
-	LOGGER ( TXT("CPublishOwnPresencerequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CPublishOwnPresencerequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CPublishOwnPresencerequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    
-    delete this;
-	LOGGER ( TXT("CPublishOwnPresencerequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CPublishOwnPresencerequest::PublishOwnPresenceL
-// ---------------------------------------------------------------------------
-//
-void CPublishOwnPresencerequest::PublishOwnPresenceL(const MPresenceInfo& aPresence)
-    {   
-    LOGGER ( TXT("CPublishOwnPresencerequest::PublishOwnPresenceL Start") );
-	char *smsg = NULL;
-	char *tmpmsg = NULL;
-	message_hdr_req msgHdr = {0,};
-
-	int err = 0;
-	int userLen = 0;
-	int totalLen = 0;
-    const MPersonPresenceInfo* personPresence = aPresence.PersonPresence();
-    const MPresenceInfoFieldCollection& presenceFields = personPresence->Fields();
-    const MPresenceInfoField& presenceField = presenceFields.FieldAt( 0 );
-    //updating own avtar
-    if( !(presenceField.FieldType().Compare( NPresenceInfo::NFieldType::KAvatar )) )
-        {
-        int messagelength = 0;
-        const MPresenceInfoFieldValueBinary* avtarfield = 
-        TXIMPGetInterface< const MPresenceInfoFieldValueBinary >::From(
-                presenceField.FieldValue(),
-                MXIMPBase::EPanicIfUnknown );
-        if( !(avtarfield->MimeType().Length() ))   //clear avatar
-            {
-            // now manufacture the message for the clear avtar
-            msgHdr.message_type = EClearOwnAvatar;
-            messagelength = sizeof( message_hdr_req );
-            smsg = ( char* ) User::AllocLC ( messagelength );
-            memset ( smsg, '\0', messagelength );
-            memcpy( smsg, &msgHdr, messagelength );//copies message header
-            iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, messagelength );
-            SetActive();// signal the scheduler
-            CleanupStack::PopAndDestroy ( 1 ); //smsg
-            }
-        else     //set or update avatar
-            {
-            // now manufacture the message for the avtar
-            msgHdr.message_type = EUpdateOwnAvtar;
-            messagelength = sizeof( message_hdr_req ) + avtarfield->MimeType().Length() + avtarfield->BinaryValue().Length()+2; // 2 for '\0' 's
-            smsg = ( char* ) User::AllocLC ( messagelength );
-            tmpmsg = ( char* ) User::AllocLC ( messagelength );
-            memset ( smsg, '\0', messagelength );
-            memset ( tmpmsg, '\0', messagelength );
-            if( messagelength > (MAX_MSG_SIZE - totalLen) )
-                msgHdr.continue_flag = 1;
-            memcpy( smsg, &msgHdr, sizeof( message_hdr_req ) );//copies message header
-            totalLen += sizeof( message_hdr_req );
-            OssProtocolAdapUtils::ConvertTDesC8toChar( avtarfield->MimeType(),tmpmsg);
-            userLen = avtarfield->MimeType().Length(); 
-            memcpy( smsg + totalLen, tmpmsg, userLen );//copies mimetype
-            totalLen += userLen + 1; // for '\0'
-            memset ( tmpmsg, '\0', messagelength );
-            OssProtocolAdapUtils::ConvertTDesC8toChar( avtarfield->BinaryValue(),tmpmsg);
-            userLen = avtarfield->BinaryValue().Length();
-            memcpy( smsg + totalLen, tmpmsg, userLen );//copies avtar
-            totalLen += userLen + 1;
-            iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-            SetActive();// signal the scheduler
-            CleanupStack::PopAndDestroy ( 2 ); //tmpmsg,smsg
-            }
-		iOwnPresenceInfo = MPresenceBuddyInfo2::NewL();
-		if( iOwnPresenceInfo )
-			{
-			TPtrC ownUserPtr = iConnMan.UserName(); 
-			HBufC* xspId = NULL;
-			if( ownUserPtr.Length() )
-				{
-				xspId = HBufC::NewLC( ownUserPtr.Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-				TPtr xspIdPtr( xspId->Des() );
-				xspIdPtr.Zero();
-				xspIdPtr.Append(iConnMan.ServiceName() ); // prepend service name
-				xspIdPtr.Append(KColon);
-				xspIdPtr.Append( ownUserPtr );
-				iOwnPresenceInfo->SetIdentityL(xspIdPtr);
-				CleanupStack::PopAndDestroy(xspId); //xspId	
-				}
-			else
-				{
-				TPtrC xmppOwnId = iConnMan.XmppParams().UserName();
-				xspId = HBufC::NewLC( xmppOwnId.Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-				TPtr xspIdPtr( xspId->Des() );
-				xspIdPtr.Zero();
-				xspIdPtr.Append(iConnMan.ServiceName() ); // prepend service name
-				xspIdPtr.Append(KColon);
-				xspIdPtr.Append( xmppOwnId );
-				iOwnPresenceInfo->SetIdentityL(xspIdPtr);
-				CleanupStack::PopAndDestroy(xspId); //xspId		
-				}
-			iOwnPresenceInfo->SetAvatarL( avtarfield->BinaryValue() );
-			
-			TInt fieldCount = presenceFields.FieldCount();  
-        	for( TInt i = 1; i < fieldCount; i++ ) // zero index is for avatar 
-	            {
-	            const MPresenceInfoField& presenceField = presenceFields.FieldAt( i );
-	            TBuf8<32> temp = presenceField.FieldType();
-	            if( !( presenceField.FieldType().Compare( NPresenceInfo::NFieldType::KAvailabilityEnum )) )
-	                {
-	                const MPresenceInfoFieldValueEnum* availability = 
-               		TXIMPGetInterface< const MPresenceInfoFieldValueEnum >::From( 
-                        presenceField.FieldValue(),
-                        MXIMPBase::EPanicIfUnknown );
-                    MPresenceBuddyInfo2::TAvailabilityValues availabe = MPresenceBuddyInfo2::EUnknownAvailability;
-                    switch (availability->Value())
-                        {
-                        case NPresenceInfo::EAvailable :
-                            {
-                            availabe = MPresenceBuddyInfo2::EAvailable;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe ,KNullDesC );
-                            break;
-                            }
-
-                        case NPresenceInfo::EBusy :
-                            {
-                            availabe = MPresenceBuddyInfo2::EBusy;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe ,KNullDesC );
-                            break;
-                            }
-
-                        case NPresenceInfo::EHidden :
-                            {
-                            availabe = MPresenceBuddyInfo2::EAvailable;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe ,KNullDesC );
-                            break;
-                            }
-
-                        case NPresenceInfo::EDoNotDisturb:
-                            {
-                            availabe = MPresenceBuddyInfo2::EBusy;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe,KDndState);
-                            break;
-                            }
-                            
-                        case NPresenceInfo::EAway:
-                            {
-                            availabe = MPresenceBuddyInfo2::EBusy;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe,KAwayState);
-                            break;
-                            }
-                            
-                        case NPresenceInfo::ENotAvailable:
-                            {
-                            availabe = MPresenceBuddyInfo2::ENotAvailable;
-                            iOwnPresenceInfo->SetAvailabilityL( availabe ,KNullDesC );
-                            break;
-                            }
-                            
-                        default:
-                            break;  
-                        }
-	                }
-				else if( !(presenceField.FieldType().Compare( NPresenceInfo::NFieldType::KStatusMessage )) )
-	                {
-	                const MPresenceInfoFieldValueText* statustext = 
-	                TXIMPGetInterface< const MPresenceInfoFieldValueText >::From(
-	                        presenceField.FieldValue(),
-	                        MXIMPBase::EPanicIfUnknown );
-	                // now manufacture the message for the status text
-	                if( statustext && statustext->TextValue().Length() )
-						{
-						iOwnPresenceInfo->SetStatusMessageL(  statustext->TextValue() );
-						}
-	               
-	                }        
-            	}
-			
-			}
-        }
-    else  //for update presence
-        {
-        TInt fieldCount = presenceFields.FieldCount(); 
-        char* availablty = ( char* ) User::AllocLC ( MAX_MSG_SIZE );
-        smsg = ( char* ) User::AllocLC ( MAX_MSG_SIZE );
-        tmpmsg = ( char* ) User::AllocLC ( MAX_MSG_SIZE );
-        msgHdr.message_type = EUpdateOwnPresence;
-        memset ( smsg, '\0', MAX_MSG_SIZE );
-        memset ( tmpmsg, '\0', MAX_MSG_SIZE );
-        memset ( availablty, '\0', MAX_MSG_SIZE );
-        memcpy( smsg, &msgHdr, sizeof( message_hdr_req ) );
-        totalLen += sizeof( message_hdr_req );
-    // updating availability
-    const MPersonPresenceInfo* personPresence = aPresence.PersonPresence();
-    const MPresenceInfoFieldCollection& presenceFields = personPresence->Fields();
-    //TInt fieldCount = presenceFields.FieldCount();   
-        for( TInt i = 0; i < fieldCount; i++ )
-            {
-            const MPresenceInfoField& presenceField = presenceFields.FieldAt( i );
-            TBuf8<32> temp = presenceField.FieldType();
-            LOGGER ( TXT( "ExtractPersonPresenceAttributes:%S "),&presenceField.FieldType());
- 		
-              if( !( presenceField.FieldType().Compare( NPresenceInfo::NFieldType::KAvailabilityEnum )) )
-                {
-                const MPresenceInfoFieldValueEnum* availability = 
-                TXIMPGetInterface< const MPresenceInfoFieldValueEnum >::From( 
-                        presenceField.FieldValue(),
-                        MXIMPBase::EPanicIfUnknown );
-                 if ( availability->Value() == NPresenceInfo::EAvailable )
-                    {
-                    char* temp = "avaliable";
-                    strcpy(availablty,temp); 
-                    userLen = strlen( availablty );  
-                    memcpy( smsg + totalLen, availablty, userLen );
-                    totalLen += userLen + 1;     
-                    }
-                 else if ( availability->Value() == NPresenceInfo::EBusy )
-                    {
-                    char* temp = "dnd";
-                    strcpy(availablty,temp);
-                    userLen = strlen( availablty );  
-                    memcpy( smsg + totalLen, availablty, userLen );
-                    totalLen += userLen + 1;     
-                    }   
-                 else if(availability->Value() == NPresenceInfo::EAway) 
-                    {		
-                    char* temp = "away";
-                    strcpy(availablty,temp);
-                    userLen = strlen( availablty );  
-                    memcpy( smsg + totalLen, availablty, userLen );
-                    totalLen += userLen + 1;    
-    				}
-                 else if(availability->Value() == NPresenceInfo::EHidden) 
-                    {       
-                     char* temp = "hidden";
-                     strcpy(availablty,temp);
-                     userLen = strlen( availablty );  
-                     memcpy( smsg + totalLen, availablty, userLen );
-                     totalLen += userLen + 1;    
-                    }
-                 else if(availability->Value() == NPresenceInfo::ENotAvailable) 
-                    {       
-                     char* temp = "offline";
-                     strcpy(availablty,temp);
-                     userLen = strlen( availablty );  
-                     memcpy( smsg + totalLen, availablty, userLen );
-                     totalLen += userLen + 1;    
-                    }
-                 
-          }
-    //updating status text
-    
-         if( !(presenceField.FieldType().Compare( NPresenceInfo::NFieldType::KStatusMessage )) )
-                {
-                const MPresenceInfoFieldValueText* statustext = 
-                TXIMPGetInterface< const MPresenceInfoFieldValueText >::From(
-                        presenceField.FieldValue(),
-                        MXIMPBase::EPanicIfUnknown );
-                // now manufacture the message for the status text
-                if( statustext && statustext->TextValue().Length() )
-                    {
-		                TPtrC bufferPtr (  statustext->TextValue() );
-		                err = tbufC16tochar ( bufferPtr, tmpmsg );
-		                if( KErrNotFound == err)
-		                    {
-		                    iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, err );
-		                    }
-		                userLen = strlen ( tmpmsg ) + 1; //for '\0'
-		             }
-                memcpy( smsg + totalLen, tmpmsg, userLen );
-                totalLen += userLen + 1;
-                }        
-            }
-        iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );        
-        SetActive();// signal the scheduler
-        CleanupStack::PopAndDestroy ( 3 ); //tmpmsg,smsg,availability
-        }
-    LOGGER ( TXT("CPublishOwnPresencerequest::PublishOwnPresenceL End") );
-    }
-    
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presentitygroups/caddcontactnotificationhandler.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Add notification handler
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "caddcontactenotificationhandler.h"
-
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-#include "cossprotocolconnectionmanager.h"
-
-#include <ximpobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <protocolpresencepublishingdatahost.h>
-#include <protocolpresencedatahost.h>
-#include <presenceobjectfactory.h>
-#include <presencegrantrequestinfo.h>
-
-
-#include <personpresenceinfo.h>
-#include <servicepresenceinfo.h>
-#include <devicepresenceinfo.h>
-#include <presenceinfo.h>
-
-#include <presenceinfofield.h>
-#include <presenceinfofieldcollection.h>
-#include <presenceinfofieldvalueenum.h>
-#include <presenceinfofieldvaluetext.h>
-#include <ximpcontext.h>
-#include <ximpclient.h>
-#include <devicepresenceinfo.h>
-#include <protocolpresencewatchingdatahost.h>
-#include <presencegrantrequestinfo.h>
-#include <protocolpresenceauthorizationdatahost.h>
-#include <e32des16.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "msgliterals.h"
-
-#include "ossprotocoladaptationuids.h"
-#include "ossprotocoladaptutils.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::CAddContactNotificationHandler
-// ---------------------------------------------------------------------------
-//
-CAddContactNotificationHandler::CAddContactNotificationHandler (
-    MOSSProtocolConnectionManager& aConnMan ) :
-		CActive ( EPriorityNormal ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::CAddContactNotificationHandler Start" ) );
-	CActiveScheduler::Add ( this );
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::CAddContactNotificationHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CAddContactNotificationHandler::ConstructL()
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::ConstructL Start-End" ) );
-
-	}
-
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CAddContactNotificationHandler* CAddContactNotificationHandler::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::NewL Start" ) );
-
-	CAddContactNotificationHandler* self = new ( ELeave ) CAddContactNotificationHandler ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::NewLC
-// ---------------------------------------------------------------------------
-//
-CAddContactNotificationHandler* CAddContactNotificationHandler::NewLC (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::NewLC Start" ) );
-
-	CAddContactNotificationHandler* self = CAddContactNotificationHandler::NewL ( aConnMan );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::~CAddContactNotificationHandler
-// ---------------------------------------------------------------------------
-//
-CAddContactNotificationHandler::~CAddContactNotificationHandler()
-	{
-	LOGGER ( TXT ( "::~CAddContactNotificationHandler Start" ) );
-
-	Cancel();
-
-	LOGGER ( TXT ( "::~CAddContactNotificationHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CAddContactNotificationHandler::DoCancel()
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::DoCancel Start" ) );
-
-	iConnMan.DataHandler().CancelListeningAddNotication();
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::DoCancel End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::RunL()
-// ---------------------------------------------------------------------------
-//
-void CAddContactNotificationHandler::RunL()
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::RunL Start" ) );
-
-	// something is coming from the xmpp server
-	User::LeaveIfError ( iStatus.Int() );
-
-	ProcessIncomingDataL();
-	StartListeningL();
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::RunL End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::ProcessIncomingDataL()
-// ---------------------------------------------------------------------------
-/* This Function is used to convert the received 
-*  presence notification from Isolation Server Message queue 
-*  into the ximpfw data types. and storing the presence information
-*  in to the presence cache ( available in ximpfw ) 
-*  client has to read the presence information from the 
-*  presence cache. when the change in status notification is received
-*  while updating presence cache, client will receive the notification if subscribed.
-*/	
-void CAddContactNotificationHandler::ProcessIncomingDataL()
-	{	
-	LOGGER ( TXT ( "CAddContactNotificationHandler::ProcessIncomingDataL Start" ) );
-    char* pResponse = NULL, *pOrigResponse = NULL;  
-    TInt len = 0;
-	pOrigResponse = pResponse = iConnMan.DataHandler().ResponseL ( 4 );
-	CleanupStack::PushL(pOrigResponse) ;
-	RPointerArray<HBufC>& invitations =  iConnMan.GetContactManager().GetInvitationListL();   
-	if( pResponse )
-	 {
-	 	pResponse += sizeof ( message_hdr_resp );
-	 	while(1)
-        {
-        len = strlen(pResponse) + 1;
-        if (1 == len)
-            {
-            break;
-            }
-		HBufC16*  AuthreqId = OssProtocolAdapUtils::ConvertCharToTUint16LC( pResponse );
-		pResponse += len;
-		TInt len1 = AuthreqId->Length();
-        MXIMPObjectFactory& ObjFact = iConnMan.HandleToHost().ObjectFactory();
-    	MPresenceObjectFactory& prfwObjFact = iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory();
-    	
-    	invitations.AppendL( AuthreqId );
-    	MPresenceGrantRequestInfo* presenceGrant;
-    	presenceGrant = prfwObjFact.NewPresenceGrantRequestInfoLC();//1
-    	MXIMPIdentity* AuthReqIdentity;
-    	AuthReqIdentity = ObjFact.NewIdentityLC();//2
-    	AuthReqIdentity->SetIdentityL(*AuthreqId);
-	    AuthreqId->Des().Fold();
-	    presenceGrant->SetRequestorIdL(AuthReqIdentity);  
-    	iConnMan.HandleToHost().ProtocolPresenceDataHost().AuthorizationDataHost().HandlePresenceGrantRequestReceivedL (presenceGrant); 
-    	TInt count = iConnMan.PresenceAuthGrantReqList()->Count();
-    	iConnMan.PresenceAuthGrantReqList()->Append(*AuthreqId);
-    	count = iConnMan.PresenceAuthGrantReqList()->Count();
-    	CleanupStack::Pop(2);   //AuthReqIdentity,presenceGrant
-		CleanupStack::Pop ( 1 );//AuthreqId
-        }
-	 }
-    CleanupStack::PopAndDestroy ( 1 );//pOrigResponse
-	LOGGER ( TXT ( "CAddContactNotificationHandler::ProcessIncomingDataL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CAddContactNotificationHandler::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::RunError Start %d" ), aError );
-
-	LOGGER ( TXT ( "CAddContactNotificationHandler::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CAddContactNotificationHandler::StartListeningL
-// ---------------------------------------------------------------------------
-//
-void CAddContactNotificationHandler::StartListeningL()
-	{
-	LOGGER ( TXT ( "CAddContactNotificationHandler::StartListeningL Start" ) );
-
-	if ( ! ( this->IsActive() ) )
-		{
-		iConnMan.DataHandler().ListenAddNotification ( iStatus );
-		SetActive();
-		}
-	LOGGER ( TXT ( "CAddContactNotificationHandler::StartListeningL End" ) );
-	}
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presentitygroups/caddpresentitygroupmemberrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,259 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Add Presentity Group Member Request to the Network Server.
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "caddpresentitygroupmemberrequest.h"
-#include "cossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-
-#include <ximpobjectfactory.h>
-#include <protocolpresencedatahost.h>
-#include <presenceobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-
-#include <glib/gstrfuncs.h>
-#include <gtypes.h>
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <glib/gprintf.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "ossprotocoladaptutils.h"
-#include <avabilitytext.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::CAddPresentityGroupMemberRequest
-// ---------------------------------------------------------------------------
-//
-CAddPresentityGroupMemberRequest::CAddPresentityGroupMemberRequest( 
-						MOSSProtocolConnectionManager& aConnMan,
-						TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CAddPresentityGroupMemberRequest Start") );
-    CActiveScheduler::Add( this );
-    
-    LOGGER ( TXT("::CAddPresentityGroupMemberRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CAddPresentityGroupMemberRequest::ConstructL()
-    {
-    
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::ConstructL Start-End") );
-    iContactId = NULL;
-    }
-
-
-
-
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CAddPresentityGroupMemberRequest* CAddPresentityGroupMemberRequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::NewLC Start") );
-    
-    CAddPresentityGroupMemberRequest* self = new( ELeave ) 
-    			CAddPresentityGroupMemberRequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-     
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::~CAddPresentityGroupMemberRequest
-// ---------------------------------------------------------------------------
-//
-CAddPresentityGroupMemberRequest::~CAddPresentityGroupMemberRequest()
-    {
-    LOGGER ( TXT("::~CAddPresentityGroupMemberRequest Start") );
-   
-	CActive::Cancel();
-	if(iContactId)
-	    {
-	    delete iContactId;
-	    }
-    LOGGER ( TXT("::~CAddPresentityGroupMemberRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CAddPresentityGroupMemberRequest::DoCancel()
-    {
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::DoCancel Start") );
-   
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CAddPresentityGroupMemberRequest::RunL()
-    {
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::RunL Start") );
-    message_hdr_resp* msg_struct = NULL;
-    char* pResponse = NULL;  
-	User::LeaveIfError( iStatus.Int() );
-   
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-	
-	msg_struct = ( message_hdr_resp* )pResponse ;
-	if( !( msg_struct->response ) )
-	{
-		switch( msg_struct->error_type )
-		{
-	
-		default:  //for all other error codes like ssl related are mapped to general error
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-		       break;       
-		}	
-	}
-	else
-	{
-    //set presence as pending for the added contact
-    MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
-
-    MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-    CleanupDeletePushL(presenceCacheWriter);
-    HBufC* name = HBufC::NewLC( iContactId->Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-    TPtr namePtr( name->Des() );
-    namePtr.Zero();
-    namePtr.Append(iConnMan.ServiceName() ); // prepend service name
-    namePtr.Append(KColon);
-    namePtr.Append(iContactId->Des() );
-    buddyPresInfo->SetIdentityL(namePtr);
-    LOGGER ( TXT ( "CPresenceNotificationHandler::ProcessIncomingDataL  :ContactName:%S " ), iContactId ); 
-   
-    buddyPresInfo->SetAnyFieldL(KExtensionKey,KPendingRequestExtensionValue());
-    CleanupStack::PopAndDestroy(1);//name
-
-    // Writing into Presence Cache
-    TInt cacheerror = presenceCacheWriter->WritePresenceL(buddyPresInfo);
-    User::LeaveIfError ( cacheerror);
-    CleanupStack::PopAndDestroy(2);//presenceCacheWriter,buddyPresInfo
-    
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	}
-	free( pResponse );
-	delete this;
-	LOGGER ( TXT("CAddPresentityGroupMemberRequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CAddPresentityGroupMemberRequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    delete this;
-    
-	LOGGER ( TXT("CAddPresentityGroupMemberRequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CAddPresentityGroupMemberRequest::AddPresentityGroupMemberL
-// ---------------------------------------------------------------------------
-//
-void CAddPresentityGroupMemberRequest::AddPresentityGroupMemberL(
-    const MXIMPIdentity& /*aGroupId*/,
-    const MXIMPIdentity& aMemberId,
-    const TDesC16& aMemberDisplayName)
-    {   
-    LOGGER ( TXT("CAddPresentityGroupMemberRequest::AddPresentityGroupMemberL Start") );
-    if(iContactId)
-        {
-        delete iContactId;
-        iContactId = NULL;
-        }
-    iContactId = aMemberId.Identity().AllocL();
-  	char *smsg = NULL;
-	int totalLen = 0;
-    message_hdr_req msgHdr = {0,};
-    msgHdr.message_type = EAdd_Contact_Request;	
-
-	TInt headerLength = sizeof( message_hdr_req );
-	totalLen += headerLength;
-
-	// adding add contact
-	charFormatData  memberIdentityData  = OssProtocolAdapUtils::ConvertTUint16ToCharLC( aMemberId.Identity() );
-    char* memberIdentity  = memberIdentityData.data;    
-	TInt memberIdLength = memberIdentityData.dataSize;
-    totalLen += memberIdLength;
-    
-    charFormatData displayNameData = OssProtocolAdapUtils::ConvertTUint16ToCharLC( aMemberDisplayName ); 
-    char* displayName = displayNameData.data;   	 	
-	TInt displayNameLength = displayNameData.dataSize;    
-    totalLen += displayNameLength;
-    
-	if ( totalLen > MAX_MSG_SIZE ) 
-		{
-		User::Leave(KErrArgument);		
-		}
-    
-    //after getting size now allocate memory.
-    smsg = ( char* ) User::AllocLC(totalLen);
-    memset ( smsg, '\0', totalLen );
-    
-    memcpy( smsg, &msgHdr, sizeof( message_hdr_req ) ); //header
-    memcpy( smsg + headerLength , memberIdentity , memberIdLength ); //id
-    memcpy( smsg + headerLength + memberIdLength + 1 , displayName , displayNameLength ); //display name
-        
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-    
-    // signal the scheduler
-	SetActive();
-
-	CleanupStack::PopAndDestroy ( 3 );//smsg, memberIdentity, displayName. 
-	
-	LOGGER ( TXT("CAddPresentityGroupMemberRequest::AddPresentityGroupMemberL End") );
-    }
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presentitygroups/ccontactsynchandler.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  handles synchronisation of contacts
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-
-#include <ximpobjectfactory.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <protocolpresencedatahost.h>
-#include <presenceobjectfactory.h>
-
-#include <ximpcontext.h>
-
-#include <devicepresenceinfo.h>
-
-#include <e32des16.h>
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include "msgliterals.h"
-
-#include "ccontactsynchandler.h"
-
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "waittimer.h"
-#include "cossprotocolconnectionmanager.h"
-#include "ossprotocoladaptationuids.h"
-#include "ossprotocoladaptutils.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::CContactSyncHandler
-// ---------------------------------------------------------------------------
-//
-CContactSyncHandler::CContactSyncHandler (
-    MOSSProtocolConnectionManager& aConnMan ) :
-		CActive ( EPriorityNormal ),
-		iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::CContactSyncHandler Start" ) );
-	CActiveScheduler::Add ( this );
-
-	LOGGER ( TXT ( "CContactSyncHandler::CContactSyncHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::NewL
-// ---------------------------------------------------------------------------
-//
-CContactSyncHandler* CContactSyncHandler::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::NewL Start" ) );
-
-	CContactSyncHandler* self = new ( ELeave ) CContactSyncHandler ( aConnMan );
-
-	LOGGER ( TXT ( "CContactSyncHandler::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::~CContactSyncHandler
-// ---------------------------------------------------------------------------
-//
-CContactSyncHandler::~CContactSyncHandler()
-	{
-	LOGGER ( TXT ( "::~CContactSyncHandler Start" ) );
-
-	Cancel();
-
-	LOGGER ( TXT ( "::~CContactSyncHandler End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CContactSyncHandler::DoCancel()
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::DoCancel Start" ) );
-
-	iConnMan.DataHandler().CancelContactsChangeListening();
-
-	LOGGER ( TXT ( "CContactSyncHandler::DoCancel End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::RunL()
-// ---------------------------------------------------------------------------
-//
-void CContactSyncHandler::RunL()
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::RunL Start" ) );
-
-	// something is coming from the xmpp server
-	User::LeaveIfError ( iStatus.Int() );
-
-	ProcessAndSendL();
-	StartListening();
-
-	LOGGER ( TXT ( "CContactSyncHandler::RunL End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::ProcessAndSendL()
-// ---------------------------------------------------------------------------
-	
-void CContactSyncHandler::ProcessAndSendL()
-	{	
-	LOGGER ( TXT ( "CContactSyncHandler::ProcessIncomingDataL Start" ) );
-    char* pResponse = NULL, *pOrigResponse = NULL;  
-    message_hdr_resp* msg_struct = NULL;
-    
-    while( iConnMan.DataHandler().ContactsChangeResponseCount() ) // process all responses
-    	{
-    	pOrigResponse = pResponse = iConnMan.DataHandler().ResponseL (200 );
-		CleanupStack::PushL(pOrigResponse) ;
-	
-	 	msg_struct = ( message_hdr_resp* )pResponse;
-	 	
-		char* contact= pResponse + sizeof ( message_hdr_resp );
-		HBufC16* contactName = OssProtocolAdapUtils::ConvertCharToTUint16LC( contact );
-		switch ( msg_struct->hdr_req.message_type )
-			{
-            case ESubscribe_Remote_Pending:
-                {                
-                break;
-                }
-            case ETrying_To_Add_Contact_Known:
-                {
-                iConnMan.GetContactManager().AddContactToLocalL(*contactName);               
-                iConnMan.GetContactManager().RemoveInvitationFromLocalL(*contactName);
-                break;
-                }
-            case ESubscribe_RP_Accepted:
-                {                
-                break;
-                }
-            case EPublish_RP_Accepted:
-                {                
-                break;
-                }            
-            case ESubscribe_Removed_Or_Rejected:
-                {
-                //removing from the local copy of the contacts
-                iConnMan.GetContactManager().RemoveContactFromLocalL(*contactName);                                     
-                break;                                              	
-                }           
-            case EPublish_Removed_Or_Rejected:
-                {
-                iConnMan.GetContactManager().RemoveInvitationFromLocalL(*contactName);                    
-                break;     
-                }
-            }        
-        CleanupStack::PopAndDestroy ( 2 );//pOrigResponse, contactName 
-    	}    
-	LOGGER ( TXT ( "CContactSyncHandler::ProcessIncomingDataL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CContactSyncHandler::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::RunError Start %d" ), aError );
-
-	LOGGER ( TXT ( "CContactSyncHandler::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CContactSyncHandler::StartListeningL
-// ---------------------------------------------------------------------------
-//
-void CContactSyncHandler::StartListening()
-	{
-	LOGGER ( TXT ( "CContactSyncHandler::StartListeningL Start" ) );
-
-	if ( ! ( this->IsActive() ) )
-		{
-		iConnMan.DataHandler().ListenContactsChange( iStatus );
-		SetActive();
-		}
-	LOGGER ( TXT ( "CContactSyncHandler::StartListeningL End" ) );
-	}
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presentitygroups/cossprotocolpresentitygroups.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,334 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Oss protocol presentity groups implementation
-*
-*/
-
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <ximpprotocolconnectionhost.h>
-#include "cossprotocolpresentitygroups.h"
-#include "csubscribepresentitygroupcontentrequest.h"
-
-#include "cossprotocolconnectionmanager.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocolpluginpanics.h"
-#include "ossprotocolpluginlogger.h"
-#include "caddpresentitygroupmemberrequest.h" // add conatct request
-#include "cremovepresentitygroupmemberrequest.h" // remove contact req.
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolpresentitygroups::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MProtocolPresentityGroups::KInterfaceId )
-		{
-		MProtocolPresentityGroups* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolPresentityGroups, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolpresentitygroups::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::GetInterface() Start" ) );
-
-	if ( aInterfaceId == MProtocolPresentityGroups::KInterfaceId )
-		{
-		const MProtocolPresentityGroups* self = this;
-		return self;
-		}
-
-	if ( aOptions == MXIMPBase::EPanicIfUnknown )
-
-		{
-		User::Panic ( KOSSProtocolPresentityGroups, KErrExtensionNotSupported );
-		}
-
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::GetInterface() End" ) );
-
-	return NULL;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::GetInterfaceId()
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolpresentitygroups::GetInterfaceId() const
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::GetInterfaceId() Start-End" ) );
-	return MProtocolPresentityGroups::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::COSSProtocolpresentitygroups()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolpresentitygroups::COSSProtocolpresentitygroups (
-    MOSSProtocolConnectionManager& aConnMan )
-		: iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "Groups::COSSProtocolpresentitygroups() Start-End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::ConstructL() Start" ) );
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::ConstructL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolpresentitygroups* COSSProtocolpresentitygroups::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::NewL() Start" ) );
-
-	COSSProtocolpresentitygroups* self =
-	    new ( ELeave ) COSSProtocolpresentitygroups ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL( );
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::NewL() End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::~COSSProtocolpresentitygroups()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolpresentitygroups::~COSSProtocolpresentitygroups()
-	{
-	LOGGER ( TXT ( "Groups::~COSSProtocolpresentitygroups() Start" ) );
-
-
-	LOGGER ( TXT ( "Groups::~COSSProtocolpresentitygroups() End" ) );
-	}
-
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoSubscribePresentityGroupListL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoSubscribePresentityGroupListL (
-    TXIMPRequestId /*aReqId */)
-	{
-     // not supported
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoUnsubscribePresentityGroupListL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoUnsubscribePresentityGroupListL (
-    TXIMPRequestId /*aReqId*/ )
-	{
-     //not supported
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoCreatePresentityGroupL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoCreatePresentityGroupL (
-    const MXIMPIdentity& /*aIdentity*/,
-    const TDesC16& /*aDisplayName*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT ( "Groups::DoCreatePresentityGroupL() Start" ) );
-    //not supported
-
-	LOGGER ( TXT ( "Groups::DoCreatePresentityGroupL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoDeletePresentityGroupL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoDeletePresentityGroupL (
-    const MXIMPIdentity& /*Identity*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT ( "Groups::DoDeletePresentityGroupL() Start" ) );
-    //not supported
-
-	LOGGER ( TXT ( "Groups::DoDeletePresentityGroupL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoUpdatePresentityGroupDisplayNameL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoUpdatePresentityGroupDisplayNameL (
-    const MXIMPIdentity& /*aIdentity*/,
-    const TDesC16& /*aDisplayName*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT ( "Groups::DoUpdatePresentityGroupDisplayNameL() Start" ) );
-     
-	LOGGER ( TXT ( "Groups::DoUpdatePresentityGroupDisplayNameL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoSubscribePresentityGroupContentL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoSubscribePresentityGroupContentL (
-    const MXIMPIdentity& aGroupId,
-    TXIMPRequestId aReqId )
-    {
-    
-    LOGGER ( TXT ( "Groups::DoSubscribePresentityGroupContentL() Start" ) );
-    if( ! iConnMan.GetContactManager().IsFetchContactsFirstTime())
-        {
-        iConnMan.GetContactManager().SetFetchContactsFirstTime(ETrue);
-        CreateDataHandlerL();
-        CSubscribePresentityGroupContentRequest* req =
-        CSubscribePresentityGroupContentRequest::NewLC ( iConnMan, aReqId );
-        req->SubscribePresentityGroupContentL ( aGroupId );
-        CleanupStack::Pop ( req );
-        }
-    //keep a locol copy of the contacts and return to ximp fw
-    else
-        {
-        iConnMan.GetContactManager().ReturnContactsListL();
-        iConnMan.HandleToHost().HandleRequestCompleted ( aReqId, KErrNone );
-        }        
-    LOGGER ( TXT ( "Groups::DoSubscribePresentityGroupContentL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoUnsubscribePresentityGroupContentL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoUnsubscribePresentityGroupContentL (
-    const MXIMPIdentity& /*aGroupId*/,
-    TXIMPRequestId aReqId )
-	{
-	LOGGER ( TXT ( "Groups::DoUnsubscribePresentityGroupContentL() Start" ) );
-
-	// just complete the request to PrFw Successfully
-
-	iConnMan.HandleToHost().HandleRequestCompleted ( aReqId, KErrNone );
-
-	LOGGER ( TXT ( "Groups::DoUnsubscribePresentityGroupContentL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoAddPresentityGroupMemberL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoAddPresentityGroupMemberL (
-    const MXIMPIdentity& aGroupId,
-    const MXIMPIdentity& aMemberId,
-    const TDesC16& aMemberDisplayName,
-    TXIMPRequestId aReqId )
-	{
-	LOGGER ( TXT ( "Groups::DoAddPresentityGroupMemberL() Start" ) );
-	
-	CAddPresentityGroupMemberRequest* addreq =
-				 CAddPresentityGroupMemberRequest::NewLC(iConnMan, aReqId );
-				 
-	addreq->AddPresentityGroupMemberL(aGroupId,aMemberId,aMemberDisplayName);
-	
-	CleanupStack::Pop ( addreq );
-	
-	LOGGER ( TXT ( "Groups::DoAddPresentityGroupMemberL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoRemovePresentityGroupMemberL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoRemovePresentityGroupMemberL (
-    const MXIMPIdentity& aGroupId,
-    const MXIMPIdentity& aMemberId,
-    TXIMPRequestId aReqId )
-	{
-	LOGGER ( TXT ( "Groups::DoRemovePresentityGroupMemberL() Start" ) ) ;
-	CRemovePresentityGroupMemberRequest* removereq =
-				 CRemovePresentityGroupMemberRequest::NewLC(iConnMan, aReqId );
-				 
-	removereq->RemovePresentityGroupMemberL(aGroupId,aMemberId);
-	
-	CleanupStack::Pop ( removereq );
-	LOGGER ( TXT ( "Groups::DoRemovePresentityGroupMemberL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::DoUpdatePresentityGroupMemberDisplayNameL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::DoUpdatePresentityGroupMemberDisplayNameL (
-    const MXIMPIdentity& /*aGroupId*/,
-    const MXIMPIdentity& /*aMemberId*/,
-    const TDesC16& /*aMemberDisplayName*/,
-    TXIMPRequestId /*aReqId*/ )
-	{
-	LOGGER ( TXT ( "Groups::DoUpdatePresentityGroupMemberDisplayNameL() Start" ) );
-	LOGGER ( TXT ( "Groups::DoUpdatePresentityGroupMemberDisplayNameL() End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// COSSProtocolpresentitygroups::CreateDataHandler()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolpresentitygroups::CreateDataHandlerL()
-	{
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::CreateDataHandler() Start" ) );
-
-	iConnMan.ManufactureDataHandlerL();
-
-	LOGGER ( TXT ( "COSSProtocolpresentitygroups::CreateDataHandler() End" ) );
-	}
-
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/presentitygroups/cremovepresentitygroupmemberrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,238 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Remove presentity group member request to the network server
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "cremovepresentitygroupmemberrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "cossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-
-#include <ximpobjectfactory.h>
-#include <protocolpresencedatahost.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <ximpdatasubscriptionstate.h>
-
-#include <glib/gstrfuncs.h>
-#include <gtypes.h>
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <glib/gprintf.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "ossprotocoladaptutils.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::CRemovePresentityGroupMemberRequest
-// ---------------------------------------------------------------------------
-//
-CRemovePresentityGroupMemberRequest::CRemovePresentityGroupMemberRequest( 
-					MOSSProtocolConnectionManager& aConnMan,
-					TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CRemovePresentityGroupMemberRequest Start") );
-    CActiveScheduler::Add( this );
-    
-    LOGGER ( TXT("::CRemovePresentityGroupMemberRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CRemovePresentityGroupMemberRequest::ConstructL()
-    {
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::ConstructL Start") );
-    iUserId = NULL;
-	LOGGER ( TXT("CRemovePresentityGroupMemberRequest::ConstructL End") );
-    }
-
-
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CRemovePresentityGroupMemberRequest* CRemovePresentityGroupMemberRequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::NewLC Start") );
-    
-    CRemovePresentityGroupMemberRequest* self = new( ELeave ) 
-    			CRemovePresentityGroupMemberRequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-  
-       
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::~CRemovePresentityGroupMemberRequest
-// ---------------------------------------------------------------------------
-//
-CRemovePresentityGroupMemberRequest::~CRemovePresentityGroupMemberRequest()
-    {
-    LOGGER ( TXT("::~CRemovePresentityGroupMemberRequest Start") );
-   
-	CActive::Cancel();
-    delete iUserId;
-    LOGGER ( TXT("::~CRemovePresentityGroupMemberRequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CRemovePresentityGroupMemberRequest::DoCancel()
-    {
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::DoCancel Start") );
-  
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CRemovePresentityGroupMemberRequest::RunL()
-    {
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::RunL Start") );
-    message_hdr_resp* msg_struct = NULL;
-    char* pResponse = NULL;  
-	User::LeaveIfError( iStatus.Int() );
-   
-	pResponse = iConnMan.DataHandler().ResponseL ( iSendId );
-	
-	msg_struct = ( message_hdr_resp* )pResponse ;
-	if( !( msg_struct->response ))
-	{
-		switch( msg_struct->error_type )
-		{
-	
-		default:  //for all other error codes like ssl related are mapped to general error
-			   iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KXIMPErrServiceGeneralError );
-		       break;       
-		}	
-	}
-	else
-	{
-         if( iUserId )
-             {
-             HBufC* sxpId = HBufC::NewLC( iConnMan.ServiceName().Length() + iUserId->Length() +1 );
-             TPtr sxpIdPtr( sxpId->Des() );
-        
-             sxpIdPtr.Zero();
-             sxpIdPtr.Append( iConnMan.ServiceName() );
-             sxpIdPtr.Append(KColon);
-             sxpIdPtr.Append( *iUserId );
-             MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-             TInt cacheerror = presenceCacheWriter->DeletePresenceL( sxpIdPtr );
-             User::LeaveIfError ( cacheerror);
-             CleanupStack::PopAndDestroy(); // sxpId
-             delete presenceCacheWriter;
-             presenceCacheWriter = NULL;
-             delete iUserId;
-             iUserId = NULL;
-             }
-         iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-        }
-
-	free( pResponse );
-	delete this;
-	LOGGER ( TXT("CRemovePresentityGroupMemberRequest::RunL End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CRemovePresentityGroupMemberRequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::RunError Start") );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    
-    delete this;
-	LOGGER ( TXT("CRemovePresentityGroupMemberRequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CRemovePresentityGroupMemberRequest::RemovePresentityGroupMemberL
-// ---------------------------------------------------------------------------
-//
-void CRemovePresentityGroupMemberRequest::RemovePresentityGroupMemberL(
-    const MXIMPIdentity& /*aGroupId*/,
-    const MXIMPIdentity& aMemberId)
-    {   
-   
-    LOGGER ( TXT("CRemovePresentityGroupMemberRequest::RemovePresentityGroupMemberL Start") );
-
-	int userLen=0;
-	int totalLen = 0;
-	iUserId = aMemberId.Identity().AllocL();
-
-	message_hdr_req msgHdr = {0,};	
-    msgHdr.message_type = EDelete_Contact_Request;	
-    
-    TInt headerLength = sizeof( message_hdr_req );
-	totalLen += headerLength;
-	
-	// adding add contact
-	charFormatData tmpmsgData = OssProtocolAdapUtils::ConvertTUint16ToCharLC ( aMemberId.Identity() );
-    char *tmpmsg = tmpmsgData.data;
-    userLen = tmpmsgData.dataSize;
-	totalLen += userLen;
-	 
-	User::LeaveIfError ( totalLen > MAX_MSG_SIZE );
-
-	//now allocate memory.
-	char* smsg = ( char* ) User::AllocLC( totalLen );
-	memcpy( smsg, &msgHdr, headerLength );
-	memcpy ( smsg + headerLength, tmpmsg, userLen );
-  
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen );
-
-	// signal the scheduler
-	SetActive();
-
-	CleanupStack::PopAndDestroy ( 2 );//smsg, tmpmsg.
-  	
-	LOGGER ( TXT("::RemovePresentityGroupMemberL End") );
-    }
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/presentitygroups/csubscribepresentitygroupcontentrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/*
-* Copyright (c) 2007-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:  Subscribe Presentity Group content request to the Network Server.
-*
-*/
-
-
-#include <ximpprotocolconnectionhost.h>
-#include "csubscribepresentitygroupcontentrequest.h"
-#include "cossprotocolconnectionmanager.h"
-#include <ximpobjectfactory.h>
-#include <protocolpresencedatahost.h>
-#include <presenceobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolpresentitygroupsdatahost.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupmemberinfo.h>
-#include <ximpidentity.h>
-#include <ximpdatasubscriptionstate.h>
-#include "ossprotocolpluginlogger.h"
-
-#include <glib/gstrfuncs.h>
-#include <gtypes.h>
-#include <stdlib.h>
-#include "stringutils.h"
-#include <string.h>
-#include <sys/types.h>
-#include <stdio.h>
-#include <glib/gprintf.h>
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include "ossprotocoladaptutils.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::CSubscribePresentityGroupContentRequest()
-// ---------------------------------------------------------------------------
-//
-CSubscribePresentityGroupContentRequest::CSubscribePresentityGroupContentRequest (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId ) :
-		CActive ( EPriorityNormal ),
-		iRequestId ( aRequestId ),
-		iConnMan ( aConnMan ),
-		iListcount ( 0 )
-	{
-	LOGGER ( TXT ( "::CSubscribePresentityGroupContentRequest Start" ) );
-	CActiveScheduler::Add ( this );
-	LOGGER ( TXT ( "::CSubscribePresentityGroupContentRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::ConstructL()
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::ConstructL Start-End" ) );
-	iGroupName = NULL;
-	
-	}
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::NewL
-// ---------------------------------------------------------------------------
-//
-CSubscribePresentityGroupContentRequest* CSubscribePresentityGroupContentRequest::NewL (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::NewL Start" ) );
-
-	CSubscribePresentityGroupContentRequest* self = new ( ELeave )
-	CSubscribePresentityGroupContentRequest ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::NewL End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::NewLC()
-// ---------------------------------------------------------------------------
-//
-CSubscribePresentityGroupContentRequest* CSubscribePresentityGroupContentRequest::NewLC (
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::NewLC Start" ) );
-
-	CSubscribePresentityGroupContentRequest* self =
-	    CSubscribePresentityGroupContentRequest::NewL ( aConnMan, aRequestId );
-	CleanupStack::PushL ( self );
-
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::NewLC End" ) );
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::~CSubscribePresentityGroupContentRequest()
-// ---------------------------------------------------------------------------
-//
-CSubscribePresentityGroupContentRequest::~CSubscribePresentityGroupContentRequest()
-	{
-	LOGGER ( TXT ( "::~CSubscribePresentityGroupContentRequest Start" ) );
-	delete iGroupName;
-	iGroupName = NULL;
-    Cancel();
-    //iContacts.ResetAndDestroy();
-	LOGGER ( TXT ( "::~CSubscribePresentityGroupContentRequest End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::DoCancel()
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::DoCancel Start" ) );
-	iConnMan.DataHandler().CancelListening();
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::DoCancel End" ) );
-	}
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::RunL()
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::RunL Start" ) );
-	User::LeaveIfError( iStatus.Int() );
-    TRAPD( error, ProcessIncomingDataL( ) );
-    if ( error != KErrNone )
-		{
-		Cancel();
-		}
-
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::RunL End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CSubscribePresentityGroupContentRequest::RunError ( TInt  aError )
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::RunError Start" ) );
-
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, aError );
-
-	delete this;
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::RunError End" ) );
-	return KErrNone;
-	}
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::SubscribePresentityGroupContentL
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::SubscribePresentityGroupContentL (
-    const MXIMPIdentity& aIdentity )
-    {
-    LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::SubscribePresentityGroupContentL Start" ) );
-    if(iGroupName)
-        {
-        delete iGroupName;
-        iGroupName = NULL;
-        }
-    iGroupName = aIdentity.Identity().AllocL();
-    iConnMan.SetGroupIDL( *iGroupName ); // this groupname is used by contactsync class for synchronisation
-
-    if(iConnMan.DataHandler().IsFetchContactsCompleted())
-        {
-        ProcessIncomingDataL( );
-        }
-    else
-        {
-        if ( ! ( this->IsActive() ) )
-            {
-            iConnMan.DataHandler().ListenIncomingData ( iStatus );
-            SetActive();
-            }
-        }
-
-
-    LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::SubscribePresentityGroupContentL End" ) );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::ProcessIncomingDataL()
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::ProcessIncomingDataL()
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::ProcessIncomingDataL Start" ) );
-
-	PopulateDataL();
-
-	MXIMPObjectFactory& prfwObjFact = iConnMan.HandleToHost().ObjectFactory();
-
-	MPresenceObjectFactory& prObjFact =
-	iConnMan.HandleToHost().ProtocolPresenceDataHost().PresenceObjectFactory();
-
-	MXIMPIdentity* contactIdentity = NULL;
-	MPresentityGroupMemberInfo* groupMemberInfo = NULL;
-	MXIMPObjectCollection* listOfContacts = prfwObjFact.NewObjectCollectionLC();
-	
-	//get the ref to contacts which was already stored in PopulateDataL
-	RPointerArray<HBufC>& contacts =  iConnMan.GetContactManager().GetContactsListL();	
-
-	for(TInt i = 0;i<contacts.Count();i++)
-		{
-		contactIdentity = prfwObjFact.NewIdentityLC();
-		groupMemberInfo = prObjFact.NewPresentityGroupMemberInfoLC();
-		contactIdentity->SetIdentityL ( *(contacts[ i ] ));
-		groupMemberInfo->SetGroupMemberIdL ( contactIdentity );
-		groupMemberInfo->SetGroupMemberDisplayNameL ( *(contacts[ i ] ) );
-		listOfContacts->AddObjectL ( groupMemberInfo );	
-		CleanupStack::Pop ( 2 );//groupMemberInfo, contactIdentity		
-
-		}
-
-	MXIMPIdentity* groupIdentity = prfwObjFact.NewIdentityLC();
-
-	groupIdentity->SetIdentityL ( *iGroupName );
-
-	iConnMan.HandleToHost().ProtocolPresenceDataHost().GroupsDataHost().HandlePresentityGroupContentL (
-	groupIdentity, listOfContacts );
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	CleanupStack::Pop ( 2 );//groupIdentity,listOfContacts 
-
-	delete this;
-
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::ProcessIncomingDataL End" ) );
-
-	}
-
-// ---------------------------------------------------------------------------
-// CSubscribePresentityGroupContentRequest::PopulateDataL
-// ---------------------------------------------------------------------------
-//
-void CSubscribePresentityGroupContentRequest::PopulateDataL()
-	{
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::PopulateDataL Start" ) );
-	
-	int len = MAX_SIZE_DATA;    
-    char* pResponse = NULL, *pOrigResponse = NULL;  
-    
- 	TInt datacount = iConnMan.DataHandler().IncomingDataCount();
- 	//to keep the local copy of contacts in adaptation till logout
- 	RPointerArray<HBufC>& contacts = iConnMan.GetContactManager().GetContactsListL(); 
- 	
- 	while( datacount )
-		{
-		// get the incoming response from the server with transaction id equals zero
-		pOrigResponse = pResponse = iConnMan.DataHandler().ResponseL ( 0 );
-		CleanupStack::PushL(pOrigResponse) ;
-		if( pResponse )
-			{
-			pResponse += sizeof ( message_hdr_resp );
-		
-			while(1)
-				{
-				len = strlen(pResponse) + 1;
-				if (1 == len)
-					{
-					break;
-					}
-				char* contact = pResponse;	
-				pResponse += len;
-			
-				HBufC16 *contactName = OssProtocolAdapUtils::ConvertCharToTUint16LC( contact );				
-				contacts.AppendL(contactName);
-				LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::PopulateDataL:ContactName:%S " ), contactName );
-				CleanupStack::Pop ( contactName );				
-				}	
-			}
-
-		CleanupStack::PopAndDestroy(pOrigResponse) ;//pOrigResponse
-		
-		datacount = iConnMan.DataHandler().IncomingDataCount();
-		}
-
-	LOGGER ( TXT ( "CSubscribePresentityGroupContentRequest::PopulateDataL End" ) );
-	}
-
-
-
-// End of file
--- a/imservices/ossprotocoladaptation/src/processlauncher/processlaunher.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  implementation of launching of process
-*
-*/
-
-
-// INCLUDE FILES
-#include "processlaunher.h"
-
-#include <e32std.h>
-#include "ossprotocolpluginlogger.h"
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CProcessLauncher::CProcessLauncher
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CProcessLauncher::CProcessLauncher() :
-		CActive ( EPriorityStandard )
-	{
-	CActiveScheduler::Add ( this );
-	}
-
-// -----------------------------------------------------------------------------
-// CProcessLauncher::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CProcessLauncher::ConstructL ( const TDesC16& aprocessname )
-	{
-	LOGGER ( TXT ( "CProcessLauncher::ConstructL()" ) );
-	iProcessName = aprocessname.AllocL();
-	}
-
-// -----------------------------------------------------------------------------
-// CProcessLauncher::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CProcessLauncher* CProcessLauncher::NewL ( const TDesC16& aprocessname )
-	{
-	LOGGER ( TXT ( "CProcessLauncher::NewL()" ) );
-
-	CProcessLauncher* self =
-	    new ( ELeave ) CProcessLauncher();
-
-	CleanupStack::PushL ( self );
-	self->ConstructL ( aprocessname );
-	CleanupStack::Pop();
-
-	return self;
-	}
-
-// Destructor
-CProcessLauncher::~CProcessLauncher()
-	{
-	Cancel();
-	delete iProcessName;
-	}
-
-
-// ---------------------------------------------------------
-// CProcessLauncher::DoCancel
-//
-// ---------------------------------------------------------
-//
-void CProcessLauncher::DoCancel()
-	{
-	iLauncher.LogonCancel ( iStatus );
-
-	}
-
-// ---------------------------------------------------------
-// CProcessLauncher::RunL
-//
-// ---------------------------------------------------------
-//
-void CProcessLauncher::RunL()
-	{
-	TInt answer ( iStatus.Int() );
-
-	if ( answer != KErrNone )
-		{
-		LOGGER ( TXT ( "CProcessLauncher::dd terminated with the reason %d" ), answer );
-
-		User::LeaveIfError ( answer );
-		}
-
-	Cancel();
-	}
-
-// ---------------------------------------------------------
-// CProcessLauncher::RunError
-//
-// ---------------------------------------------------------
-//
-TInt CProcessLauncher::RunError ( TInt aError )
-	{
-	if ( IsActive() )
-		{
-		Cancel();
-		}
-
-	return aError;
-	}
-// ---------------------------------------------------------
-// CProcessLauncher::LaunchProcessL
-// ---------------------------------------------------------
-//
-void CProcessLauncher::LaunchProcessL()
-	{
-	LOGGER ( TXT ( "CProcessLauncher::LaunchProcessL() start" ) );
-	TInt result = KErrNotFound;
-
-	result = iLauncher.Create ( *iProcessName, KNullDesC );
-
-	if ( result != KErrNone )
-		{
-		LOGGER ( TXT ( "CProcessLauncher::launching isoserver is failed with the reason %d" ), result );
-		User::Leave ( result );
-		}
-
-	// When the launcher exits we'll get the exit code in iStatus
-	iStatus = KRequestPending;
-
-	SetActive();
-
-	iLauncher.Logon ( iStatus );
-
-	iLauncher.Resume();
-
-	//iLauncher.Close();
-	LOGGER ( TXT ( "CProcessLauncher::LaunchProcessL() End " ) );
-	}
-	
-// End of file
--- a/imservices/ossprotocoladaptation/src/search/cossprotocolsearch.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +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:  Oss Protocol search implementation
-*
-*/
-
-#include <ximpbase.h>
-#include <ximpidentity.h>
-#include <ximpprotocolconnectionhost.h>
-#include <searchelement.h>
-
-#include "cossprotocolsearch.h"
-#include "cossprotocolconnectionmanager.h"
-#include "csearchrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-#include "ossprotocolpluginpanics.h"
-
-#include "csearchgetsearchkeys.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::GetInterface()
-// ---------------------------------------------------------------------------
-//
-TAny* COSSProtocolSearch::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions )
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::GetInterface() Start" ) );
-	 
-	MProtocolSearch* self= NULL;
-	if ( aInterfaceId == MProtocolSearch::KInterfaceId )
-		{
-	     self = this ;
-		}
-	else
-		{
-		if (aOptions == MXIMPBase::EPanicIfUnknown )
-
-			{
-			User::Panic ( _L("serach"), KErrExtensionNotSupported );
-			}
-		}
-
-	
-
-	LOGGER ( TXT ( "COSSProtocolSearch::GetInterface() End" ) );
-
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::GetInterface()
-// ---------------------------------------------------------------------------
-//
-const TAny* COSSProtocolSearch::GetInterface ( TInt32 aInterfaceId,
-        TIfGetOps aOptions ) const
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::GetInterface() Start" ) );
-	 
-	const MProtocolSearch* self= NULL;
-	if ( aInterfaceId == MProtocolSearch::KInterfaceId )
-		{
-	     self = this ;
-		}
-	else
-		{
-		if (aOptions == MXIMPBase::EPanicIfUnknown )
-
-			{
-			User::Panic ( _L("serach"), KErrExtensionNotSupported );
-			}
-		}
-
-	LOGGER ( TXT ( "COSSProtocolSearch::GetInterface() End" ) );
-
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::GetInterfaceId()
-// ---------------------------------------------------------------------------
-//
-TInt32 COSSProtocolSearch::GetInterfaceId() const
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::GetInterfaceId() Start-End" ) );
-	return MProtocolSearch::KInterfaceId;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::COSSProtocolSearch()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearch::COSSProtocolSearch (
-    MOSSProtocolConnectionManager& aConnMan )
-		: iConnMan ( aConnMan )
-	{
-	LOGGER ( TXT ( "Groups::COSSProtocolSearch() Start-End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolSearch::ConstructL()
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::ConstructL() Start" ) );
-	LOGGER ( TXT ( "COSSProtocolSearch::ConstructL() End" ) );
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::NewL()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearch* COSSProtocolSearch::NewL (
-    MOSSProtocolConnectionManager& aConnMan )
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::NewL() Start" ) );
-
-	COSSProtocolSearch* self =
-	    new ( ELeave ) COSSProtocolSearch ( aConnMan );
-	CleanupStack::PushL ( self );
-	self->ConstructL( );
-	CleanupStack::Pop ( self );
-
-	LOGGER ( TXT ( "COSSProtocolSearch::NewL() End" ) );
-	return self;
-	}
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::~COSSProtocolSearch()
-// ---------------------------------------------------------------------------
-//
-COSSProtocolSearch::~COSSProtocolSearch()
-	{
-	LOGGER ( TXT ( "COSSProtocolSearch::~COSSProtocolSearch() Start" ) );
-
-	LOGGER ( TXT ( "COSSProtocolSearch::~COSSProtocolSearch() End" ) );
-	}
-
-
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::DoSearchL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolSearch::DoSearchL( const  MXIMPIdentity& aSearchId,
-    							    const  RPointerArray< MSearchElement >& aObjs,
-                                    TInt   aSearchLimit,
-                                    TXIMPRequestId  aReqId )
-   {
-   LOGGER ( TXT ( "COSSProtocolSearch::DoSearchL() Start" ) );
-   
-   CSearchrequest* req = CSearchrequest::NewLC ( iConnMan, aReqId );
-   req->SearchL(aSearchId,aObjs,aSearchLimit); 
-   
-   CleanupStack::Pop ( req ); // req is deleted by itself once it completes the operation
-
-   LOGGER ( TXT ( "COSSProtocolSearch::DoSearchL() End" ) );
-   }
-                               		   
-
-// ---------------------------------------------------------------------------
-// COSSProtocolSearch::DoSearchL()
-// ---------------------------------------------------------------------------
-//
-void COSSProtocolSearch::DoGetSearchKeysL( TXIMPRequestId aReqId )
-   {
-   LOGGER ( TXT ( "COSSProtocolSearch::DoSearchL() Start" ) );
-   //Shoudl be changed to NewLC
-   CSearchGetSearchKeys* req = CSearchGetSearchKeys::NewL ( 
-   								iConnMan, aReqId );
-  // req->SearchL(aSearchId,aObjs,aSearchLimit); 
-  
-   req->GetSearchKeysL();
-   
-   //CleanupStack::Pop ( req ); // req is deleted by itself once it completes the operation
-
-   LOGGER ( TXT ( "COSSProtocolSearch::DoSearchL() End" ) );
-   }
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/search/csearchgetsearchkeys.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,228 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles dynamic search label-key pair storing.
-*
-*/
-
-//For malloc
-#include <stdlib.h>
-//For protocol connection host
-#include <ximpprotocolconnectionhost.h>
-//For Connection manager
-#include "cossprotocolconnectionmanager.h"
-#include "csearchgetsearchkeys.h"
-#include "msg_enums.h"
-
-#include "ossprotocolpluginlogger.h"
-//For Converting C style string to S60 style HBufC
-#include "ossprotocoladaptutils.h"
-//For open c string functions
-#include <string.h>
-
-#include <searchkeyinfo.h>
-
-#include <searchobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <protocolsearchdatahost.h>
-#include <protocolsearchfeaturedatahost.h>
-#include <ximpobjectfactory.h>
-
-/*!	/brief Documented in header file
-*/
-CSearchGetSearchKeys* CSearchGetSearchKeys::NewL( 
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-	{
-	LOGGER ( TXT("::CSearchGetSearchKeys NewL Start") );
-	
-	CSearchGetSearchKeys* self = new ( ELeave ) CSearchGetSearchKeys( 
-				aConnMan, aRequestId );
-	
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	
-	LOGGER ( TXT("::CSearchGetSearchKeys NewL End") );
-	return self;		
-	}
-	
-
-/*!	/brief Documented in header file
-*/
-CSearchGetSearchKeys::CSearchGetSearchKeys( 
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )	: 	CActive ( EPriorityNormal ),
-		iRequestId ( aRequestId ),
-		iConnMan ( aConnMan )
-	{
-	
-	LOGGER ( TXT("::CSearchGetSearchKeys Start") );
-	
-    CActiveScheduler::Add( this );
-    
-    LOGGER ( TXT("::CSearchGetSearchKeys End") );
-    
-	}
-
-/*!	/brief Documented in header file
-*/	
-CSearchGetSearchKeys::~CSearchGetSearchKeys()
-	{
-		
-	}
-
-/*!	/brief Documented in header file
-*/	
-void CSearchGetSearchKeys::DoCancel()
-	{
-		
-	}
-
-/*!	/brief Documented in header file
-*/	
-void CSearchGetSearchKeys::RunL()
-	{
-	LOGGER( TXT( "CSearchGetSearchKeys::RunL start" ) );
-	
-	User::LeaveIfError( iStatus.Int() );
-	message_hdr_resp* msg_resp = NULL;
-	
-	char* response = NULL;
-	CSearchKeyStore& keyStore = iConnMan.GetSearchKeyStore();
-	
-	response = iConnMan.DataHandler().ResponseL( iSendId );
-	
-	msg_resp = ( message_hdr_resp* ) response;
-	
-	if ( !msg_resp->response ) 
-		{
-		if ( msg_resp->error_type )
-			{
-			//Complete the request with an error				
-			iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, 
-							KErrNotSupported );
-			}
-		}
-	else 
-		{
-		
-		{
-		//This part reads all the possible labels from cen rep and tries to 
-		//match the search labels got to those.. If match found search labels 
-		//are assigned appropriate Enum values
-		TInt index = sizeof( message_hdr_resp );
-		char* keyStr = NULL;
-		RPointerArray<TDesC> keyList;
-		TInt len = 0;
-		
-		while( !( *( response + index ) == '\0'
-					 && *( response + index + 1 ) == '\0' ) )
-			{
-			len = strlen( response + index ) + 1;
-			keyStr = ( char* ) User::AllocLC( len );
-			strcpy ( keyStr, response + index );
-			index += len;
-			
-			HBufC* key = OssProtocolAdapUtils::ConvertCharToTUint16LC( keyStr );
-			keyList.Append( key );
-			CleanupStack::Pop(); //key
-			CleanupStack::PopAndDestroy(); //keyStr
-			}
-		
-		keyStore.MapLabelsToEnumL( keyList );
-		}
-		//Send all the labels to XIMP/UI
-		MXIMPObjectFactory& objFact = iConnMan.HandleToHost().ObjectFactory();
-		MSearchObjectFactory& searchObjFact = iConnMan.GetSearchHost().SearchObjectFactory();
-		MXIMPObjectCollection* labelArray = objFact.NewObjectCollectionLC();
-		
-		RPointerArray<TSearchKey> lablEnum = keyStore.GetSupportedEnums();
-		
-		for ( TInt i = 0; i < lablEnum.Count(); i++ )
-			{
-			MSearchKeyInfo* srchKey = searchObjFact.NewSearchKeyInfoLC();
-			srchKey->SetType( EKey );
-			srchKey->SetKey((TSearchKey) *( lablEnum[i] ) );
-			labelArray->AddObjectL( srchKey );//ownership transfered
-			CleanupStack::Pop(); //srchKey
-			}
-		
-		RPointerArray<TDesC> label = keyStore.GetNotSupportedLabels();
-		
-		for ( TInt i = 0; i < label.Count(); i++ )
-			{
-			MSearchKeyInfo* srchLabel = searchObjFact.NewSearchKeyInfoLC();
-			srchLabel->SetType( ELabel );
-			srchLabel->SetLabelL( *( label[i] ) );
-			labelArray->AddObjectL( srchLabel );//ownership transfered
-			CleanupStack::Pop(); //srchLabel
-			}
-
-		
-		iConnMan.GetSearchHost().SearchFeatureDataAccess().HandleSearchKeysL ( 
-							 labelArray );//ownership transfered
-		iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-		
-		CleanupStack::Pop( ); //labelArray
-		}
-	
-	free( response );
-	
-	LOGGER( TXT( "CSearchGetSearchKeys::RunL end" ) );
-	delete this;
-	
-	}
-
-/*!	/brief Documented in header file
-*/	
-TInt CSearchGetSearchKeys::RunError( TInt aError )
-	{
-	LOGGER( TXT( "CSearchGetSearchKeys::RunError start" ) );	
-	
-	iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-	
-	LOGGER( TXT( "CSearchGetSearchKeys::RunError end" ) );
-	
-	return 0;
-	}
-
-/*!	/brief Documented in header file
-*/	
-void CSearchGetSearchKeys::ConstructL()
-	{
-			
-	}
-
-/*!	/brief Documented in header file
-*/	
-void CSearchGetSearchKeys::GetSearchKeysL()
-	{
-	LOGGER ( TXT("::CSearchGetSearchKeys GetSearchKeysL Start") );
-	
-	TInt len = sizeof ( message_hdr_req );
-	message_hdr_req* msgHdr = ( message_hdr_req* ) User::AllocLC( len );
-	
-	msgHdr->message_type = ESearch_Get_Keys;
-	
-	iSendId = iConnMan.DataHandler().SendDataL( iStatus, ( char* )msgHdr, 
-					len );
-	
-	SetActive();
-	
-	CleanupStack::PopAndDestroy ( 1 );//msgHdr	
-	
-	LOGGER ( TXT("::CSearchGetSearchKeys GetSearchKeysL End") );
-	}
-	
-// End of file
--- a/imservices/ossprotocoladaptation/src/search/csearchkeystore.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,227 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  This class handles dynamic search label-key pair storing.
-*
-*/
-
-
-#include "csearchkeystore.h"
-#include "ossprotocolpluginlogger.h"
-
-/*!	/file
-*	/brief Implimentation of interfaces defined in csearchkeystore.h
-*/
-
-/*!	/brief documented in the header file
-*/
-CSearchKeyStore* CSearchKeyStore::NewL() 
-	{
-	LOGGER ( TXT("::CSearchKeyStore NewL Start") );		
-	
-	CSearchKeyStore* self = new ( ELeave ) CSearchKeyStore;
-	
-	CleanupStack::PushL( self );
-	self->ConstructL();
-	CleanupStack::Pop( self );
-	
-	
-	LOGGER ( TXT("::CSearchKeyStore NewL End") );		
-	return self;
-	
-	}
-
-/*!	/brief documented in the header file
-*/	
-CSearchKeyStore::CSearchKeyStore()	
-	{
-		
-	}	
-
-/*!	/brief documented in the header file
-*/
-CSearchKeyStore::~CSearchKeyStore()
-	{
-	LOGGER ( TXT("::CSearchKeyStore ~CSearchKeyStore Start") );	
-		
-	//Close the hash map
-	//<todo> any leaks here?
-	iEnumLabels.Close();
-	
-	//<todo> any leaks here?
-	//Close the hash map
-	iSupportedLabels.Close();
-
-	
-	//reset and destroy
-	iNotSupportedLabels.ResetAndDestroy();
-	
-	delete iLabelKeyHashRep;
-	
-	LOGGER ( TXT("::CSearchKeyStore ~CSearchKeyStore End") );		
-	}
-	
-/*!	/brief documented in the header file
-*/
-void CSearchKeyStore::MapLabelsToEnumL( RPointerArray<TDesC>& aLabels )
-	{
-	LOGGER ( TXT("::CSearchKeyStore MapLabelsToEnum Start") );	
-	
-	RArray<TBool> enumBool;
-	//TO avoid excessive computation, we mark enumBool[i] if 
-	//a label is already attched to that enum
-	for ( TInt i = 0; i < iEnumLabels.Count(); i++ )
-		{
-		//unmark all of it
-		enumBool.Append( 0 );
-		}
-		
-	for ( TInt i = 0; i < aLabels.Count(); i++ )
-		{
-		//Boolean to say if the label we are matching is supported
-		TBool supported = EFalse;
-		
-		//Iterate thru the hash table of cenrep labels
-		THashMapIter<TInt, TPtr16> iter( iEnumLabels );
-		//Initialize to 0
-		TInt j = 0;
-		//Loop till thr is a key
-		while( NULL != iter.NextKey() )
-			{
-			//Check if a label has been assigned to the enum
-			if ( enumBool[j] )
-				{
-				j++;
-				continue;
-				}
-			//If not
-			//Get the possible labels for this enum from cen rep
-			TPtr16 bufPtr = *(iter.CurrentValue());
-			
-			TBuf<1024> buf;
-			//LC is not leaving/cleanup
-			//It converts the aLabels to lower case 
-			buf.CopyLC( *( aLabels[i] ) );
-			
-			//Match if the current label from isoserver is in the enum labels
-			TInt match = bufPtr.Find( buf );
-			
-			if ( KErrNotFound != match )
-				{
-				//If a match is found, mark the corresponding enum 
-				enumBool[j]	= 1;			
-				TSearchKey enumvalue = ( TSearchKey )*( iter.CurrentKey() );
-				//Add to supported labels hash key and label
-				iSupportedLabels.InsertL( enumvalue, 
-							aLabels[i]->AllocL()->Des() );
-				//Set the flag as supported, so that it is not added in
-				//not supported label
-				supported = ETrue;
-				//Break from the loop
-				//Get next label try to match to the cen rep labels(supported enums)
-				break;
-				}			
-			//update the enum index tracker		
-			j++;
-			}
-		//If the label has not matched to any of the supported enum labels
-		//add that to not supported list
-		if ( EFalse == supported ) 
-			{
-			//Add to not supported labels				
-			iNotSupportedLabels.Append( ( aLabels[i]->AllocL() ) );		
-			}
-			
-		
-		}
-		
-	LOGGER ( TXT("::CSearchKeyStore MapLabelsToEnum End") );		
-	}
-
-/*!	/brief documented in the header file
-*/	
-HBufC* CSearchKeyStore::GetLabelFromEnumL( TSearchKey aEnum )
-	{
-	LOGGER ( TXT("::CSearchKeyStore GetLabelFromEnum Start") );	
-	
-	TPtr* buf = NULL;
-	//Find if the labels corresponding to enum is there
-	//and return the alloced label.
-	//Ownership is transfered to the callee
-	buf = iSupportedLabels.Find( aEnum );
-	if ( buf )	
-		{
-		return buf->AllocL();
-		}
-		
-	LOGGER ( TXT("::CSearchKeyStore GetLabelFromEnum End") );
-		
-	return NULL;
-	
-	}
-
-/*!	/brief documented in the header file
-*/	
-void CSearchKeyStore::ConstructL()	
-	{
-	LOGGER ( TXT("::CSearchKeyStore ConstructL Start") );
-	
-	iLabelKeyHashRep = CRepository::NewL( KLabelKeyStoreHash );
-	TBuf<1024> buf;
-	
-	//Read all the labels supported for localization from cen rep
-	//and have a map for the enum and search field
-	for ( TInt i = 0; i < NO_OF_KEYS_SUPPORTED; i++ ) 
-		{
-		iLabelKeyHashRep->Get( ( TSearchKey )( i ), buf );
-		iEnumLabels.InsertL( ( TSearchKey )( EUserFirstName + i ), buf.AllocL()->Des() );
-		}
-		
-	LOGGER ( TXT("::CSearchKeyStore ConstructL End") );	
-	}
-/*!	/brief Get the supported enums
-*	/return An array of pointers to the supported enums
-*/
-RPointerArray<TSearchKey> CSearchKeyStore::GetSupportedEnums()
-	{
-	LOGGER ( TXT("::CSearchKeyStore GetSupportedEnums Start") );
-	
-	RPointerArray<TSearchKey> supportedEnums;
-	THashMapIter<TInt, TPtr16> iter( iSupportedLabels );
-	
-	while ( NULL != iter.NextKey() )
-		{
-		
-		supportedEnums.Append( ( TSearchKey* )iter.CurrentKey() );
-		
-		}
-		
-	LOGGER ( TXT("::CSearchKeyStore GetSupportedEnums End") );
-	
-	return supportedEnums;
-		
-	}
-
-/*!	/brief This function returns a handle to the array of not
-*	supported label strings. Not supported here means that
-*	there are no logical strings in UI for these labels
-*	/return const handle to not supported strings
-*/
-
-const RPointerArray<TDesC> CSearchKeyStore::GetNotSupportedLabels()
-	{
-	LOGGER ( TXT("::CSearchKeyStore GetNotSupportedLabels Start") );
-	
-	return iNotSupportedLabels;		
-	}
-//End of file
--- a/imservices/ossprotocoladaptation/src/search/csearchrequest.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,417 +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:  Search implementation
-*
-*/
-
-
-#include <string.h>
-#include <stdlib.h>
-
-#include <ximpprotocolconnectionhost.h>
-#include <ximpobjectfactory.h>
-#include <searchelement.h>
-#include <searchobjectfactory.h>
-#include <ximpobjectcollection.h>
-#include <searchinfo.h>
-#include <searchobjectfactory.h>
-#include <protocolsearchdatahost.h>
-#include <protocolsearchfeaturedatahost.h>
-#include <ximpidentity.h>
-
-#include "stringutils.h"
-
-#include "msg_enums.h"
-#include "waittimer.h"
-#include "msgliterals.h"
-#include "ossprotocoladaptutils.h"
-#include "csearchrequest.h"
-#include "mossprotocolconnectionmanager.h"
-#include "ossprotocolpluginlogger.h"
-
-#include "cossprotocolconnectionmanager.h"
-
-
-// search  strings  used 
-const char* FirstName ="first_name";
-const char* LastName ="last_name";
-const char* UserId ="user_id";
-const char* Jid ="jid";
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::CSearchrequest
-// ---------------------------------------------------------------------------
-//
-CSearchrequest::CSearchrequest(	MOSSProtocolConnectionManager& aConnMan,
-									TXIMPRequestId aRequestId ) :
-    CActive( EPriorityNormal ),
-    iRequestId( aRequestId ),
-    iConnMan( aConnMan )
-    {
-    LOGGER ( TXT("::CSearchrequest Start") );
-    CActiveScheduler::Add( this );
-    
-    LOGGER ( TXT("::CSearchrequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSearchrequest::ConstructL()
-    {
-    LOGGER ( TXT("CSearchrequest::ConstructL Start-End") );
-    
-	iSearchId=NULL;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::NewLC
-// ---------------------------------------------------------------------------
-//
-CSearchrequest* CSearchrequest::NewLC(
-    MOSSProtocolConnectionManager& aConnMan,
-    TXIMPRequestId aRequestId )
-    {
-    LOGGER ( TXT("CSearchrequest::NewLC Start") );
-    
-     CSearchrequest* self = new( ELeave ) 
-    			CSearchrequest( aConnMan, aRequestId );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    
-    LOGGER ( TXT("CSearchrequest::NewLC End") );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::~CSearchrequest
-// ---------------------------------------------------------------------------
-//
-CSearchrequest::~CSearchrequest()
-    {
-    LOGGER ( TXT("::~CSearchrequest Start") );
-    delete iSearchId;
-    iSearchId=NULL;
-    
-	CActive::Cancel();
-    
-    LOGGER ( TXT("::~CSearchrequest End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CSearchrequest::DoCancel()
-    {
-    LOGGER ( TXT("CSearchrequest::DoCancel Start") );
-    LOGGER ( TXT("CSearchrequest::DoCancel End") );
-    }
-
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::RunL()
-// ---------------------------------------------------------------------------
-//
-void CSearchrequest::RunL()
-	{
-	LOGGER ( TXT("CSearchrequest::RunL Start") );
-	User::LeaveIfError ( iStatus.Int() );
-
-	int len = MAX_SIZE_DATA;
-	char* pResponse = NULL, *pOrigResponse = NULL;;
-	char* key = NULL; 
-
-	MXIMPObjectFactory& objFact = iConnMan.HandleToHost().ObjectFactory();
-	MSearchObjectFactory& searchObjFact = iConnMan.GetSearchHost().SearchObjectFactory();
-	MXIMPIdentity* identity = objFact.NewIdentityLC();
-	MXIMPObjectCollection* fieldlist = objFact.NewObjectCollectionLC();
-
-  	TInt datacount = iConnMan.DataHandler().SearchDataCount();
- 	
- 	while( datacount )
-		{
-		LOGGER ( TXT("CONTACT NO : %d"), datacount );	
-		pOrigResponse =pResponse = iConnMan.DataHandler().ResponseL ( 5 );
-		CleanupStack::PushL(pOrigResponse) ;
-		MSearchInfo* searchInfo = searchObjFact.NewSearchInfoLC();
-		pResponse += sizeof ( message_hdr_resp );
-		len = strlen(pResponse) + 1;
-		while( !( *(pResponse) == '\0' && *(pResponse + 1) == '\0' ))
-			{
-			len = strlen(pResponse) + 1;
-			key = ( char* ) User::AllocLC(len);
-			strcpy(key,pResponse);
-			pResponse += len;
-			len = strlen(pResponse) + 1;
-			if( strcmp(key,FirstName) == 0)
-				{
-				LOGGER ( TXT("FIRSTNAME :") );
-			    ParseAndSetL(pResponse,len,*searchInfo, EFirstName);
-				}
-			else if( strcmp(key,LastName) == 0 )
-				{
-				LOGGER ( TXT("LASTNAME :"));
-				ParseAndSetL(pResponse,len,*searchInfo, ELastName);
-				}
-			else if( strcmp(key,Jid) == 0 )
-				{
-				LOGGER ( TXT("JID :") );
-				ParseAndSetL(pResponse,len,*searchInfo, EEmailAddress);
-				}
-			pResponse += len;
-			CleanupStack::PopAndDestroy ();// key			
-			}
-		fieldlist->AddObjectL ( searchInfo );	
-		CleanupStack::Pop();//searchInfo
-		CleanupStack::PopAndDestroy(pOrigResponse) ;//pOrigResponse	
-		datacount = iConnMan.DataHandler().SearchDataCount();
-		}
-	iConnMan.DataHandler().ResponseL ( 5 ); // this removes the operation from the array
-	identity->SetIdentityL(*iSearchId );
-	iConnMan.GetSearchHost().SearchFeatureDataAccess().HandleSearchResultsL ( identity,fieldlist );
-	iConnMan.HandleToHost().HandleRequestCompleted ( iRequestId, KErrNone );
-	CleanupStack::Pop ( 2 );//identity,fieldlist
-	delete this;
-
-	LOGGER ( TXT("CSearchrequest::RunL End") );
-	}
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::RunError
-// ---------------------------------------------------------------------------
-//
-TInt CSearchrequest::RunError( TInt  aError )
-    {
-    LOGGER ( TXT("CSearchrequest::RunError : %d  Start"), aError );
-    
-    iConnMan.HandleToHost().HandleRequestCompleted( iRequestId, aError );
-    TRAP_IGNORE(iConnMan.DataHandler().ResponseL ( 5 ));	 // this removes the operation from the array
-    delete this;
-	LOGGER ( TXT("CSearchrequest::RunError End") );
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// CSearchrequest::SearchL
-// ---------------------------------------------------------------------------
-//
-void CSearchrequest::SearchL( const MXIMPIdentity& aSearchId,
-							  const RPointerArray< MSearchElement >& aObjs,
-							  TInt  /*aSearchLimit*/)
-	{
-    LOGGER ( TXT("CSearchrequest::SearchL Start") );
-    char *smsg = NULL;
-	char *tmpmsg = NULL;
-	message_hdr_req msgHdr = {0,};
-	int userLen = 0;
-	int totalLen = 0;
-	smsg = ( char* ) User::AllocLC(MAX_MSG_SIZE);
-	memset ( smsg, '\0', MAX_MSG_SIZE );
-	msgHdr.message_type = ESearch;
-	memcpy ( smsg, &msgHdr, sizeof ( message_hdr_req ) );
-	
-	HBufC* keyStr = NULL;//HBufC::NewL( 1024 );
-	
-	CSearchKeyStore& keyStore = iConnMan.GetSearchKeyStore();
-	
-	totalLen += sizeof( message_hdr_req );
-
-	TInt elementCount=aObjs.Count();	
-	
-	for (TInt i=0; i< elementCount; ++i)
-		{
-		const MSearchElement* searchElement = aObjs[i];
-		
-			switch( searchElement->GetSearchKey() )
-			{
-			case EUserFirstName:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserFirstName );
-				
-				break;	
-				}
-	            
-			case EUser:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUser );
-				
-				break;	
-				}
-	            
-			case EUserLastName:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserLastName );
-				
-				break;	
-				}
-				
-			case EUserMiddleName:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserMiddleName );
-				
-				break;	
-				}
-				
-			case EUserFullName:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserFullName );
-				
-				break;	
-				}
-				
-			case EUserCountry:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserCountry );
-				
-				break;	
-				}
-				
-			case EUserCity:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserCity );
-				
-				break;	
-				}
-				
-			case EBirthday:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EBirthday );
-				
-				break;	
-				}
-				
-			case EState:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EState );
-				
-				break;	
-				}
-				
-			case EUserEmailAddress:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserEmailAddress );
-				
-				break;	
-				}
-				
-			case EUserNickName:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EUserNickName );
-				
-				break;	
-				}
-				
-			case EOrganisation:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EOrganisation );
-				
-				break;	
-				}
-				
-			case EOrganisationUnit:
-				{
-				keyStr = keyStore.GetLabelFromEnumL( EOrganisationUnit );
-				
-				break;	
-				}
-	            
-			case  EReadLabel: 
-				{
-				//If key is not supported(case of not localized string)
-				keyStr = searchElement->GetSearchLabel().Identity().AllocL();
-				
-				break;	
-				}
-			default:
-				{
-				//If any other case just continue with next one
-				continue;					
-				}
-			}	
-		
-		if ( NULL == keyStr )
-			{
-			continue;	
-			}
-		//Add key
-		CleanupStack::PushL( keyStr );
-		
-		charFormatData tmpmsgData = OssProtocolAdapUtils::ConvertTUint16ToCharLC( *keyStr );
-	    tmpmsg = tmpmsgData.data;
-	    userLen = tmpmsgData.dataSize;
-			 
-		 if ( totalLen + userLen > MAX_MSG_SIZE ) 
-		    	{
-				User::Leave(KErrArgument);		
-		    	}
-
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-
-    	totalLen += userLen;
-		
-		//Add value
-		
-			
-		
-		charFormatData tmpmsgDataValue = OssProtocolAdapUtils::ConvertTUint16ToCharLC( 
-					searchElement->GetSearchId().Identity() );
-					
-	    tmpmsg = tmpmsgDataValue.data;
-	    userLen = tmpmsgDataValue.dataSize;
-			 
-		 if ( totalLen + userLen > MAX_MSG_SIZE ) 
-		    	{
-				User::Leave(KErrArgument);		
-		    	}
-
-		memcpy ( smsg + totalLen, tmpmsg, userLen );
-
-    	totalLen += userLen;
-    	
-    	CleanupStack::PopAndDestroy ( 3 );//For keyStr, tmpmsgData, tmpmsgDataValue
-    	
-		} // end  : for loop
-	iSendId = iConnMan.DataHandler().SendDataL ( iStatus, smsg, totalLen++ );
-
-	delete iSearchId;	
-	iSearchId=NULL;
-    iSearchId=aSearchId.Identity().AllocL();
-	// signal the scheduler
-	SetActive();
-	CleanupStack::PopAndDestroy ( 1 );//smsg
-	LOGGER ( TXT("CSearchrequest::SearchL End") );
-		
-	}
-	
-// ---------------------------------------------------------------------------
-// CSearchrequest::SearchUtil
-// ---------------------------------------------------------------------------
-//
-void CSearchrequest::ParseAndSetL(char* aResponse, TInt /*alen*/, MSearchInfo& aSearchInfo, TInfoType aKeytype) 
-	{
-    char* keyvalue =  aResponse;
-	HBufC16* key_value = OssProtocolAdapUtils::ConvertCharToTUint16LC( keyvalue );
-	aSearchInfo.SetFieldInfoL(*key_value,aKeytype);
-	CleanupStack::PopAndDestroy( key_value );
-	}
-	
-// End of file
-
--- a/imservices/ossprotocoladaptation/src/waittimer.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1150 +0,0 @@
-/*
-* Copyright (c) 2007-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:  oss protocol plugin im features
-*
-*/
-
-
-#include "waittimer.h"
-#include "cosssenddataoperation.h"
-#include "msgliterals.h"
-#include "msg_enums.h"
-#include <stdlib.h>
-#include "ossprotocloliterals.h"
-#include "stringutils.h"
-#include "ossadappanics.h"
-#include <glib/gprintf.h>
-#include <string.h>
-#include <sys/msg.h>
-#include "ossprotocolpluginlogger.h"
-#include <ximpobjectfactory.h>
-#include "mossprotocolconnectionmanager.h"
-#include "cossprotocolconnectionmanager.h"
-#include <ximpprotocolconnectionhost.h>
-#include <ximpstatus.h>
-#include <math.h>
-#include <avabilitytext.h>
-#include "ossprotocoladaptutils.h"
-// CONSTANTS
-const TInt KOpIdInitvalue = 1000;
-
-#define KTimerInterval 50000
-
-#define ONE_K_OPENC_FIX 1020
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CWaitTimer::COSSProtocolImFeatures()
-// ---------------------------------------------------------------------------
-//
-CWaitTimer::CWaitTimer (MOSSProtocolConnectionManager& aConnMan) :
-		CActive ( EPriorityHigh ), // Standard priority
-		iOpidIterator ( KOpIdInitvalue ), iOpId ( 5 ),iConnMan ( aConnMan ),
-		iResponseMsgQCreated(EFalse),iServerDisconnected(EFalse),
-		iFetchingStep(EDataFetchingStep1) // -2 for fetching all three  types of contacts
-	{
-	CActiveScheduler::Add ( this ); // Add to scheduler
-	}
-
-
-// ---------------------------------------------------------------------------
-// CWaitTimer::NewL()
-// ---------------------------------------------------------------------------
-//
-CWaitTimer* CWaitTimer::NewL (MOSSProtocolConnectionManager& aConnMan)
-	{
-	CWaitTimer* self = new ( ELeave ) CWaitTimer (aConnMan);
-	CleanupStack::PushL ( self );
-	self->ConstructL ();
-	CleanupStack::Pop (); // self;
-	return self;
-	}
-
-// ---------------------------------------------------------------------------
-// CWaitTimer::ConstructL()
-// ---------------------------------------------------------------------------
-//
-void CWaitTimer::ConstructL()
-	{
-	User::LeaveIfError( iTimer.CreateLocal() );
-	}
-
-// ---------------------------------------------------------------------------
-// CWaitTimer::~CWaitTimer()
-// ---------------------------------------------------------------------------
-//
-CWaitTimer::~CWaitTimer()
-	{
-	LOGGER ( TXT ( "CWaitTimer::~CWaitTimer  start" ) );
-	TInt error = 0;
-	MsgQDelete ( REQUEST_QUEUE, &error );
-	MsgQDelete ( RESPONSE_QUEUE, &error );
-    iIncomingData.ResetAndDestroy();
-    iIncomingMsg.ResetAndDestroy();
-    iIncomingPres.ResetAndDestroy();
-	iIncomingServerError.ResetAndDestroy();	
-    iAddNotification.ResetAndDestroy();
-	if (iIncReqStatus)
-        {
-        User::RequestComplete( iIncReqStatus, KErrCancel );
-        iIncReqStatus = NULL;
-        }
- 	if (iIncMsgReqStatus)
-        {
-        User::RequestComplete( iIncMsgReqStatus, KErrCancel );
-        iIncMsgReqStatus = NULL;
-        }     
-    if (iIncPresReqStatus)
-        {
-        User::RequestComplete( iIncPresReqStatus, KErrCancel );
-        iIncPresReqStatus = NULL;
-        }        
-    if (iIncAddReqStatus)
-        {
-        User::RequestComplete( iIncAddReqStatus, KErrCancel );
-        iIncAddReqStatus = NULL;
-        }        
-    CancelContactsChangeListening();
-	Cancel (); // Cancel any request, if outstanding
-	iTimer.Close (); // Destroy the RTimer object
-	iOperations.ResetAndDestroy();
-	iSearchElements.ResetAndDestroy(); 
-	iContactChangeList.ResetAndDestroy();
-	LOGGER ( TXT ( "CWaitTimer::~CWaitTimer  end" ) );
-	
-	}
-
-// ---------------------------------------------------------------------------
-// CWaitTimer::DoCancel()
-// ---------------------------------------------------------------------------
-//
-void CWaitTimer::DoCancel()
-	{
-	iTimer.Cancel ();
-	}
-
-// ----------------------------------------------------------------------------
-// CWaitTimer::IncreaseOpId
-// ----------------------------------------------------------------------------
-void CWaitTimer::IncreaseOpId( )
-	{
-
-	iOpId++;
-
-	}
-
-
-// ----------------------------------------------------------------------------
-// CWaitTimer::GetOpId
-// ----------------------------------------------------------------------------
-TInt CWaitTimer::GetOpId( )
-	{
-
-	return iOpId;
-	}
-// ----------------------------------------------------------------------------
-// CWaitTimer::IsFetchingContinue
-// ----------------------------------------------------------------------------
-TInt CWaitTimer::IsFetchingContinue( )
-	{
-
-	return iFetchingContinue;
-
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::SendDataL()
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::SendDataL ( TRequestStatus& aStatus, char* msg, TInt nBytes )
-	{
-	int result;
-	int err = 0;
-	int timeout = NO_WAIT;
-	LOGGER ( TXT ( "CWaitTimer::SendData  start" ) );
-	// allocate slot in array by adding NULL pointer and removing it
-	iOperations.AppendL ( NULL );
-	iOperations.Remove ( iOperations.Count() - 1 );
-	COssSendDataOperation* operation =
-	    COssSendDataOperation::NewLC();
-	operation->SetIds ( iOpId, iOpidIterator++ );
-	iOperations.Append ( operation );
-	CleanupStack::Pop ( operation ); // operation
-	// now it is safe to set request status
-	operation->SetRequestStatus ( aStatus );
-	aStatus = KRequestPending;
-	/* Try to Create queueOne
-	*/
-    message_hdr_req* msgHdr = ( message_hdr_req* ) msg;
-    result = MsgQCreate ( REQUEST_QUEUE, MAX_MSG_Q_SIZE , MSG_Q_FIFO, &err );
-    User::LeaveIfError ( result );
-    /* Send Message to queueOne */
-    if ( msgHdr->message_type == EUpdateOwnAvtar )
-        {
-        TInt header_size = sizeof( message_hdr_req );
-        char* one_pdu = ( char* ) User::AllocLC ( ONE_K_OPENC_FIX );
-        //run a loop for rest of the data and keep track of the case of nBytes being 
-        //multiple of 1020 - sizeof(msghdr) and it being not
-        //Amount of payload that can be sent
-        TInt single_read = ONE_K_OPENC_FIX - header_size;
-        //Data recieved from PublishOwnPresenceL has message header at begining
-        TInt actual_data = nBytes - header_size;
-        //No of packets needed to send the image data
-        TInt total_packets = (TInt)ceil( ( double ) ( actual_data ) / single_read );
-        //This offset moves thru the msg pointer
-        TInt navigate_offset = header_size;
-        message_hdr_req msg_hdr;
-        memset( (void*)&msg_hdr, '\0', header_size );
-        msg_hdr.message_type = EUpdateOwnAvtar;
-        for ( TInt i = 0; i < total_packets; i++ )
-            {
-            //till the last packet size_tobe_sent will be ONE_K_OPENC_FIX
-            //last packet data is actual_data % single_read if less than single_read else ONE_K_OPENC_FIX
-            TInt size_tobe_sent = ( i < total_packets - 1 ) ? ONE_K_OPENC_FIX : 
-            ( actual_data % single_read ? 
-                actual_data % single_read  + header_size : ONE_K_OPENC_FIX );
-
-            if ( i < total_packets - 1 )
-                {
-                msg_hdr.continue_flag = 1;
-                }
-            else 
-                {
-                msg_hdr.continue_flag = 0;
-                }
-
-            //memcpy ( msg + header_size , msg + navigate_offset, size_tobe_sent - header_size );
-            memcpy( one_pdu , &msg_hdr, header_size );
-            memcpy( one_pdu + header_size, msg + navigate_offset, size_tobe_sent - header_size );
-            result = MsgQSend ( REQUEST_QUEUE, one_pdu, size_tobe_sent, 
-                    MSG_PRI_NORMAL, timeout, &err );
-            User::LeaveIfError ( result );
-            navigate_offset += single_read;
-            }
-        CleanupStack::PopAndDestroy( one_pdu );
-        one_pdu = NULL;
-        }
-    else
-        {
-        result = MsgQSend ( REQUEST_QUEUE, msg, nBytes, MSG_PRI_NORMAL, timeout, &err );
-
-        User::LeaveIfError ( result );
-        }
-	LOGGER ( TXT ( "CWaitTimer::SendData  end" ) );
-
-	return iOpId;
-
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenConatcsChange()  //contacts
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::ListenContactsChange ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenContactsChange Start" ) );
-
-	if ( !iContactsChangeStatus )
-		{
-		iContactsChangeStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-	LOGGER ( TXT ( "CWaitTimer::ListenContactsChange End" ) );	
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::CancelListening()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelContactsChangeListening()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelContactsChangeListening Start" ) );
-
-	if ( iContactsChangeStatus )
-		{
-		User::RequestComplete ( iContactsChangeStatus, KErrCancel );
-		iContactsChangeStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelContactsChangeListening End" ) );
-	}
-
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenIncomingData()  //contacts
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::ListenIncomingData ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingData Start" ) );
-
-	if ( !iIncReqStatus )
-		{
-		iIncReqStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::IncomingDataCount()  //contacts
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::IncomingDataCount()
-	{
-	LOGGER ( TXT ( "CWaitTimer::IncomingDataCount Start" ) );
-
-	return iIncomingData.Count();
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::SearchDataCount()  //Searched data
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::SearchDataCount()
-	{
-	return iSearchElements.Count();
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::ContactsChangeResponseCount()  //Searched data
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::ContactsChangeResponseCount()
-	{
-	return iContactChangeList.Count();
-	}	
-// -----------------------------------------------------------------------------
-// CWaitTimer::CancelListening()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelListening()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelListening Start" ) );
-
-	if ( iIncReqStatus )
-		{
-		User::RequestComplete ( iIncReqStatus, KErrCancel );
-		iIncReqStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelListening End" ) );
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenIncomingMsg()  // messages
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::ListenIncomingMsg ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingMsg Start" ) );
-
-	if ( !iIncMsgReqStatus )
-		{
-		iIncMsgReqStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingMsg End Count is %d" ), iIncomingMsg.Count() );
-
-	return iIncomingMsg.Count();
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenIncomingPresenceL()  // presence notifications
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::ListenIncomingPresence ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingPresence Start" ) );
-
-	if ( !iIncPresReqStatus )
-		{
-		iIncPresReqStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingPresence End Count is %d" ), iIncomingPres.Count() );
-
-	return iIncomingPres.Count();
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenAddNotification()  // Add contact notifications
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::ListenAddNotification ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenAddNotification Start" ) );
-
-	if ( !iIncAddReqStatus )
-		{
-		iIncAddReqStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::ListenAddNotification End Count is %d" ), iAddNotification.Count() );
-
-	return iAddNotification.Count();
-	}	
-// -----------------------------------------------------------------------------
-// CWaitTimer::ListenIncomingServerError()  // presence notifications
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::ListenIncomingServerError ( TRequestStatus& aStatus )
-	{
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingServerError Start" ) );
-
-	if ( !iIncErrorReqStatus )
-		{
-		iIncErrorReqStatus = &aStatus;
-		aStatus = KRequestPending;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::ListenIncomingServerError End Count is %d" ), iIncomingServerError.Count() );
-
-	return iIncomingServerError.Count();
-	}
-// CWaitTimer::CancelListeningMsg()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelListeningMsg()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelListening Start" ) );
-
-	if ( iIncMsgReqStatus )
-		{
-		User::RequestComplete ( iIncMsgReqStatus, KErrCancel );
-		iIncMsgReqStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelListening End" ) );
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::CancelListeningPres()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelListeningPres()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningPres Start" ) );
-
-	if ( iIncPresReqStatus )
-		{
-		User::RequestComplete ( iIncPresReqStatus, KErrCancel );
-		iIncPresReqStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningPres End" ) );
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::CancelListeningAddNotication()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelListeningAddNotication()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningAddNotication Start" ) );
-
-	if ( iIncAddReqStatus )
-		{
-		User::RequestComplete ( iIncAddReqStatus, KErrCancel );
-		iIncAddReqStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningAddNotication End" ) );
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::CancelListeningServerErrors()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::CancelListeningServerErrors()
-	{
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningServerErrors Start" ) );
-
-	if ( iIncErrorReqStatus )
-		{
-		User::RequestComplete ( iIncErrorReqStatus, KErrCancel );
-		iIncErrorReqStatus = NULL;
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::CancelListeningServerErrors End" ) );
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::StartListeningL()
-// -----------------------------------------------------------------------------
-//
-
-void CWaitTimer::StartListeningL()
-	{
-	LOGGER ( TXT ( "CWaitTimer::StartListening Start" ) );
-//	Cancel (); // Cancel any request, just to be sure
-//	iProperty.Subscribe(iStatus);
-	iTimer.After ( iStatus, KTimerInterval );
-	SetActive (); // Tell scheduler a request is active
-	LOGGER ( TXT ( "CWaitTimer::StartListening End" ) );
-
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::RunL()
-// -----------------------------------------------------------------------------
-//
-
-void CWaitTimer::RunL()
-	{
-
-	int timeout = IPC_NOWAIT; //TIME_OUT;
-	int err = 0;
-	int status = 0;
-	int size_msg = sizeof ( message_hdr_resp );
-	TBool msgreadcontinue = EFalse;
-	message_hdr_resp* msg_struct = NULL;
-	char* rmsg = NULL;
-	
-	if( !iResponseMsgQCreated )
-		{
-		status = MsgQCreate ( RESPONSE_QUEUE, MAX_MSG_Q_SIZE, MSG_Q_FIFO, &err );
-		iResponseMsgQCreated = ETrue;
-		}
-
-	if(-1 == status)
-		{
-		LOGGER ( TXT ( "CWaitTimer::leave " ) );  
-		User::Leave( status );
-		}	
-    do
-       {
-        rmsg = ( char* ) User::AllocLC ( MAX_MSG_SIZE );
-
-	  // Receive Message from queueTwo
-    
-        status = MsgQReceive ( RESPONSE_QUEUE, rmsg, MAX_MSG_SIZE, timeout, &err );
-        User::LeaveIfError ( err );
-        //size should be atleast size of message_hdr_resp
-        if( -1 == status )
-            {
-		    CleanupStack::PopAndDestroy ( rmsg );
-		    }
-
-        if ( status >= size_msg )
-  		    {
-  		    LOGGER ( TXT ( "CWaitTimer::MsgQReceive responce recvd" ) );
-		    msg_struct = ( message_hdr_resp* )rmsg ;
-		    LOGGER ( TXT ( "CWaitTimer::data recvd of type %d" ), msg_struct->hdr_req.message_type );
-		
-		    switch( msg_struct->hdr_req.message_type )
-			      {
-			      TInt operationindex;
-		          case EText_Message_Receive:
-				      {
-				      LOGGER ( TXT ( "CWaitTimer::EText_Message_Receive" ) );
-				      // complete prfw request
-				      iIncomingMsg.AppendL ( rmsg );
-				      if ( iIncMsgReqStatus )
-				          {
-				          User::RequestComplete ( iIncMsgReqStatus, KErrNone );
-				          iIncMsgReqStatus = NULL;
-				          }
-				      CleanupStack::Pop( rmsg );
-				      break;
-				      }
-		          case EPresenceNotification:
-		              {
-
-        			  LOGGER ( TXT ( "CWaitTimer::EPresence_Notification_Received" ) );
-            	      // complete prfw request
-            		  //	iIncomingPres.AppendL ( rmsg );
-            		  iIncomingPres.Insert (rmsg,0);
-            		  if ( iIncPresReqStatus )
-            		      {
-            		      User::RequestComplete ( iIncPresReqStatus, KErrNone );
-            		      iIncPresReqStatus = NULL;
-            		      }
-            		  CleanupStack::Pop( rmsg );
-            		  break;
-		              }
-		          case ETrying_To_Add_Contact_Publish:
-		              {
-		              LOGGER ( TXT ( "CWaitTimer::ETrying_To_Add_Contact" ) );
-		              // complete prfw request
-		              iAddNotification.AppendL ( rmsg );
-		              if ( iIncAddReqStatus )
-		                  {
-		                  User::RequestComplete ( iIncAddReqStatus, KErrNone );
-		                  iIncAddReqStatus = NULL;
-		                  }
-		              CleanupStack::Pop( rmsg );
-		              break;
-		              }
-		        case ESubscribe_Remote_Pending:
-		        case ETrying_To_Add_Contact_Known:
-		            {
-		            LOGGER ( TXT ( "CWaitTimer::Sync of contacts state" ) );
-		            iContactChangeList.Append(rmsg);
-		            if ( iContactsChangeStatus )
-		                {
-		                User::RequestComplete ( iContactsChangeStatus, KErrNone );
-		                iContactsChangeStatus = NULL;
-		                }
-		            CleanupStack::Pop( rmsg );
-		            break;    
-		            }
-
-		        case ESubscribe_RP_Accepted:
-		            {
-		            CleanupStack::PopAndDestroy( rmsg );
-		            break;    
-		            }
-		       case EPublish_RP_Accepted:
-		            {
-		            CleanupStack::PopAndDestroy( rmsg );
-		            break;
-		            }	   
-		        case EPublish_Removed_Or_Rejected:
-		            {
-		            LOGGER ( TXT ( "CWaitTimer::Sync of contacts state" ) );
-		            iContactChangeList.Append(rmsg);
-		            if ( iContactsChangeStatus )
-		                {
-		                User::RequestComplete ( iContactsChangeStatus, KErrNone );
-		                iContactsChangeStatus = NULL;
-		                }
-		            CleanupStack::Pop( rmsg );
-		            break;    
-		            }
-		          case ESubscribe_Removed_Or_Rejected:
-		              {
-		              LOGGER ( TXT ( "CWaitTimer::Sync of contacts state" ) );
-		              iContactChangeList.Append(rmsg);
-		              if ( iContactsChangeStatus )
-		                  {
-		                  User::RequestComplete ( iContactsChangeStatus, KErrNone );
-		                  iContactsChangeStatus = NULL;
-		                  }
-		              CleanupStack::Pop( rmsg );
-		              break;	
-		              }
-    			case ECurrent_Member_Contacts:
-    				{
-    				iFetchingContinue = EFalse;
-    				// complete ximpfw request
-    				iIncomingData.AppendL ( rmsg );
-    				if(msg_struct->continue_flag == 1)
-    					{
-    					iFetchingContinue = ETrue;
-    					}
-    				else
-    					{
-    					iFetchingStep++ ;	// move to next step
-    					}
-					
-    				if ( iIncReqStatus && iFetchingStep == EDataFetchComplete )// complete request only if step is 1
-    					{
-    					User::RequestComplete ( iIncReqStatus, KErrNone );
-    					iIncReqStatus = NULL;
-    					}
-    				CleanupStack::Pop( rmsg );	
-    				break;	
-    				}
-    			case ELocal_Pending_Contacts:
-    				{
-    				LOGGER ( TXT ( "CWaitTimer::ELocal_Pending_Contacts" ) );
-                    // complete prfw request
-    				iAddNotification.AppendL ( rmsg );  
-    				if ( iIncAddReqStatus )
-    				    {
-                        LOGGER ( TXT ( "CWaitTimer::ELocal_Pending_Contacts" ) );			                    
-                        User::RequestComplete ( iIncAddReqStatus, KErrNone );
-                        iIncAddReqStatus = NULL;
-                        }
-                    CleanupStack::Pop( rmsg );                
-    				break;	
-    				}
-    			case ERemote_Pending_Contacts:
-        			{
-        			LOGGER ( TXT ( "CWaitTimer::ECurrent_Member_Contacts" ) );
-        			iFetchingContinue = EFalse;
-        			// complete ximpfw request
-        			iIncomingData.AppendL ( rmsg );
-        			PendingPresenceContactsL(rmsg);
-        			if(msg_struct->continue_flag == 1)
-        				{
-        				iFetchingContinue = ETrue;
-        				}
-        			else
-        				{
-        				iFetchingStep++ ;	// move next step
-        				}	
-        			if ( iIncReqStatus && iFetchingStep == EDataFetchComplete) // complete request only if step is 1
-        				{
-        				User::RequestComplete ( iIncReqStatus, KErrNone );
-        				iIncReqStatus = NULL;
-        				}
-        			CleanupStack::Pop( rmsg );
-        			break;
-        			}
-    			case ESend_Error:
-    				{
-    				LOGGER ( TXT ( "CWaitTimer::ESend_Error" ) );
-    				// complete ximpfw request
-    				iIncomingServerError.AppendL ( rmsg );
-    				if ( iIncErrorReqStatus )
-    					{
-    					User::RequestComplete ( iIncErrorReqStatus, KErrNone );
-    					iIncErrorReqStatus = NULL;
-    					}
-    				CleanupStack::Pop( rmsg );
-    				break;
-    				}
-    				
-    			case EUserEndGprs: 
-    			    LOGGER ( TXT ( "CWaitTimer::EUserCancelAccessPoint start" ) );
-    			    
-    			case EServer_DisConnect_Request:
-    				{
-    				iServerDisconnected = ETrue;
-    				LOGGER ( TXT ( "CWaitTimer::EServer_DisConnect_Request start" ) );
-    				CancelListeningMsg();
-    				CancelListening();
-    				CancelListeningPres();
-    				CancelListeningAddNotication();
-    				CancelListeningServerErrors();
-                    CancelContactsChangeListening();
-                
-    				MXIMPObjectFactory& prfwObjFact = iConnMan.HandleToHost().ObjectFactory();
-    				MXIMPStatus* status = prfwObjFact.NewStatusLC();// status
-    				status->SetResultCode( KErrDisconnected );
-    				iConnMan.HandleToHost().HandleConnectionTerminated( status );
- 					//IssueReleaseRequestL();//Release the connection
-    				CleanupStack::PopAndDestroy(); // status
-    				CleanupStack::Pop( rmsg );
-    				LOGGER ( TXT ( "CWaitTimer::EServer_DisConnect_Request end" ) );
-    				break;
-    				}
-    			case ESearch_State_Finished:
-    				{
-                    LOGGER ( TXT ( "CWaitTimer::ESearch_State_Finished" ) );
-    				operationindex = ( FindOperationL ( iOpId, COssSendDataOperation::OperationId ) );
-    
-    				if ( operationindex != KErrNotFound )
-    					{
-    					LOGGER ( TXT ( "CWaitTimer::FindOperationL found" ) );
-    					iOperations[ operationindex ]->SetResponse ( rmsg ); //ownership of rmsg is transferred
-    					iOperations[ operationindex ]->CompletedOperation ( KErrNone );
-    					}
-    				CleanupStack::Pop( rmsg );	
-    				break;	
-    				}
-    			case ESearch:
-    				{
-    				LOGGER ( TXT ( "CWaitTimer::ESearch" ) );
-    				if ( msg_struct->response != 0 ) 
-    					{
-    					LOGGER ( TXT ( "CWaitTimer::ESearch : Result" ) );
-                        char* pResponse = ( char* ) User::AllocLC ( status );
-    					memset ( pResponse, '\0', status );
-                        memcpy ( pResponse, rmsg, status );
-    					iSearchElements.AppendL ( pResponse );
-    				    CleanupStack::Pop( pResponse );
-    		            CleanupStack::PopAndDestroy( rmsg );
-    					}
-    				else
-    					{
-    					LOGGER ( TXT ( "CWaitTimer::ESearch: ERROR !!" ) );
-    					operationindex = ( FindOperationL ( iOpId, COssSendDataOperation::OperationId ) );
-    					iOperations[ operationindex ]->SetResponse ( rmsg ); //ownership of rmsg is transferred
-    				    iOperations[ operationindex ]->CompletedOperation ( KErrNotSupported );// for all errors
-    				    CleanupStack::Pop( rmsg );
-    				    // send  not supported, since the error mapping is  not done 	
-    					}	
-    				break;
-    				}
-    			case ESearch_Get_Keys:
-    				{
-    				
-    				LOGGER ( TXT ( "CWaitTimer::ESearch_Get_Keys" ) );
-    				operationindex = ( FindOperationL ( iOpId, COssSendDataOperation::OperationId ) );
-    
-    				if ( operationindex != KErrNotFound )
-    					{
-    					LOGGER ( TXT ( "CWaitTimer::FindOperationL found" ) );
-    					iOperations[ operationindex ]->SetResponse ( rmsg ); //ownership of rmsg is transferred
-    					iOperations[ operationindex ]->CompletedOperation ( KErrNone );
-    					}
-    				CleanupStack::Pop( rmsg );
-    				LOGGER ( TXT ( "CWaitTimer::ESearch_Get_Keys end" ) );
-    				break;
-    				}
-    			case ESearch_State_During :
-    				{
-    				LOGGER ( TXT ( "CWaitTimer::ESearch_State_During" ) );
-    				iSearchElements.ResetAndDestroy();
-    				CleanupStack::PopAndDestroy( rmsg );
-    				LOGGER ( TXT ( "CWaitTimer::ESearch_State_During end" ) );
-    				break;	
-    				}
-			case EUpdateOwnAvtar :	
-			    {
-                LOGGER ( TXT ( "CWaitTimer::EUpdateOwnAvtar" ) );
-                operationindex = ( FindOperationL ( iOpId, COssSendDataOperation::OperationId ) );
-
-                if ( operationindex != KErrNotFound )
-                    {
-                    LOGGER ( TXT ( "CWaitTimer::FindOperationL found" ) );
-
-                    iOperations[ operationindex ]->SetResponse ( rmsg ); //ownership of rmsg is transferred
-                    iOperations[ operationindex ]->CompletedOperation ( KErrNone );
-                    }
-                CleanupStack::Pop( rmsg );
-                break;
-			    }
-    			default:
-    					{
-    					LOGGER ( TXT ( "CWaitTimer::default start" ) );
-    					operationindex = ( FindOperationL ( iOpId, COssSendDataOperation::OperationId ) );
-    
-    					if ( operationindex != KErrNotFound )
-    						{
-    						LOGGER ( TXT ( "CWaitTimer::FindOperationL found" ) );
-    
-    						iOperations[ operationindex ]->SetResponse ( rmsg ); //ownership of rmsg is transferred
-    						iOperations[ operationindex ]->CompletedOperation ( KErrNone );
-    						}
-    					CleanupStack::Pop( rmsg );
-    					LOGGER ( TXT ( "CWaitTimer::default end" ) );
-    					break;
-    					}
-			      }
-
-		    TInt pendingMsgCount = MsgQCheck(RESPONSE_QUEUE, &err );
-		    if( pendingMsgCount > 0)
-		        {
-		        msgreadcontinue = ETrue;
-		        }
-		    else 
-		        {
-		        msgreadcontinue = EFalse;
-		        }
-		    LOGGER ( TXT ( "CWaitTimer::pendingMsgCount is %d" ), pendingMsgCount );   
-  		    }
-       }while( msgreadcontinue );
-		/*
-		// there is no pending message in msgqueue,
-		// set active and subscribe for incomming queue message
-		iProperty.Subscribe(iStatus);
-		SetActive(); // Tell scheduler a request is active	*/
-		
-		iTimer.After( iStatus, KTimerInterval );
-		SetActive();
-	}
-// -----------------------------------------------------------------------------
-// CWaitTimer::PendingPresenceContactsL()
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::PendingPresenceContactsL(char* aRmessage)
-    {
-    char* prmsg = NULL;
-    prmsg = aRmessage;
-    HBufC16 *contactName = NULL;
-    HBufC* name = NULL;
-    int len = 0;
-    if( aRmessage )
-        {
-        prmsg += sizeof ( message_hdr_resp );
-        MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC();
-   
-        MPresenceCacheWriter2* presenceCacheWriter = MPresenceCacheWriter2::CreateWriterL();
-        CleanupDeletePushL(presenceCacheWriter);
-        while(1)
-            {
-            len = strlen(prmsg) + 1;
-            if (1 == len)
-                {
-                break;
-                }
-            char* contact = prmsg;  
-            prmsg += len;
-
-            contactName = OssProtocolAdapUtils::ConvertCharToTUint16LC( contact );
-            LOGGER ( TXT ( "CWaitTimer::PendingPresenceContacts:ContactName:%S " ), contactName );
-
-            //  contacts.AppendL(contactName);
-            name = HBufC::NewLC( contactName->Length() + iConnMan.ServiceName().Length() + KColon().Length() );
-            TPtr namePtr( name->Des() );
-            namePtr.Zero();
-            namePtr.Append(iConnMan.ServiceName() ); // prepend service name
-            namePtr.Append(KColon);
-            namePtr.Append(contactName->Des() );
-            buddyPresInfo->SetIdentityL(namePtr);
-            LOGGER ( TXT ( "CPresenceNotificationHandler::ProcessIncomingDataL  :ContactName:%S " ), contactName ); 
-    
-            buddyPresInfo->SetAnyFieldL(KExtensionKey,KPendingRequestExtensionValue());
-            CleanupStack::PopAndDestroy(2);//name,contactName
-            name = NULL;
-            contactName = NULL;
-            // Writing into Presence Cache
-            TInt cacheerror = presenceCacheWriter->WritePresenceL(buddyPresInfo);
-            User::LeaveIfError ( cacheerror);
-           
-            } 
-        CleanupStack::PopAndDestroy(2);//presenceCacheWriter,buddyPresInfo
-
-        }
-    }
-// -----------------------------------------------------------------------------
-// CWaitTimer::ResponseL()
-// -----------------------------------------------------------------------------
-//
-
-char* CWaitTimer::ResponseL ( TInt aTransId )
-	{
-	
-	if ( aTransId == 0 )   // for contact list
-		{
-		if ( iIncomingData.Count() == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iIncomingData[ 0 ];
-
-		iIncomingData.Remove ( 0 );
-		iIncomingData.Compress();
-		return buff;
-		}
-
-	if ( aTransId == 1 )     //for receive message
-		{
-		if ( iIncomingMsg.Count() == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iIncomingMsg[ 0 ];
-
-		iIncomingMsg.Remove ( 0 );
-
-		return buff;
-		}
-	if ( aTransId == 2 )     //for presence notifications
-		{
-		TInt pCount = iIncomingPres.Count();
-		
-		if ( pCount == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iIncomingPres[ pCount-1 ];
-
-		iIncomingPres.Remove ( pCount-1 );
-		iIncomingPres.Compress();
-		return buff;
-		}
-	if ( aTransId == 3 )     //for send error
-		{
-		if ( iIncomingServerError.Count() == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iIncomingServerError[ 0 ];
-
-		iIncomingServerError.Remove ( 0 );
-
-		return buff;
-		}
-	if ( aTransId == 4 )     //for Add notifications
-		{
-		if ( iAddNotification.Count() == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iAddNotification[ 0 ];
-
-		iAddNotification.Remove ( 0 );
-
-		return buff;
-		}			
-	if( aTransId == 5 )	 // search results 
-		{
-	    // take first one from the array
-	    char*  buff=NULL;
-	    
-		if ( iSearchElements.Count() != 0 )
-			{
-		    buff = iSearchElements[ 0 ];
-			iSearchElements.Remove ( 0 );
-			iSearchElements.Compress();
-			}
-       	else 
-	        {
-	       	TInt x ( FindOperationL ( 6, COssSendDataOperation::OperationId ) );
-			if( x != -1)
-				{	// is operation completed?
-				TRequestStatus* status = iOperations[ x ]->Status();
-
-				if ( status && ( *status == KRequestPending ) )
-					{
-					User::Leave ( KErrNotReady );
-					}
-				delete iOperations[ x ];
-				iOperations.Remove ( x );
-				}
-	
-	        }
-	
-		return buff; // return the  buffer 	
-		}
-	if ( aTransId == 200 )     //for contact sync
-		{
-		if ( iContactChangeList.Count() == 0 )
-			{
-			User::Leave ( KErrNotFound );
-			}
-
-		// take first one from the array
-		char* buff = iContactChangeList[ 0 ];
-
-		iContactChangeList.Remove ( 0 );
-        iContactChangeList.Compress();
-		return buff;
-		}			
-	// try to find operation
-	TInt x ( FindOperationL ( aTransId, COssSendDataOperation::OperationId ) );
-
-	// is operation completed?
-	TRequestStatus* status = iOperations[ x ]->Status();
-
-	if ( status && ( *status == KRequestPending ) )
-		{
-		User::Leave ( KErrNotReady );
-		}
-
-	char* buff = iOperations[ x ]->Response();
-
-	delete iOperations[ x ];
-	iOperations.Remove ( x );
-	return buff;
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::RunError()
-// -----------------------------------------------------------------------------
-//
-
-TInt CWaitTimer::RunError ( TInt aError )
-	{
-	return aError;
-	}
-
-// =============================================================================
-// =============== New private Functions of the base class =====================
-// =============================================================================
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::FindOperation()
-// Find operation in array
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::FindOperation (
-    TInt aOpId,
-    TInt ( COssSendDataOperation:: *aIdFunc ) () const ) const
-	{
-	LOGGER ( TXT ( "CWaitTimer::FindOperation Start" ) );
-	TInt count ( iOperations.Count() );
-
-	for ( TInt x ( 0 ) ; x < count ; ++x )
-		{
-		if ( aOpId == ( ( *iOperations[ x ] ).*aIdFunc ) () )
-			{
-			LOGGER ( TXT ( "CWaitTimer::FindOperation Returns %d" ), x );
-			return x;
-			}
-		}
-
-	LOGGER ( TXT ( "CWaitTimer::FindOperation End" ) );
-
-	return KErrNotFound;
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::FindOperationL()
-// Find operation in array, leave if not found
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CWaitTimer::FindOperationL (
-    TInt aOpId,
-    TInt ( COssSendDataOperation:: *aIdFunc ) () const ) const
-	{
-	LOGGER ( TXT ( "CWaitTimer::FindOperation Start" ) );
-	TInt x ( FindOperation ( aOpId, aIdFunc ) );
-
-	LOGGER ( TXT ( "CWaitTimer::FindOperation End Returns %d" ), x );
-
-	return x;
-	}
-
-// -----------------------------------------------------------------------------
-// CWaitTimer::IssueReleaseRequestL()
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CWaitTimer::IssueReleaseRequestL()
-	{
-	LOGGER ( TXT ( "CWaitTimer::IssueReleaseRequestL Start" ) );
-	int err = 0;
-	int timeout = NO_WAIT;
-	message_hdr_req *msgHdr = NULL;
-	msgHdr = ( message_hdr_req* ) User::AllocLC(sizeof ( message_hdr_req ));
-	memset ( msgHdr, '\0', sizeof ( message_hdr_req ) );
-	msgHdr->message_type = EKill_Process;
-	
-	TInt nBytes = sizeof ( message_hdr_req );
-
-	MsgQCreate ( REQUEST_QUEUE, MAX_MSG_Q_SIZE , MSG_Q_FIFO, &err );
-	
-	MsgQSend ( REQUEST_QUEUE, ( char* ) msgHdr , nBytes, MSG_PRI_NORMAL, timeout, &err );
-	
-	CleanupStack::PopAndDestroy ( msgHdr );
-	
-	LOGGER ( TXT ( "CWaitTimer::IssueReleaseRequestL end" ) );
-
-	}
-// ---------------------------------------------------------------------------
-// CWaitTimer::IsServerDisconnect()
-// ---------------------------------------------------------------------------
-//	
-TBool CWaitTimer::IsServerDisconnect()
-	{
-	return iServerDisconnected;	
-	}
-// ---------------------------------------------------------------------------
-// CWaitTimer::IsFetchContactsCompleted()
-// ---------------------------------------------------------------------------
-//  
-TBool CWaitTimer::IsFetchContactsCompleted()
-    {
-    if(iFetchingStep == EDataFetchComplete)
-        {
-        return ETrue;
-        }
-    return EFalse;
-    }
-
-	
-// End of file
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/bmarm/ossadapmtu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	LibEntryL__FR13CTestModuleIf @ 1 NONAME R3UNUSED ; LibEntryL(CTestModuleIf &)
-
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/bwins/ossadapmtu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * __cdecl LibEntryL(class CTestModuleIf &)
-
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/conf/ossadapmt.cfg	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,665 +0,0 @@
-// Definitions
-[Define]
-SERVER       chat.gizmoproject.com
-//USERNAME     testlmnokia@chat.gizmoproject.com
-//PASSWORD     loudmouth
-RECIPIENT    basu.bellary@gmail.com
-MESSAGE      Hello
-RESOURCE     mytest12345rt
-
-USERNAME     ximptelepathy@gmail.com
-PASSWORD     tele1236
-SETTINGSID   3
-SERVICE_ID   3
-InvalidSettingsId -100
-UnexistJID   						testlmnokia1111@chat.gizmoproject.com
-badpassword  						12345 
-badserver    						chat.gizmoprojeeeect.com
-UsernameWithBadServer  	testlmnokia@chat.gizmoprojeeeeect.com
-SpecialUSERNAME					im:here%27s_a_wild_%26_%2Fcr%zy%2F_address@chat.gizmoproject.com
-LONGUSERNAME						im:here%27s_a_wild_%26_%2Fcr%zy%2F_address_here%27s_a_wild_%26_%2Fcr%zy%2F_address_here%27s_a_wild_%26_%2Fcr%zy%2F_address@chat.gizmoproject.com
-LONGPASSWORD 						loudmouthloudmouthloudmouthloudmouthloudmouthloudmouthloudmouthloudmouthloudmouthloudmouthloudmouth
-LONGMESSAGE		  				HelloworldHelloworldHelloworldHelloworldHelloworldHelloworldHelloworldHelloworldHelloworlsfsdfdgdfgdfgdfgdfgdf
-REPEATEDMESSAGE					RepeatingHello
-SMILEYMESSAGE						:):-);-):-D:D:-(:(
-
-LONGGMAILUSERID 				abcd123456abcd123456abcd123456
-GMAILPWD								nokia123
-
-//PROXY_SERVER 172.16.42.135
-PROXY_SERVER 172.16.9.182
-PROXY_PORT   8080
-
-WrongPassword 					wrongpassword
-NoContactUserName      emptycontactlist@gmail.com
-NoContactPassword      emptylist
-300contactsUsername    rakesh.harsh@gmail.com
-300contactsPassword    live_life
-InvalidUserName        invalidxmppid@gmail.com
-CapitalUserName        XIMPTELEPATHY@gmail.com
-MixedUserName          XIMPteLePathy@gmail.com
-MaxCharUserName        abcd123456abcd123456abcd123456@gmail.com
-MaxCharIdPassword      nokia123
-MaxCharExceedUserName  abcd123456abcd123456abcd123456abcd123456abcd123456@gmail.com
-MinCharUserName        ab123d@gmail.com
-MinCharIdPassword      nokia123
-LessthanMincharUserName #*%4@gmail.com
-BlankUserName          " "
-UserNamewithspace       ximptelepathy @gmail.com 
-SpecialCharUserName    #$%^&*(*&^$#@gmail.com
-WrongDomainUserName    ximptelepathy@hello.com
-//contact management 
-Validcontact           tele1236@gmail.com
-NonExistingContact     invalidxmppid@gmail.com
-BlankContact           " "
-NonDomainUserName     amsmartuknow
-
-
-Message                      Hello
-MsgSpecialChars         #^(&$@!~`+_)/>.,<|%25?
-450CharLenghthMsg          abcdefghij1234567890abcdefghij1234567890\abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890\abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890\abcdefghij1234567890abcdefghij1234567890abcdefghij1234567890\
-
-BlankMsg                  ' '
-Recipient                   junk1236@gmail.com
-Recipient1                   basu.bellary@gmail.com
-Recipient2                   ximptelepathy@gmail.com
-Recipient3                   me.papillon@gmail.com
-InvalidRecipientId          invalidxmppid@gmail.com
-OfflineContact            offline45@gmail.com
-
-statustext               i am always available
-InstantMessaging        instant-messaging
-DeviceName              mobile_phone
-Onlinestatus            T
-UserAvailibility1        0  //NPresenceInfo::ENotAvailable
-UserAvailibility2        1  //NPresenceInfo::EBusy
-UserAvailibility3        2  //0NPresenceInfo::EAvailable
-UserAvailibilityText1    I am available
-UserAvailibilityText2    I am busy 
-UserAvailibilityText3    I am away
-Language                PreferredLanguage
-StatusContentfield      StatusContent
-DirectContentfield     DirectContent
-ContentTypefield,      ContentType
-
-// ClientInfo attribute value tags
-ClientInfo             ClientInfo
-ClientType             ClientType
-ClientLanguage         Language
-DevManufacturer        DevManufacturer
-ClientProducer         ClientProducer
-DeviceModel            Model
-ClientVersion          ClientVersion
-ClientTypeMobilePhone  MOBILE_PHONE
-ClientTypeComputer     COMPUTER
-ClientTypePDA         PDA
-ClientTypeCLI         CLI
-ClientTypeOther       OTHER
-
-StatusMoodfield       StatusMood
-Aliasfield            Alias
-Age                    Age
-
-//Presence Attributes
-Registration           Registration
-TimeZone              TimeZone
-GeoLocation          GeoLocation
-Address              Address
-FreeTextLocation     FreeTextLocation
-Plmn                 PLMN
-PreferredContacts   PreferredContacts
-PreferredLanguage   PreferredLanguage
-StatusMood          StatusMood
-ContactInfo         ContactInfo
-
-// StatusText attribute value tags
-StatusTextfield     StatusText
-
-// Online Status attribute value tags
-OnlineStatusfield     OnlineStatus
-
-
-//avtar file
-AVATARFILE       C:\data\Images\test.jpg
-
-[Enddefine]
-// ossadaptation related test cases
-
-
-[Test]
-title GetSearchKeyEnumL
-create ossadapmt ossadap
-ossadap GetSearchKeyEnumL USERNAME PASSWORD SETTINGSID 
-delete ossadap
-[Endtest]
-
-
-[Test]
-title GetSearchKeyLabelL
-create ossadapmt ossadap
-ossadap GetSearchKeyLabelL USERNAME PASSWORD SETTINGSID 
-delete ossadap
-[Endtest]
-
-
-[Test]
-title GetSearchKeyEnumNLabelL
-create ossadapmt ossadap
-ossadap GetSearchKeyEnumNLabelL USERNAME PASSWORD SETTINGSID 
-delete ossadap
-[Endtest]
-
-
-[Test]
-title SecondSearchL
-create ossadapmt ossadap
-ossadap SecondSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-
-
-[Test]
-title SearchAndAddToIML
-create ossadapmt ossadap
-ossadap SearchAndAddToIML USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title Login
-create ossadapmt ossadap 
-ossadap Login USERNAME PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginInvalidUser
-create ossadapmt ossadap
-ossadap Login_InvalidData InvalidUserName PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginWrongPassword
-create ossadapmt ossadap
-ossadap Login_InvalidData USERNAME WrongPassword SERVICE_ID 
-delete ossadap
-[Endtest] 
-[Test]
-title Login_Logout_sequential
-create ossadapmt ossadap
-ossadap Login_Logout_sequential USERNAME PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginUserIdCapital
-create ossadapmt ossadap
-ossadap Login CapitalUserName PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginMixedLetterId
-create ossadapmt ossadap
-ossadap Login MixedUserName PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginMaxCharId
-create ossadapmt ossadap
-ossadap Login MaxCharUserName MaxCharIdPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginMaxCharExceeded
-create ossadapmt ossadap
-ossadap Login_InvalidData MaxCharExceedUserName WrongPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginMinCharId
-create ossadapmt ossadap
-ossadap Login MinCharUserName MinCharIdPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginLessthanMinCharId
-create ossadapmt ossadap
-ossadap Login_InvalidData LessthanMincharUserName MinCharIdPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginBlankUserId
-create ossadapmt ossadap
-ossadap Login_InvalidData BlankUserName MinCharIdPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginUserIdwithSpace
-create ossadapmt ossadap
-ossadap Login_InvalidData UserNamewithspace PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title LoginInvalidSettingsId
-create ossadapmt ossadap
-ossadap Login_InvalidData USERNAME PASSWORD InvalidSettingsId
-delete ossadap
-[Endtest]
-
-[Test]
-title Unbind
-create ossadapmt ossadap
-ossadap Unbind USERNAME PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title Get contacts
-create ossadapmt ossadap
-ossadap GetContacts USERNAME PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title Fetch_300_Contacts
-create ossadapmt ossadap
-ossadap GetContacts 300contactsUsername 300contactsPassword SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title FetchEmptyContactList
-create ossadapmt ossadap
-ossadap GetContacts NoContactUserName NoContactPassword SERVICE_ID 
-delete ossadap
-[Endtest]
-
-[Test]
-title Send message
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID Message Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Send empty message
-create ossadapmt ossadap
-ossadap Sendemptymessage USERNAME PASSWORD SERVICE_ID Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Sendmessage_invaliduserid
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID Message InvalidRecipientId
-delete ossadap
-[Endtest] 
-
-[Test]
-title Sendmessage_specialchars 
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID MsgSpecialChars Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Sendmessage_offlinecontact
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID Message OfflineContact
-delete ossadap
-[Endtest] 
-
-[Test]
-title Sendmessage_longmessage
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID LongMsg Recipient 
-delete ossadap
-[Endtest] 
-
-[Test]
-title Send_450_char_message
-create ossadapmt ossadap
-ossadap Sendmessage USERNAME PASSWORD SERVICE_ID 450CharLenghthMsg Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Send_ten_messages
-create ossadapmt ossadap
-ossadap Send_ten_messages USERNAME PASSWORD SERVICE_ID Message Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Send_twenty_messages
-create ossadapmt ossadap
-ossadap Send_twenty_messages USERNAME PASSWORD SERVICE_ID Message Recipient
-delete ossadap
-[Endtest] 
-
-[Test]
-title Sendmessage_multiplecontacts
-create ossadapmt ossadap
-ossadap Sendmessage_multiplecontacts USERNAME PASSWORD SERVICE_ID Message Recipient Recipient1 Recipient2 Recipient3
-delete ossadap
-[Endtest]
-
-[Test]
-title Receivemessage
-create ossadapmt ossadap
-ossadap Receivemessage USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest] 
-
-[Test]
-title Receiveemptymessage
-create ossadapmt ossadap
-ossadap Receiveemptymessage USERNAME PASSWORD SERVICE_ID 
-delete ossadap
-[Endtest] 
-
-[Test]
-title Receivelongmessage
-create ossadapmt ossadap
-ossadap Receivemessage USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest] 
-
-[Test]
-title Receive_450_char_message
-create ossadapmt ossadap
-ossadap Receivemessage USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest] 
-
-[Test]
-title Receivemessage_specialchars
-create ossadapmt ossadap
-ossadap Receivemessage USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest] 
-
-[Test]
-title Receive_ten_messages
-create ossadapmt ossadap
-ossadap Receive_ten_messages USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest]
-
-[Test]
-title Receive_twenty_message
-create ossadapmt ossadap
-ossadap Receive_twenty_message USERNAME PASSWORD SERVICE_ID Message
-delete ossadap
-[Endtest]  
-
-[Test]
-title Add_valid_conatct
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID Validcontact
-delete ossadap
-[Endtest]  
-
-[Test]
-title AddNonExistingContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID NonExistingContact
-delete ossadap
-[Endtest] 
- 
-[Test]
-title AddMaxCharContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID MaxCharUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title AddMoreThanMaxCharContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID MaxCharExceedUserName
-delete ossadap
-[Endtest] 
- 
-[Test]
-title AddMinCharContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID MinCharUserName
-delete ossadap
-[Endtest] 
- 
-[Test]
-title AddLessThanMinCharContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID LessthanMincharUserName
-delete ossadap
-[Endtest] 
- 
-[Test]
-title AddSpecialCharInvalidContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID SpecialCharUserName
-delete ossadap
-[Endtest] 
- 
-[Test]
-title AddBlankContact
-create ossadapmt ossadap
-ossadap Add_Blank_Conatct USERNAME PASSWORD SERVICE_ID 
-delete ossadap
-[Endtest] 
-
-
-[Test]
-title AddWithoutDomainContact
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID NonDomainUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title AddAlreadyAddedConatct
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID Validcontact 
-delete ossadap
-[Endtest] 
-
-[Test]
-title AddWrongDomainContactL
-create ossadapmt ossadap
-ossadap Add_conatct USERNAME PASSWORD SERVICE_ID WrongDomainUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title Delete_valid_conatct
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID Validcontact
-delete ossadap
-[Endtest] 
-
-
-[Test]
-title DeleteNonExistingContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID NonExistingContact
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteMaxCharContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID MaxCharUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteMoreThanMaxCharContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID MaxCharExceedUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteMinCharContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID MinCharUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteLessThanMinxCharContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID LessthanMincharUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteSpecialCharInvalidContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID SpecialCharUserName
-delete ossadap
-[Endtest]
- 
-[Test]
-title DeleteBlankContact
-create ossadapmt ossadap
-ossadap Delete_Blank_Conatct USERNAME PASSWORD SERVICE_ID
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteWithoutDomainContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID NonDomainUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title DeleteWrongDomainContact
-create ossadapmt ossadap
-ossadap Delete_conatct USERNAME PASSWORD SERVICE_ID WrongDomainUserName
-delete ossadap
-[Endtest] 
-
-[Test]
-title Publish_ownpresence_available
-create ossadapmt ossadap
-ossadap Publish_ownpresence USERNAME PASSWORD SERVICE_ID UserAvailibility1 UserAvailibilityText1
-delete ossadap
-[Endtest] 
-
-[Test]
-title Publish_ownpresence_busy
-create ossadapmt ossadap
-ossadap Publish_ownpresence USERNAME PASSWORD SERVICE_ID UserAvailibility2 UserAvailibilityText2
-delete ossadap
-[Endtest] 
-
-[Test]
-title Publish_ownpresence_not_available
-create ossadapmt ossadap
-ossadap Publish_ownpresence USERNAME PASSWORD SERVICE_ID UserAvailibility3 UserAvailibilityText3
-delete ossadap
-[Endtest] 
-
-[Test]
-title Publish_ownpresence_emptytext
-create ossadapmt ossadap
-ossadap Publish_ownpresence_emptytext USERNAME PASSWORD SERVICE_ID UserAvailibility3 
-delete ossadap
-[Endtest] 
-
-[Test]
-title AcceptAddnotificationRequest
-create ossadapmt ossadap
-ossadap AcceptnotificationRequest USERNAME PASSWORD SERVICE_ID  
-delete ossadap
-[Endtest] 
-
-[Test]
-title RejectAddnotificationRequest
-create ossadapmt ossadap
-ossadap RejectAddnotificationRequest USERNAME PASSWORD SERVICE_ID  
-delete ossadap
-[Endtest] 
-
-[Test]
-title ImOperations_Coverage
-create ossadapmt ossadap
-ossadap ImOperations_Coverage USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title SimpleSearchL
-create ossadapmt ossadap
-ossadap SimpleSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title MultipleSearchL
-create ossadapmt ossadap
-ossadap MultipleSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title NoResultSearchL
-create ossadapmt ossadap
-ossadap NoResultSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title ManyResultsSearchL
-create ossadapmt ossadap
-ossadap ManyResultsSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title BlankSearchL
-create ossadapmt ossadap
-ossadap BlankSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title MaxCharSearchL
-create ossadapmt ossadap
-ossadap MaxCharSearchL	 USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title SpecialCharSearchL
-create ossadapmt ossadap
-ossadap SpecialCharSearchL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title SearchEmailIDL
-create ossadapmt ossadap
-ossadap SearchEmailIDL USERNAME PASSWORD SERVICE_ID Message Recipient Validcontact
-delete ossadap
-[Endtest]
-
-[Test]
-title Set_Avtar
-create ossadapmt ossadap
-ossadap SetAvtar USERNAME PASSWORD SERVICE_ID AVATARFILE
-delete ossadap
-[Endtest] 
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/eabi/ossadapmtu.def	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +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:  bld.inf
-*
-*/
-
-
-
-PRJ_PLATFORMS
-// specify the platforms your component needs to be built for here
-// defaults to WINS MARM so you can ignore this if you just build these
-DEFAULT
-
-PRJ_TESTEXPORTS
-// NOTE: If using ARS requirements all export operations should be done under this.
-// 'abld test export'
-../conf/ossadapmt.cfg /epoc32/winscw/c/TestFramework/ossadapmt.cfg
-PRJ_EXPORTS
-// Specify the source file followed by its destination here
-// copy will be used to copy the source file to its destination
-// If there's no destination then the source file will be copied
-// to the same name in /epoc32/include
-// Example: 
-/*
-/agnmodel/inc/AGMCOMON.H
-*/
-
-PRJ_TESTMMPFILES
-// NOTE: If using ARS requirements .mmp file operation should be done under this.
-// 'abld test build'
-ossadapmt.mmp
-PRJ_MMPFILES
-// Specify the .mmp files required for building the important component
-// releasables.
-//
-// Specify "tidy" if the component you need to build doesn't need to be
-// released. Specify "ignore" if the MMP file exists but should be
-// ignored.
-
-
-
-
-//  End of File
\ No newline at end of file
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/group/ossadapmt.mmp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2007 - 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:  ossadapmt.mmp
-*
-*/
-
-
-#if defined(__S60_)
-        // To get the OSEXT_LAYER_SYSTEMINCLUDE-definition
-        #include <platform_paths.hrh>
-#endif
-
-TARGET          ossadapmt.dll
-TARGETTYPE      dll
-UID             0x1000008D 0x101FB3E3
-
-CAPABILITY      ALL -TCB
-/* Remove comments and replace 0x00000000 with correct vendor id */
-// VENDORID     0x00000000
-/* Remove comments and replace 0x00000000 with correct secure id */
-// SECUREID     0x00000000
-
-//TARGETPATH      ?target_path
-DEFFILE         ossadapmt.def
-
-SOURCEPATH      ../src
-SOURCE          ossadapmt.cpp
-SOURCE          ossadapmtBlocks.cpp
-SOURCE          uscontextobserver.cpp
-//RESOURCE        resource_file
-//RESOURCE        resource_file2
-
-USERINCLUDE     ../inc
-
-SYSTEMINCLUDE   /epoc32/include/ecom 
-
-MW_LAYER_SYSTEMINCLUDE
-
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         bafl.lib
-LIBRARY         aknnotify.lib
-LIBRARY         efsrv.lib
-LIBRARY         commdb.lib
-LIBRARY         stiftestengine.lib
-LIBRARY       	flogger.lib
-LIBRARY         ecom.lib
-LIBRARY 				ximpdatamodel.lib
-LIBRARY         charconv.lib
-
-LANG            SC
-
-/*
-START WINS      
-?wins_specific_information
-END
-
-START MARM
-?marm_specific_information
-END
-*/
-// Other possible keywords:
- 
-// DOCUMENT     ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
-/*
-START BITMAP ?target
-TARGETPATH   ?emulated_path_on_target_machine
-HEADER
-SOURCE       ?color_depth ?source_bitmap
-END
-*/
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/group/ossadaptmt.pkg	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: ossadaptmt.pkg
-;
-;Header
-#{"TestOssAdaptation"}, (0x101FB3E3), 1, 2, 3, TYPE=SP
-
-;Language - standard language definitions
-&EN
-
-;Vendor ID
-:"Nokia Corporation"
-
-;Localised vendor
-%{"Vendor-EN"}
-
-;Supports Series 60 v 0.9
-[0x101F7961], 0, 0, 0, {"Series60ProductID"}
-
-
-;INI FILE
-"..\init\testframework.ini"        			-"c:\Testframework\testframework.ini"
-
-;CFG FILES
-"..\conf\ossadapmt.cfg"        			-"c:\Testframework\ossadapmt.cfg"
-
-;ossadaptmt_test dll files
-
-"\EPOC32\RELEASE\ARMV5\UREL\ossadapmt.dll" 	-"!:\sys\bin\ossadapmt.dll"
-    
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/cuserafter.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +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:  Active object based wait.
-*
-*/
-
-#ifndef CUSERAFTER_H__
-#define CUSERAFTER_H__
-
-// INCLUDES
-#include <e32base.h>
-
-
-// CLASS DESCRIPTION
-
-/**
- * Active object based wait.
- *
- * Similar like User::After() but doesn't block
- * whole thread, but current RunL() with
- * CActiveSchedulerWait.
- */
-
-class CUserAfter : public CTimer
-	{
-
-	public: //Construction
-		static inline CUserAfter* NewL();
-		static inline CUserAfter* NewLC();
-		~CUserAfter();
-
-
-	public: //Wait support
-
-		/**
-		 * Static "one shot" wait method.
-		 */
-		static inline void AfterL ( TInt aWaitTimeMicroSeconds );
-		/**
-		 * Static "one shot" wait method.
-		 */
-		static inline void After8HrsL ();
-
-		/**
-		 * Member wait method.
-		 */
-		inline void After ( TInt aWaitTimeMicroSeconds );
-
-
-	private:
-		CUserAfter();
-
-		void RunL();
-		void RunError();
-		void DoCancel();
-
-
-	private:    //data
-		CActiveSchedulerWait iWait;
-
-	};
-
-
-
-
-// -----------------------------------------------------------------------------
-// CUserAfter public functions
-// -----------------------------------------------------------------------------
-//
-inline CUserAfter* CUserAfter::NewL()
-	{
-	CUserAfter* self = CUserAfter::NewLC();
-	CleanupStack::Pop ( self );
-	return self;
-	}
-
-inline CUserAfter* CUserAfter::NewLC()
-	{
-	CUserAfter* self = new ( ELeave ) CUserAfter();
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	return self;
-	}
-
-
-inline CUserAfter::~CUserAfter()
-	{
-	CTimer::Cancel();
-	}
-
-inline void CUserAfter::After ( TInt aWaitTimeMicroSeconds )
-	{
-	CTimer::After ( aWaitTimeMicroSeconds );
-	iWait.Start();
-	}
-
-
-inline void CUserAfter::AfterL ( TInt aWaitTimeMicroSeconds )
-	{
-	CUserAfter* after = CUserAfter::NewL();
-	after->After ( aWaitTimeMicroSeconds );
-	delete after;
-	}
-
-inline void CUserAfter::After8HrsL (  )
-	{
-	CUserAfter* after = CUserAfter::NewL();
-	//aWaitTimeMicroSeconds range is +-2147483647, which is +-35 minutes, 47 seconds.
-	for(TInt i =0 ; i<=16 ; i++)	
-	{
-		after->After ( 2147483647 );
-	}
-	delete after;
-	}
-
-
-// -----------------------------------------------------------------------------
-// CUserAfter private functions
-// -----------------------------------------------------------------------------
-//
-inline CUserAfter::CUserAfter()
-		: CTimer ( CActive::EPriorityStandard )
-	{
-	CActiveScheduler::Add ( this );
-	}
-
-
-inline void CUserAfter::RunL()
-	{
-	iWait.AsyncStop();
-	Cancel();
-	}
-
-inline void CUserAfter::RunError()
-	{
-	}
-
-inline void CUserAfter::DoCancel()
-	{
-	iWait.AsyncStop();
-	CTimer::DoCancel();
-	}
-
-
-#endif // CUSERAFTER_H__
-
-// End of File
-
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/ossadapmt.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
-* Copyright (c) 2002 - 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:  ossadapmt.h
-*
-*/
-
-
-
-#ifndef OSSADAPMT_H
-#define OSSADAPMT_H
-
-//  INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <flogger.h>
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-// Logging path
-_LIT ( KossadapmtLogPath, "\\logs\\testframework\\ossadapmt\\" );
-// Log file
-_LIT ( KossadapmtLogFile, "ossadapmt.txt" );
-_LIT ( KossadapmtLogFileWithTitle, "ossadapmt_[%S].txt" );
-
-// FUNCTION PROTOTYPES
-//?type ?function_name(?arg_list);
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-class Cossadapmt;
-
-enum TSearch 
-	{
-	ESimpleSearch,
-	EMultipleSearch,
-	ESearchNoResults,
-	ESearchManyResults,
-	ESearchBlank,
-	ESearchMaxChars,
-	ESearchSpecialChars,
-	ESearchEmailid,
-	ESearchAndAddToIm,
-	ESecondSearch,
-	EGetSearchKeyEnum,
-	EGetSearchKeyLabel,
-	EGetSearchKeyEnumNLabel,		
-	};
-
-// DATA TYPES
-//enum ?declaration
-//typedef ?declaration
-//extern ?data_type;
-
-// CLASS DECLARATION
-
-/**
-*  Cossadapmt test class for STIF Test Framework TestScripter.
-*  ?other_description_lines
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS ( Cossadapmt ) : public CScriptBase
-	{
-
-public:  // Constructors and destructor
-
-	/**
-	* Two-phased constructor.
-	*/
-	static Cossadapmt* NewL ( CTestModuleIf& aTestModuleIf );
-
-	/**
-	* Destructor.
-	*/
-	virtual ~Cossadapmt();
-
-public: // New functions
-
-	/**
-	* ?member_description.
-	* @since ?Series60_version
-	* @param ?arg1 ?description
-	* @return ?description
-	*/
-	//?type ?member_function( ?type ?arg1 );
-
-public: // Functions from base classes
-
-	/**
-	* From CScriptBase Runs a script line.
-	* @since ?Series60_version
-	* @param aItem Script line containing method name and parameters
-	* @return Symbian OS error code
-	*/
-	virtual TInt RunMethodL ( CStifItemParser& aItem );
-
-protected:  // New functions
-
-	/**
-	* ?member_description.
-	* @since ?Series60_version
-	* @param ?arg1 ?description
-	* @return ?description
-	*/
-	//?type ?member_function( ?type ?arg1 );
-
-protected:  // Functions from base classes
-
-	/**
-	* From ?base_class ?member_description
-	*/
-	//?type ?member_function();
-
-private:
-
-	/**
-	* C++ default constructor.
-	*/
-	Cossadapmt ( CTestModuleIf& aTestModuleIf );
-
-	/**
-	* By default Symbian 2nd phase constructor is private.
-	*/
-	void ConstructL();
-
-	// Prohibit copy constructor if not deriving from CBase.
-	// ?classname( const ?classname& );
-	// Prohibit assigment operator if not deriving from CBase.
-	// ?classname& operator=( const ?classname& );
-
-	/**
-	* Frees all resources allocated from test methods.
-	* @since ?Series60_version
-	*/
-	void Delete();
-
-	/**
-	* Test methods are listed below.
-	*/
-
-	/**
-	* Bind test method.
-	* @since ?Series60_version
-	* @param aItem Script line containing parameters.
-	* @return Symbian OS error code.
-	*/
-	virtual TInt LoginL ( CStifItemParser& aItem );
-	virtual TInt Login_InvalidDataL ( CStifItemParser& aItem );
-	virtual TInt Login8HrsLogoutL ( CStifItemParser& aItem );
-	virtual TInt LoginLogout_LoginLogoutL ( CStifItemParser& aItem );
-	/**
-	* UnBind test method.
-	*/
-	virtual TInt UnBindL ( CStifItemParser& aItem );
-	/**
-	* Fetch contacts method
-	*/
-	virtual TInt GetContactsL ( CStifItemParser& aItem );
-
-	/**
-	* Send message test method.
-	*/
-	virtual TInt SendMessageL ( CStifItemParser& aItem );
-	virtual TInt SendEmptyMessageL ( CStifItemParser& aItem );
-	virtual TInt SendTenMessageL ( CStifItemParser& aItem );
-	virtual TInt SendTwentyMessageL ( CStifItemParser& aItem );
-	virtual TInt SendMessage_MultipleContactsL ( CStifItemParser& aItem );
-
-	/**
-	* Receive message test method
-	*/
-	virtual TInt ReceiveMessageL ( CStifItemParser& aItem );
-	virtual TInt ReceiveEmptyMessageL ( CStifItemParser& aItem );
-	virtual TInt ReceiveTenMessageL ( CStifItemParser& aItem );
-	virtual TInt ReceiveTwentyMessageL ( CStifItemParser& aItem );
-
-	/**
-	*contact list manangement test methods
-	*/
-	virtual TInt AddConatctL ( CStifItemParser& aItem );
-	virtual TInt AcceptnotificationRequestL ( CStifItemParser& aItem );
-	virtual TInt AddBlankConatctL ( CStifItemParser& aItem );
-	virtual TInt AddBlankConatct1L ( CStifItemParser& aItem );
-	
-    virtual TInt DeleteConatctL ( CStifItemParser& aItem );
-    virtual TInt DeleteBlankConatctL ( CStifItemParser& aItem );
-   /**
-	* Presence publishing test method
-	*/
-	virtual TInt PublishOwnPresenceL ( CStifItemParser& aItem );
-	virtual TInt PublishOwnPresenceEmptyTextL ( CStifItemParser& aItem );
-	virtual TInt RejectAddnotificationRequestL ( CStifItemParser& aItem );
-	virtual TInt ImOperationsCoverageL ( CStifItemParser& aItem );
-	
-	virtual TInt SearchL ( CStifItemParser& aItem, TSearch aSearchType );
-	virtual TInt SimpleSearchL( CStifItemParser& aItem );
-	virtual TInt MultipleSearchL( CStifItemParser& aItem );
-	virtual TInt NoResultSearchL( CStifItemParser& aItem );
-	virtual TInt ManyResultsSearchL( CStifItemParser& aItem );
-	virtual TInt BlankSearchL( CStifItemParser& aItem );
-	virtual TInt MaxCharSearchL( CStifItemParser& aItem );
-	virtual TInt SpecialCharSearchL( CStifItemParser& aItem );
-	virtual TInt SearchEmailIDL( CStifItemParser& aItem );
-   	virtual TInt SearchAndAddToIML( CStifItemParser& aItem );
-   	virtual TInt SecondSearchL( CStifItemParser& aItem );
-   	virtual TInt GetSearchKeyEnumL( CStifItemParser& aItem );
-   	virtual TInt GetSearchKeyLabelL( CStifItemParser& aItem );
-   	virtual TInt GetSearchKeyEnumNLabelL( CStifItemParser& aItem );
-    virtual TInt SetAvtarL( CStifItemParser& aItem );
-public:     // Data
-	// ?one_line_short_description_of_data
-	//?data_declaration;
-
-protected:  // Data
-	// ?one_line_short_description_of_data
-	//?data_declaration;
-
-private:    // Data
-
-	// ?one_line_short_description_of_data
-	//?data_declaration;
-
-	// Reserved pointer for future extension
-	//TAny* iReserved;
-
-public:     // Friend classes
-	//?friend_class_declaration;
-
-protected:  // Friend classes
-	//?friend_class_declaration;
-
-private:    // Friend classes
-	//?friend_class_declaration;
-
-	};
-
-class TOssAdapMtLogger
-	{
-
-	public: // New functions
-		/**
-		    * Writes log to log file
-		    */
-		static void Log ( TRefByValue<const TDesC> aFmt, ... );
-
-	};
-
-
-
-#endif      // OSSADAPMT_H
-
-// End of File
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/inc/uscontextobserver.h	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) 2007-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: uscontextobserver.h
-*
-*/
-
-
-#ifndef USCONTEXTOBSERVER_H__
-#define USCONTEXTOBSERVER_H__
-
-
-// INCLUDES
-#include <e32base.h>
-#include <ximpcontextobserver.h>
-
-_LIT( KAddContactFileName, "c:\\add_contact.txt" );
-
-// CLASS DESCRIPTION
-
-/**
- * Presence context observer for usage scenario tests.
- */
-
-class CUSContextObserver : public CBase,
-			public MXIMPContextObserver
-	{
-
-	public:
-		static CUSContextObserver* CUSContextObserver::NewLC();
-		~CUSContextObserver();
-
-	private:
-		CUSContextObserver();
-
-
-	public:
-
-		/**
-		 * Method to wait with CActiveSchedulerWait
-		 * the given request completion. If request
-		 * is completed with error, leaves with failure code.
-		 *
-		 * NOTE! Only one request can be waited at time.
-		 *
-		 * @param aReqToWait The request to wait.
-		 */
-		void WaitOpToCompleteL ( const TXIMPRequestId& aReqToWait );
-
-
-
-	private:  //From MXIMPContextObserver
-
-		void HandlePresenceContextEvent ( const MXIMPContext& aContext,
-		                                  const MXIMPBase& aEvent );
-
-
-	private:  //Data
-
-		//OWN: Active scheduler wait for waiting the completion
-		CActiveSchedulerWait    iWait;
-
-		//OWN: Request ID identifying request to wait
-		TXIMPRequestId    iReqToWait;
-
-		//OWN: Result code from waited request
-		TInt    iReqResult;
-		TBuf<50>  gid[10];
-		TInt   gidcount;
-
-	};
-
-
-
-#endif //USCONTEXTOBSERVER_H__
-
-
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/init/TestFramework.ini	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-#
-# This is STIF initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-#	- Set Test Reporting mode. TestReportMode's possible values are:
-#		+ 'Summary': Summary of the tested test cases.
-#		+ 'Environment': Hardware and software info.
-#		+ 'TestCases': Test case report.
-#		+ 'FullReport': Set of all above ones.
-#		+ Example 'TestReportMode= Summary TestCases'
-#
-# 	- CreateTestReport setting controls report creation mode
-#		+ YES, Test report will created.
-#		+ NO, No Test report.
-#
-# 	- File path indicates the base path of the test report.
-# 	- File name indicates the name of the test report.
-#
-# 	- File format indicates the type of the test report.
-#		+ TXT, Test report file will be txt type, for example 'TestReport.txt'.
-#		+ HTML, Test report will be html type, for example 'TestReport.html'.
-#
-# 	- File output indicates output source of the test report.
-#		+ FILE, Test report logging to file.
-#		+ RDEBUG, Test report logging to using rdebug.
-#
-# 	- File Creation Mode indicates test report overwriting if file exist.
-#		+ OVERWRITE, Overwrites if the Test report file exist.
-#		+ APPEND, Continue logging after the old Test report information if
-#                 report exist.
-# 	- Sets a device reset module's dll name(Reboot).
-#		+ If Nokia specific reset module is not available or it is not correct one
-#		  StifHWResetStub module may use as a template for user specific reset
-#		  module.
-# 	- Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-#		DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport		# Possible values are: 'Empty', 'Summary', 'Environment',
-                                                               'TestCases' or 'FullReport'
-
-CreateTestReport= YES			# Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT			# Possible values: TXT or HTML
-TestReportOutput= FILE			# Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE	# Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone	# Possible values are:
-						# 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
-					  	# 'stifmeasurementplugin01', 'stifmeasurementplugin02',
-					  	# 'stifmeasurementplugin03', 'stifmeasurementplugin04',
-					  	# 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0                              # Default timeout value for each test case. In milliseconds
-
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags 
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= C:\testframework\ossadapmt.cfg
-[End_Module]
-
-# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuleXXX used initialization file
-#IniFile= c:\testframework\init.txt
-
-#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
-# 	Hardware and emulator environment logging path and styles can
-# 	be configured from here to overwrite the Logger's implemented values.
-#	
-#	Settings description:
-#	- Indicates option for creation log directory/directories. If log directory/directories
-#         is/are not created by user they will make by software.
-#		+ YES, Create log directory/directories if not allready exist.
-#		+ NO, Log directory/directories not created. Only created one is used.
-#
-#	- Overwrite emulator path setting.
-#		+ Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined 
-#		           Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-#		           will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-#	- Overwrite emulator's logging format.
-#		+ TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-#		+ HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-#	- Overwrited emulator logging output source.
-#		+ FILE, Logging to file(s).
-#		+ RDEBUG, Logging to using rdebug(s).
-#
-#	- Overwrite hardware path setting (Same description as above in emulator path).
-#	- Overwrite hardware's logging format(Same description as above in emulator format).
-#	- Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-#	- File Creation Mode indicates file overwriting if file exist.
-#		+ OVERWRITE, Overwrites if file(s) exist.
-#		+ APPEND, Continue logging after the old logging information if file(s) exist.
-#
-#	- Will thread id include to the log filename.
-#		+ YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-#		+ NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-#	- Will time stamps include the to log file.
-#		+ YES, Time stamp added to each line in log file(s). Time stamp is 
-#                 for example'12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No time stamp(s).
-#
-#	- Will line breaks include to the log file.
-#		+ YES, Each logging event includes line break and next log event is in own line.
-#		+ NO, No line break(s).
-#
-#	- Will event ranking include to the log file.
-#		+ YES, Event ranking number added to each line in log file(s). Ranking number
-#                 depends on environment's tics, for example(includes time stamp also)
-#                 '012   12.Nov.2003 115958    LOGGING INFO'
-#		+ NO, No event ranking.
-#
-#	- Will write log file in unicode format.
-#		+ YES, Log file will be written in unicode format
-#		+ NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-#CreateLogDirectories= YES    # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML         # Possible values: TXT or HTML
-#EmulatorOutput= FILE         # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML         # Possible values: TXT or HTML
-#HardwareOutput= FILE         # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE  # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES       # Possible values: YES or NO
-#WithTimeStamp= YES           # Possible values: YES or NO
-#WithLineBreak= YES           # Possible values: YES or NO
-#WithEventRanking= YES        # Possible values: YES or NO
-
-#FileUnicode= YES             # Possible values: YES or NO
-#AddTestCaseTitle= YES        # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/src/ossadapmt.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,208 +0,0 @@
-/*
-* Copyright (c) 2002 - 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:  ossadapmt.cpp
-*
-*/
-
-
-
-// INCLUDE FILES
-#include <StifTestInterface.h>
-#include "ossadapmt.h"
-#include <flogger.h>
-#include <SettingServerClient.h>
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-//          ?value_n: ?description_line1
-//                    ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
-    ?arg_type arg,  // ?description
-    ?arg_type arg)  // ?description
-    {
-
-    ?code  // ?comment
-
-    // ?comment
-    ?code
-    }
-*/
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::Cossadapmt
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-Cossadapmt::Cossadapmt (
-    CTestModuleIf& aTestModuleIf ) :
-		CScriptBase ( aTestModuleIf )
-	{
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void Cossadapmt::ConstructL()
-	{
-	//Read logger settings to check whether test case name is to be
-	//appended to log file name.
-	RSettingServer settingServer;
-	TInt ret = settingServer.Connect();
-
-	if ( ret != KErrNone )
-		{
-		User::Leave ( ret );
-		}
-
-	// Struct to StifLogger settigs.
-	TLoggerSettings loggerSettings;
-
-	// Parse StifLogger defaults from STIF initialization file.
-	ret = settingServer.GetLoggerSettings ( loggerSettings );
-
-	if ( ret != KErrNone )
-		{
-		User::Leave ( ret );
-		}
-
-	// Close Setting server session
-	settingServer.Close();
-
-	TFileName logFileName;
-
-	if ( loggerSettings.iAddTestCaseTitle )
-		{
-		TName title;
-		TestModuleIf().GetTestCaseTitleL ( title );
-		logFileName.Format ( KossadapmtLogFileWithTitle, &title );
-		}
-	else
-		{
-		logFileName.Copy ( KossadapmtLogFile );
-		}
-
-	iLog = CStifLogger::NewL ( KossadapmtLogPath,
-
-	                           logFileName,
-	                           CStifLogger::ETxt,
-	                           CStifLogger::EFile,
-	                           EFalse );
-	TestModuleIf().SetBehavior ( CTestModuleIf::ETestLeaksHandles );
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-Cossadapmt* Cossadapmt::NewL (
-    CTestModuleIf& aTestModuleIf )
-	{
-	Cossadapmt* self = new ( ELeave ) Cossadapmt ( aTestModuleIf );
-
-	CleanupStack::PushL ( self );
-	self->ConstructL();
-	CleanupStack::Pop();
-
-	return self;
-
-	}
-
-// Destructor
-Cossadapmt::~Cossadapmt()
-	{
-
-	// Delete resources allocated from test methods
-	Delete();
-
-	// Delete logger
-	delete iLog;
-
-	}
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point.
-// Returns: CScriptBase: New CScriptBase derived object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL (
-    CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework
-	{
-
-	return ( CScriptBase* ) Cossadapmt::NewL ( aTestModuleIf );
-
-	}
-
-// CONSTANTS
-const TInt KTLogBufferLength = 256;
-
-_LIT ( KTLogDir,  "osmt" );
-_LIT ( KTLogFile, "ossadapmt.txt" );
-
-void TOssAdapMtLogger::Log ( TRefByValue<const TDesC> aFmt, ... )
-	{
-	VA_LIST list;
-	VA_START ( list, aFmt );
-
-	// Print to log file
-	TBuf<KTLogBufferLength> buf;
-	buf.FormatList ( aFmt, list );
-
-	// Write to log file
-	RFileLogger::Write ( KTLogDir, KTLogFile, EFileLoggingModeAppend, buf );
-
-	}
-
-//  End of File
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/src/ossadapmtBlocks.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3168 +0,0 @@
-/*
-* Copyright (c) 2002 - 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:  ossadapmtBlocks.cpp
-*
-*/
-
-
-
-// [INCLUDE FILES] - do not remove
-#include <e32svr.h>
-#include <StifParser.h>
-#include <StifTestInterface.h>
-#include "ossadapmt.h"
-#include <ximpidentity.h>
-#include <ximpclient.h>
-#include <ximpcontext.h>
-#include <ximpobjectfactory.h>
-#include <ximpcontextobserver.h>
-#include <ximpcontextstateevent.h>
-#include <ximpprotocolinfo.h>
-#include <ximpfeatureinfo.h>
-#include <ximpserviceinfo.h>
-#include "uscontextobserver.h"
-#include <presencefeatures.h>
-#include <imfeatures.h>
-#include <presentitygroups.h>
-#include <imconversation.h>
-#include <imobjectfactory.h>
-#include <imconversationinfo.h>
-#include "cuserafter.h"
-#include <presencepublishing.h>
-#include <presencewatching.h>
-#include <presenceinfofilter.h>
-#include <presenceinfo.h>
-#include <presenceobjectfactory.h>
-#include <servicepresenceinfo.h>
-#include <personpresenceinfo.h>
-#include <presenceinfofield.h>
-#include <presenceinfofieldcollection.h>
-#include <presenceinfofieldvalueenum.h>
-#include <presenceinfofieldvaluetext.h>
-#include <presenceinfofieldvaluebinary.h>
-#include <presenceauthorization.h>
-#include <utf.h>
-#include <search.h>
-#include <searchfeature.h>
-#include <searchobjectfactory.h>
-#include <searchelement.h>
-//#include "immessageinfoimp.h"
-const TInt KProtocolUid = 0x101FB3E7; // 0x10282EE9;
-_LIT8( KInstantMessaging, "instant-messaging");
-
-// StatusText attribute value tags
-_LIT8( KStatusTextfield, "StatusText");
-
-// Online Status attribute value tags
-_LIT8( KOnlineStatusfield, "OnlineStatus" );
-_LIT ( KMsgId, "MessageID1" );
-_LIT( KContact1, "meco5555@gmail.com");
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-
-// MACROS
-//#define ?macro ?macro_def
-
-// LOCAL CONSTANTS AND MACROS
-//const ?type ?constant_var = ?constant;
-//#define ?macro_name ?macro_def
-
-// MODULE DATA STRUCTURES
-//enum ?declaration
-//typedef ?declaration
-
-// LOCAL FUNCTION PROTOTYPES
-//?type ?function_name( ?arg_type, ?arg_type );
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-
-// ============================= LOCAL FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// ?function_name ?description.
-// ?description
-// Returns: ?value_1: ?description
-//          ?value_n: ?description_line1
-//                    ?description_line2
-// -----------------------------------------------------------------------------
-//
-/*
-?type ?function_name(
-    ?arg_type arg,  // ?description
-    ?arg_type arg)  // ?description
-    {
-
-    ?code  // ?comment
-
-    // ?comment
-    ?code
-    }
-*/
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::Delete
-// Delete here all resources allocated and opened from test methods.
-// Called from destructor.
-// -----------------------------------------------------------------------------
-//
-void Cossadapmt::Delete()
-	{
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::RunMethodL (
-    CStifItemParser& aItem )
-	{
-
-	static TStifFunctionInfo const KFunctions[] =
-		{
-		// Copy this line for every implemented function.
-		// First string is the function name used in TestScripter script file.
-		// Second is the actual implementation member function.
-		ENTRY ( "SecondSearchL",Cossadapmt::SecondSearchL ), 
-		ENTRY ( "Login", Cossadapmt::LoginL ),
-		ENTRY ( "Login_InvalidData", Cossadapmt::Login_InvalidDataL ),
-		ENTRY ( "AcceptnotificationRequest", Cossadapmt::AcceptnotificationRequestL ),
-		ENTRY ( "Login_Logout_sequential", Cossadapmt::LoginLogout_LoginLogoutL ),
-		ENTRY ( "Login_8Hrs_Logout", Cossadapmt::Login8HrsLogoutL ),
-		ENTRY ( "Unbind", Cossadapmt::UnBindL ),
-		ENTRY ( "GetContacts", Cossadapmt::GetContactsL ),
-		ENTRY ( "Add_conatct", Cossadapmt::AddConatctL ),
-		ENTRY ( "Add_Blank_Conatct", Cossadapmt::AddBlankConatctL ),
-		ENTRY ( "Add_Blank_Conatct1", Cossadapmt::AddBlankConatct1L ),
-		ENTRY ( "Delete_conatct", Cossadapmt::DeleteConatctL ),
-		ENTRY ( "Delete_Blank_Conatct", Cossadapmt::DeleteBlankConatctL ),
-		ENTRY ( "Sendmessage", Cossadapmt::SendMessageL ),
-		ENTRY ( "Sendemptymessage", Cossadapmt::SendEmptyMessageL ),
-		ENTRY ( "Send_ten_messages", Cossadapmt::SendTenMessageL ),
-		ENTRY ( "Send_twenty_messages", Cossadapmt::SendTwentyMessageL ),
-		ENTRY ( "Sendmessage_multiplecontacts", Cossadapmt::SendMessage_MultipleContactsL ),
-		ENTRY ( "Receivemessage", Cossadapmt::ReceiveMessageL ),
-		ENTRY ( "Receiveemptymessage", Cossadapmt::ReceiveEmptyMessageL ),
-		ENTRY ( "Receive_ten_messages", Cossadapmt::ReceiveTenMessageL ),
-		ENTRY ( "Receive_twenty_message", Cossadapmt::ReceiveTwentyMessageL ),
-		ENTRY ( "Publish_ownpresence", Cossadapmt::PublishOwnPresenceL ),
-		ENTRY ( "Publish_ownpresence_emptytext", Cossadapmt::PublishOwnPresenceEmptyTextL ),
-		ENTRY ( "RejectAddnotificationRequest", Cossadapmt::RejectAddnotificationRequestL ),
-		ENTRY ( "ImOperations_Coverage", Cossadapmt::ImOperationsCoverageL ),
-		
-		ENTRY ( "SimpleSearchL", Cossadapmt::SimpleSearchL ),
-		ENTRY ( "MultipleSearchL", Cossadapmt::MultipleSearchL ),
-		ENTRY ( "NoResultSearchL", Cossadapmt::NoResultSearchL ),
-		ENTRY ( "ManyResultsSearchL", Cossadapmt::ManyResultsSearchL ),
-		ENTRY ( "BlankSearchL", Cossadapmt::BlankSearchL ),
-		ENTRY ( "MaxCharSearchL", Cossadapmt::MaxCharSearchL ),
-		ENTRY ( "SpecialCharSearchL", Cossadapmt::SpecialCharSearchL ),
-		ENTRY ( "SearchEmailIDL",Cossadapmt::SearchEmailIDL ),
-		ENTRY ( "SearchAndAddToIML",Cossadapmt::SearchAndAddToIML ), 
-		ENTRY ( "GetSearchKeyEnumL",Cossadapmt::GetSearchKeyEnumL ), 
-		ENTRY ( "GetSearchKeyLabelL",Cossadapmt::GetSearchKeyLabelL ), 
-		ENTRY ( "GetSearchKeyEnumNLabelL",Cossadapmt::GetSearchKeyEnumNLabelL ), 
-        ENTRY ( "SetAvtar",Cossadapmt::SetAvtarL ), 
-		//ADD NEW ENTRY HERE
-		// [test cases entries] - Do not remove
-
-		};
-
-	const TInt count = sizeof ( KFunctions ) /
-	                   sizeof ( TStifFunctionInfo );
-
-	return RunInternalL ( KFunctions, count, aItem );
-
-	}
-
-
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SearchL
-// Search test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SearchL ( CStifItemParser& aItem, TSearch aSearchType )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::LoginL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-   	
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-
-	MSearchFeature* srFeature = NULL;
-	srFeature = MSearchFeature::NewL ( presecenCtx );
-//	CleanupStack::PushL( srFeature );
-	
-	MSearch& srch=srFeature->Search();
-	MSearchObjectFactory& searchObjFact=srFeature->SearchObjectFactory();
-
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-	
-//------------------------------------------Fetch Start------------------------------------------
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	MXIMPIdentity* newGroupId = presecenCtx->ObjectFactory().NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = presecenCtx->ObjectFactory().NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-
-//------------------------------------------Fetch End------------------------------------------
-
-
-	MXIMPIdentity* searchId = presecenCtx->ObjectFactory().NewIdentityLC();
-    searchId->SetIdentityL(_L("SEARCH"));
-    
-    MXIMPIdentity* firstId = presecenCtx->ObjectFactory().NewIdentityLC();
-    
-    
-    MSearchElement* srchElement1=searchObjFact.NewSearchElementLC();
-    
-    
-    MXIMPIdentity* secondId = presecenCtx->ObjectFactory().NewIdentityLC();
-    
-    
-    MSearchElement* srchElement2=searchObjFact.NewSearchElementLC();
-    
-    
-    RPointerArray< MSearchElement > searchList;
-    CleanupClosePushL( searchList );
-    
-	switch ( aSearchType ) 
-		{
-		
-		case EGetSearchKeyEnum:
-			{
-			
-			req = srch.GetSearchKeysL();
-			eventObserver->WaitOpToCompleteL ( req );
-			
-			firstId->SetIdentityL(_L("james"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );				
-			break;
-			
-			}
-		
-		
-		case EGetSearchKeyLabel:
-			{
-			
-			req = srch.GetSearchKeysL();
-			eventObserver->WaitOpToCompleteL ( req );
-			
-			MXIMPIdentity* label = presecenCtx->ObjectFactory().NewIdentityLC();
-			label->SetIdentityL( _L( "Family Name" ) );
-			
-			secondId->SetIdentityL(_L("BOND"));
-			
-		    srchElement2->SetRequestL( *secondId, *label );
-		    
-			searchList.Append( srchElement1 );
-			searchList.Append( srchElement2 ); 
-		    
-		    req=srch.SearchL(*searchId,searchList,10 );
-		    
-		    CleanupStack::PopAndDestroy ();
-		    
-			break;		
-			
-			}
-		
-		
-		case EGetSearchKeyEnumNLabel:
-			{
-			
-			req = srch.GetSearchKeysL();
-			eventObserver->WaitOpToCompleteL ( req );
-			
-			
-			firstId->SetIdentityL(_L("james"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			secondId->SetIdentityL(_L("BOND"));
-			
-			MXIMPIdentity* label = presecenCtx->ObjectFactory().NewIdentityLC();
-			label->SetIdentityL( _L( "Family Name" ) );
-			
-		    srchElement2->SetRequestL( *secondId, *label );
-		    
-			searchList.Append( srchElement1 );
-			searchList.Append( srchElement2 ); 
-		    
-		    req=srch.SearchL(*searchId,searchList,10 );
-		    
-		    CleanupStack::PopAndDestroy ();
-		    
-			break;		
-			}
-		
-		
-		case ESimpleSearch :
-			{
-			
-			req = srch.GetSearchKeysL();
-			eventObserver->WaitOpToCompleteL ( req );
-			
-			firstId->SetIdentityL(_L("james"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );
-			
-			break;	
-			}
-		
-		
-		case EMultipleSearch :
-			{
-			
-			req = srch.GetSearchKeysL();
-			eventObserver->WaitOpToCompleteL ( req );
-			
-			
-			firstId->SetIdentityL(_L("james"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			secondId->SetIdentityL(_L("BOND"));
-			
-			MXIMPIdentity* label = presecenCtx->ObjectFactory().NewIdentityLC();
-			label->SetIdentityL( _L( "Family Name" ) );
-			
-		    srchElement2->SetRequestL( *secondId, *label );
-		    
-			searchList.Append( srchElement1 );
-			searchList.Append( srchElement2 ); 
-		    
-		    req=srch.SearchL(*searchId,searchList,10 );
-		    
-		    CleanupStack::PopAndDestroy ();
-		    		
-			break;	
-			}
-		
-		
-		case ESearchNoResults :
-			{
-			firstId->SetIdentityL(_L("Santhosh"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			secondId->SetIdentityL(_L("I C"));
-		    srchElement2->SetRequestL( *secondId, EUserLastName );
-		    
-			searchList.Append( srchElement1 );
-			searchList.Append( srchElement2 ); 
-		    
-		    req=srch.SearchL(*searchId,searchList,10 );
-			break;	
-			}
-	
-		
-		case ESearchManyResults :
-			{
-			firstId->SetIdentityL(_L("a"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );
-			
-			break;	
-			}
-		
-		
-		case ESearchBlank :
-			{
-			firstId->SetIdentityL(_L(""));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );	
-			break;
-			}
-		
-		
-		
-		case ESearchMaxChars :
-			{
-			firstId->SetIdentityL( _L( "fbg agh ggd sad ghda gh dhg hgasdg dh jggd gsdg g \
-			kjdg g gsd gfhsdg fhasgd hasdh ghfgahfg hgsdg dg gdgsgkj" ) );
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append( srchElement1 );
-			
-			req=srch.SearchL( *searchId,searchList,10 );
-			break;	
-			}
-		
-		
-		case ESearchSpecialChars :
-			{
-			firstId->SetIdentityL( _L( "*%#@$%^#%^&^^%)(" ) );
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append( srchElement1 );
-			
-			req=srch.SearchL( *searchId,searchList,10 );
-			
-			break;	
-			}
-		case  ESearchEmailid:
-			{
-			firstId->SetIdentityL( _L( "wordjames@chat.gizmoproject.com" ) );
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append( srchElement1 );
-			
-			req=srch.SearchL( *searchId,searchList,10 );
-			break;	
-			} 
-			
-		case  ESearchAndAddToIm:
-			{
-			firstId->SetIdentityL( _L( "sharath" ) );
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append( srchElement1 );
-			
-			req=srch.SearchL( *searchId,searchList,10 );
-			//Wait for search to complete
-			eventObserver->WaitOpToCompleteL( req );
-			CUserAfter::AfterL ( 5000000 );
-			
-			//And then call the AddToContactList
-			RFs fs;
-			RFile file;
-			TBuf8<100> buf;
-			User::LeaveIfError( fs.Connect() );
-			User::LeaveIfError( file.Open( fs, KAddContactFileName, EFileRead ) );
-			file.Read( buf );
-			file.Close();
-			fs.Close();
-			TBuf16<100> h_buf;
-			CnvUtfConverter::ConvertToUnicodeFromUtf8( h_buf, 
-											buf );
-//-------------------Adding Contact Start-----------------------------------------			
-			
-			newmemberId->SetIdentityL ( h_buf );
-			
-			req = groups.AddPresentityGroupMemberL(
-			                    *newGroupId,
-			                    *newmemberId,
-			                    KNullDesC()) ;	
-
-			//eventObserver->WaitOpToCompleteL ( req );
-			//CUserAfter::AfterL ( 5000000 );
-			//Wait at the below eventObserver->WaitOpToCompleteL( req );
-			
-			
-//-------------------Adding Contact End-----------------------------------------						
-			break;	
-			}
-		case ESecondSearch:
-			{
-			
-			firstId->SetIdentityL(_L("sharath"));
-			srchElement1->SetRequestL( *firstId, EUserFirstName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );
-			
-			eventObserver->WaitOpToCompleteL( req );
-					
-			CUserAfter::AfterL(100000);
-			searchList.Reset();
-			
-			//Second Search
-			secondId->SetIdentityL(_L("Jeppu"));
-			srchElement1->SetRequestL( *secondId, EUserLastName );
-			
-			searchList.Append(srchElement1);
-			
-			req=srch.SearchL(*searchId,searchList,10 );
-			
-			break;
-			}
-					
-		}
-    
-    CleanupStack::PopAndDestroy (); //newmemberId
-	CleanupStack::PopAndDestroy ();//newGroupId
-	CleanupStack::PopAndDestroy ();//presenceFeatures
-    
-	CleanupStack::PopAndDestroy (); //
-	CleanupStack::PopAndDestroy ();
-	CleanupStack::PopAndDestroy ();
-	
-	CleanupStack::PopAndDestroy ();
-	CleanupStack::PopAndDestroy ();
-	
-	CleanupStack::PopAndDestroy ();
-
-	eventObserver->WaitOpToCompleteL( req );
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-//	CleanupStack::PopAndDestroy ();//Search feature plugin 
-	CleanupStack::PopAndDestroy ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SearchL() End" ) );
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::GetSearchKeyEnum
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::GetSearchKeyEnumL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, EGetSearchKeyEnum );	
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::GetSearchKeyLabel
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::GetSearchKeyLabelL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, EGetSearchKeyLabel );	
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::GetSearchKeyEnumNLabel
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//	
-TInt Cossadapmt::GetSearchKeyEnumNLabelL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, EGetSearchKeyEnumNLabel );	
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SearchAndAddToIML
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-
-TInt Cossadapmt::SecondSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESecondSearch );
-	}
-
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SearchAndAddToIML
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-
-TInt Cossadapmt::SearchAndAddToIML( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchAndAddToIm );
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SimpleSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-
-TInt Cossadapmt::SimpleSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESimpleSearch );
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::MultipleSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//	
-TInt Cossadapmt::MultipleSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, EMultipleSearch );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::NoResultSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::NoResultSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchNoResults );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::ManyResultsSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ManyResultsSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchManyResults );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::BlankSearchL.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::BlankSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchBlank );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::MaxCharSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::MaxCharSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchMaxChars );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::SpecialCharSearchL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//	
-TInt Cossadapmt::SpecialCharSearchL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchSpecialChars );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::SearchEmailIDL
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//	
-TInt Cossadapmt::SearchEmailIDL( CStifItemParser& aItem )
-	{
-	return SearchL ( aItem, ESearchEmailid );	
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::LoginL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::LoginL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::LoginL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::LoginL() End" ) );
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::Login_InvalidDataL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::Login_InvalidDataL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::Login_InvalidDataL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CleanupStack::PopAndDestroy ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::Login_InvalidDataL() End" ) );
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::Login8HrsLogoutL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::Login8HrsLogoutL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::Login8HrsLogoutL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-	CUserAfter::After8HrsL ();
-
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::Login8HrsLogoutL() End" ) );
-	return KErrNone;
-
-	}
-	
-// -----------------------------------------------------------------------------
-// Cossadapmt::LoginLogout_LoginLogoutL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::LoginLogout_LoginLogoutL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::LoginLogout_Log() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called - Sequence 1" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end- Sequence 1 complete" ) );
-	
-
-/// Login --- Logout  - Sequence 2
-	//Bind context to desired presence service
-	req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called  - Sequence 2" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end - Sequence 2 complete" ) );
-
-
-	CleanupStack::PopAndDestroy ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::LoginLogout_Log() End" ) );
-	return KErrNone;
-
-	}
-	
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::GetContactsL
-// Fetch contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::GetContactsL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::GetContactsL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::GetContactsL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::AddConatctL
-// AddConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::AddConatctL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddContactsL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               contact;
-    
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( contact );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	
-	 newmemberId->SetIdentityL ( contact );
-	
-	req = groups.AddPresentityGroupMemberL(
-	                    *newGroupId,
-	                    *newmemberId,
-	                    KNullDesC()) ;	
-
-	eventObserver->WaitOpToCompleteL ( req );
-	CUserAfter::AfterL ( 5000000 );
-	 CleanupStack::PopAndDestroy();//newmemberId
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddContactsL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::AddBlankConatctL
-// AddConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::AddBlankConatctL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddBlankConatctL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	_LIT ( KBlankContact, "" );
-	 newmemberId->SetIdentityL ( KBlankContact );
-	 
-	
-	req = groups.AddPresentityGroupMemberL(
-	                    *newGroupId,
-	                    *newmemberId,
-	                    KNullDesC()) ;	
-
-	eventObserver->WaitOpToCompleteL ( req );
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-	CleanupStack::PopAndDestroy();
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddBlankConatctL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::AddBlankConatct1L
-// AddConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::AddBlankConatct1L ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddBlankConatctL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	_LIT ( KBlankContact, "" );
-	 newmemberId->SetIdentityL ( KBlankContact );
-	
-	req = groups.AddPresentityGroupMemberL(
-	                    *newGroupId,
-	                    *newmemberId,
-	                    KNullDesC()) ;	
-
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::PopAndDestroy();  //newmemberId
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AddBlankConatctL() end" ) );
-
-	return KErrNone;
-
-	}	
-// -----------------------------------------------------------------------------
-// Cossadapmt::DeleteConatctL
-// DeleteConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::DeleteConatctL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::DeleteConatctL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               contact;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( contact );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	
-	newmemberId->SetIdentityL ( contact );
-	
-	req = groups.RemovePresentityGroupMemberL(
-	                    *newGroupId,
-	                    *newmemberId) ;	
-
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::PopAndDestroy();//newmemberId
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::DeleteConatctL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::DeleteBlankConatctL
-// DeleteConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::DeleteBlankConatctL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::DeleteBlankConatctL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-	MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 1000000 );
-	_LIT ( KBlankContact, "" );
-	newmemberId->SetIdentityL (KBlankContact);
-	
-	req = groups.RemovePresentityGroupMemberL(
-	                    *newGroupId,
-	                    *newmemberId) ;	
-
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::PopAndDestroy();  //newmemberId	
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 5 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::DeleteBlankConatctL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::UnBindL
-// UnBind test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::UnBindL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::UnBindL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-                     
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-
-
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-
-	CleanupStack::Pop ( 3 ); //presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::UnBindL() End" ) );
-	return KErrNone;
-
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SendMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SendMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-    TPtrC               recipient;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-	aItem.GetNextString ( recipient );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( recipient );//userid's
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	//Unbind the context and wait completion
-	CUserAfter::AfterL ( 2000000 );
-  	req = presecenCtx->UnbindL();
-  	eventObserver->WaitOpToCompleteL( req );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendMessageL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::SendEmptyMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SendEmptyMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendEmptyMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               recipient;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( recipient );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	_LIT ( KEmptyMessage, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( KEmptyMessage );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( recipient );//userid's
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	//Unbind the context and wait completion
-  	req = presecenCtx->UnbindL();
-  	eventObserver->WaitOpToCompleteL( req );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendEmptyMessageL() end" ) );
-
-	return KErrNone;
-
-	}	
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SendTenMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SendTenMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendTenMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-    TPtrC               recipient;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-	aItem.GetNextString ( recipient );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-    CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( recipient ); //userid's
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	for ( TInt i = 0;i < 10;i++ )
-		{
-		req = imconversation.SendMessageL ( *aImMessage );
-		eventObserver->WaitOpToCompleteL ( req );
-
-		}
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-    //Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendTenMessageL() end" ) );
-
-	return KErrNone;
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SendTwentyMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SendTwentyMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendTwentyMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-    TPtrC               recipient;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-	aItem.GetNextString ( recipient );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  //userid's
-	aRecipients->AppendL ( recipient );
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	for ( TInt i = 0;i < 20;i++ )
-		{
-		req = imconversation.SendMessageL ( *aImMessage );
-		eventObserver->WaitOpToCompleteL ( req );
-
-		}
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-    //Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendTwentyMessageL() end" ) );
-
-	return KErrNone;
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::SendMessage_MultipleContactsL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SendMessage_MultipleContactsL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendMessage_MultipleContactsL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-	TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-    TPtrC               recipient;
-    TPtrC               recipient1;
-    TPtrC               recipient2;
-    TPtrC               recipient3;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-	aItem.GetNextString ( recipient );
-	aItem.GetNextString ( recipient1 );
-	aItem.GetNextString ( recipient2 );
-	aItem.GetNextString ( recipient3 );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-    CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients ); 
-	aRecipients->AppendL ( recipient );  //userid's
-	aRecipients->AppendL ( recipient1 );
-	aRecipients->AppendL ( recipient2 );
-	aRecipients->AppendL ( recipient3 );
-
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	CUserAfter::AfterL ( 1000000 );
-
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SendMessage_MultipleContactsL() end" ) );
-
-	return KErrNone;
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::ReceiveMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ReceiveMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 1 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( username );  //userid of own
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-    //send message is to own
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	//send message to other guy
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveMessageL() start" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::ReceiveEmptyMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ReceiveEmptyMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveEmptyMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	_LIT ( KEmptyMessage, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( KEmptyMessage );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 1 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( username );  //userid of own
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-    //send message is to own
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	//send message to other guy
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveEmptyMessageL() start" ) );
-
-	return KErrNone;
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::ReceiveTenMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ReceiveTenMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveTenMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-    CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( username );  //userid of own
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	for ( TInt i = 0;i < 10;i++ )
-		{
-		req = imconversation.SendMessageL ( *aImMessage );
-		eventObserver->WaitOpToCompleteL ( req );
-
-		}
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-    //Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveTenMessageL() end" ) );
-
-	return KErrNone;
-
-	}
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::ReceiveTwentyMessageL
-// SendMessage test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ReceiveTwentyMessageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveTwentyMessageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 2 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( username ); //userid's of own
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-
-	for ( TInt i = 0;i < 20;i++ )
-		{
-		req = imconversation.SendMessageL ( *aImMessage );
-		eventObserver->WaitOpToCompleteL ( req );
-		}
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-    //Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ReceiveTwentyMessageL() end" ) );
-
-	return KErrNone;
-
-	}
-
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::PublishOwnPresenceL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::PublishOwnPresenceL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::PublishOwnPresenceL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-	MPresenceFeatures* presenceFeatures = NULL;
-    presenceFeatures = MPresenceFeatures::NewL(presecenCtx); 
-    CleanupDeletePushL( presenceFeatures );
-
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TInt               availability;
-    TPtrC               statustext;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextInt ( availability );
-	aItem.GetNextString ( statustext );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-    // Take handles to object factory and publish interface
-    MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-    MPresencePublishing& publisher = presenceFeatures->PresencePublishing();
-    //Fill presence doc with presence components and attributes
-    MPresenceInfo* myPresence = presenceFeatures->PresenceObjectFactory().NewPresenceInfoLC();//1
-    MServicePresenceInfo* myServicePresence = presenceFeatures->PresenceObjectFactory().NewServicePresenceInfoLC();//2
-    myServicePresence->SetServiceTypeL( NPresenceInfo::NServiceType::KInstantMessaging );
-    //MPresenceInfoFieldCollection& attributeFields = myServicePresence->Fields();
-
-    MPersonPresenceInfo *PersonPresence = presenceFeatures->PresenceObjectFactory().NewPersonPresenceInfoLC();
-    MPresenceInfoFieldCollection& attributeFields = PersonPresence->Fields();
-    
-    MPresenceInfoField* infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//3
-
-    // "availability" attribute
-    MPresenceInfoFieldValueEnum* availabilityField = presenceFeatures->PresenceObjectFactory().NewEnumInfoFieldLC();//4
-    availabilityField->SetValueL( availability ); 
-    infoField->SetFieldTypeL( NPresenceInfo::NFieldType::KAvailability ); 
-    infoField->SetFieldValue( availabilityField );
-    CleanupStack::Pop(); // availabilityField
-
-    attributeFields.AddOrReplaceFieldL(infoField );
-    //TInt count = serviceFields.FieldCount();
-    CleanupStack::Pop(); // infoField
-    
-    //status text
-    infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//7
-    MPresenceInfoFieldValueText* statustextField = presenceFeatures->PresenceObjectFactory().NewTextInfoFieldLC();//8
-    statustextField->SetTextValueL( statustext ); // some status text
-    infoField->SetFieldTypeL( KStatusTextfield );
-    infoField->SetFieldValue( statustextField );
-    CleanupStack::Pop(); // statustextField
-    attributeFields.AddOrReplaceFieldL( infoField );
-    CleanupStack::Pop(); // infoField
-    
-      
-     //online status
-    
-    infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//7
-    MPresenceInfoFieldValueText* onlineField = presenceFeatures->PresenceObjectFactory().NewTextInfoFieldLC();//8
-    onlineField->SetTextValueL( _L("T" ) ); // some status text
-    infoField->SetFieldTypeL( KOnlineStatusfield );
-    infoField->SetFieldValue( onlineField );
-    CleanupStack::Pop(); // devmodelField
-    attributeFields.AddOrReplaceFieldL( infoField );
-    CleanupStack::Pop(); // infoField
-     
-        
-    myPresence->AddServicePresenceL( myServicePresence );
-    myPresence->SetPersonPresenceL(PersonPresence);
-    TInt count = attributeFields.FieldCount();
-    CleanupStack::Pop(2); // myServicePresence,PersonPresence
-
-    	
-    //publish the presence
-    req = publisher.PublishOwnPresenceL( *myPresence );
-
-    // wait completion
-    eventObserver->WaitOpToCompleteL( req );
-    CleanupStack::PopAndDestroy(1); // myPresence
-        
-    CUserAfter::AfterL ( 1000000 );
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 4 ); //presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::PublishOwnPresenceL() End" ) );
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::PublishOwnPresenceEmptyTextL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::PublishOwnPresenceEmptyTextL ( CStifItemParser& aItem )
-	{
-
-
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::PublishOwnPresenceEmptyTextL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-
-	MPresenceFeatures* presenceFeatures = NULL;
-    presenceFeatures = MPresenceFeatures::NewL(presecenCtx); 
-    CleanupDeletePushL( presenceFeatures );
-
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TInt               availability;
-
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextInt ( availability );
-	_LIT ( KBlankStatusText, "" );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-    // Take handles to object factory and publish interface
-    MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-    MPresencePublishing& publisher = presenceFeatures->PresencePublishing();
-    //Fill presence doc with presence components and attributes
-    MPresenceInfo* myPresence = presenceFeatures->PresenceObjectFactory().NewPresenceInfoLC();//1
-    MServicePresenceInfo* myServicePresence = presenceFeatures->PresenceObjectFactory().NewServicePresenceInfoLC();//2
-    myServicePresence->SetServiceTypeL( NPresenceInfo::NServiceType::KInstantMessaging );
-    //MPresenceInfoFieldCollection& attributeFields = myServicePresence->Fields();
-
-    MPersonPresenceInfo *PersonPresence = presenceFeatures->PresenceObjectFactory().NewPersonPresenceInfoLC();
-    MPresenceInfoFieldCollection& attributeFields = PersonPresence->Fields();
-    
-    MPresenceInfoField* infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//3
-
-    // "availability" attribute
-    MPresenceInfoFieldValueEnum* availabilityField = presenceFeatures->PresenceObjectFactory().NewEnumInfoFieldLC();//4
-    availabilityField->SetValueL( availability ); 
-    infoField->SetFieldTypeL( NPresenceInfo::NFieldType::KAvailability ); 
-    infoField->SetFieldValue( availabilityField );
-    CleanupStack::Pop(); // availabilityField
-
-    attributeFields.AddOrReplaceFieldL(infoField );
-    //TInt count = serviceFields.FieldCount();
-    CleanupStack::Pop(); // infoField
-    
-    //status text
-    infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//7
-    MPresenceInfoFieldValueText* statustextField = presenceFeatures->PresenceObjectFactory().NewTextInfoFieldLC();//8
-    statustextField->SetTextValueL( KBlankStatusText ); // some status text
-    infoField->SetFieldTypeL( KStatusTextfield );
-    infoField->SetFieldValue( statustextField );
-    CleanupStack::Pop(); // statustextField
-    attributeFields.AddOrReplaceFieldL( infoField );
-    CleanupStack::Pop(); // infoField
-    
-      
-     //online status
-    
-    infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//7
-    MPresenceInfoFieldValueText* onlineField = presenceFeatures->PresenceObjectFactory().NewTextInfoFieldLC();//8
-    onlineField->SetTextValueL( _L("T" ) ); // some status text
-    infoField->SetFieldTypeL( KOnlineStatusfield );
-    infoField->SetFieldValue( onlineField );
-    CleanupStack::Pop(); // devmodelField
-    attributeFields.AddOrReplaceFieldL( infoField );
-    CleanupStack::Pop(); // infoField
-     
-        
-    myPresence->AddServicePresenceL( myServicePresence );
-    myPresence->SetPersonPresenceL(PersonPresence);
-    TInt count = attributeFields.FieldCount();
-    CleanupStack::Pop(2); // myServicePresence,PersonPresence
-
-    	
-    //publish the presence
-    req = publisher.PublishOwnPresenceL( *myPresence );
-
-    // wait completion
-    eventObserver->WaitOpToCompleteL( req );
-    CleanupStack::PopAndDestroy(1); // myPresence
-        
-    CUserAfter::AfterL ( 1000000 );
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 4 ); //presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::PublishOwnPresenceEmptyTextL() End" ) );
-	return KErrNone;
-
-	}
-TInt Cossadapmt::AcceptnotificationRequestL ( CStifItemParser& aItem )
-	{
-	
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AcceptAddnotificationRequestL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-    MPresenceAuthorization& authorization = presenceFeatures->PresenceAuthorization();
-    MPresenceInfoFilter* infoFilt = presenceFeatures->PresenceObjectFactory().NewPresenceInfoFilterLC();
-   
-    infoFilt->AcceptPersonFilterL( NPresenceInfo::NFieldType::KAcceptAll );
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-    req = authorization.SubscribePresenceGrantRequestListL();
-    
-    // wait completion
-    
-    eventObserver->WaitOpToCompleteL( req );
-
-    CUserAfter::AfterL( 1000000 );
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-
-	CUserAfter::AfterL ( 5000000 );
-
-    MXIMPIdentity* testContactId = objFactory.NewIdentityLC();
-    testContactId->SetIdentityL( KContact1 );
-    req = authorization.GrantPresenceForPresentityL(*testContactId ,*infoFilt );
-      
-    // wait completion
-    eventObserver->WaitOpToCompleteL( req );
-    
-
-	 CleanupStack::PopAndDestroy();//testContactId
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 6 );//newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient,infoFilt
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::AcceptAddnotificationRequestL() end" ) );
-
-	return KErrNone;
-	}
-
-
-// -----------------------------------------------------------------------------
-// Cossadapmt::RejectAddnotificationRequestL
-// AddConatctL contacts test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::RejectAddnotificationRequestL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::RejectAddnotificationRequestL() start" ) );
-
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Loading presence plugin Done" ) );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-    MPresenceAuthorization& authorization = presenceFeatures->PresenceAuthorization();
-    MPresenceInfoFilter* infoFilt = presenceFeatures->PresenceObjectFactory().NewPresenceInfoFilterLC();
-     
-     infoFilt->AcceptPersonFilterL( NPresenceInfo::NFieldType::KAcceptAll );
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "list" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-	//Wait with CActiveSchedulerWait the binding to complete
-	//If binding fails, it is handled with leave
-	eventObserver->WaitOpToCompleteL ( req );
-    req = authorization.SubscribePresenceGrantRequestListL();
-    
-    // wait completion
-    
-    eventObserver->WaitOpToCompleteL( req );
-
-    CUserAfter::AfterL( 1000000 );
-	
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	CUserAfter::AfterL ( 5000000 );
-
-    MXIMPIdentity* testContactId = objFactory.NewIdentityLC();
-    testContactId->SetIdentityL( KContact1 );
-    req = authorization.WithdrawPresenceGrantFromPresentityL(*testContactId);
-      
-    // wait completion
-    eventObserver->WaitOpToCompleteL( req );
-    
-    CUserAfter::AfterL( 1000000 );
-
-	 CleanupStack::PopAndDestroy();//testContactId
-	//Unbind the context and wait completion
-	req = presecenCtx->UnbindL();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->UnbindL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-	CleanupStack::PopAndDestroy ( 6 );//infoFilt,newGroupId,presenceFeatures,presecenCtx,eventObserver,ximpClient
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::RejectAddnotificationRequestL() end" ) );
-
-	return KErrNone;
-
-	}
-// -----------------------------------------------------------------------------
-// Cossadapmt::ImOperationsCoverageL
-// ImOperationsCoverageL test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::ImOperationsCoverageL ( CStifItemParser& aItem )
-	{
-
-	//Initialize XIMP client
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ImOperationsCoverageL() start" ) );
-	MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-	CleanupDeletePushL ( ximpClient );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-	//Create new sink to receive presence context events
-	CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-	//Create new presence context
-	MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-	//Bind context to desired presence service
-	presecenCtx->RegisterObserverL ( *eventObserver );
-	MPresenceFeatures* presenceFeatures = NULL;
-	presenceFeatures = MPresenceFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( presenceFeatures );
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-	TInt                serviceId;
-    TPtrC               message;
-    TPtrC               contact;
-	aItem.GetNextString ( username );
-	aItem.GetNextString ( password );
-	aItem.GetNextInt ( serviceId );
-	aItem.GetNextString ( message );
-	aItem.GetNextString ( contact );
-	TUid protocolUid = TUid::Uid ( KProtocolUid );
-
-	//Bind context to desired presence service
-	TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-	                     username,
-	                     password,
-	                     serviceId );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called\n" ) );
-	eventObserver->WaitOpToCompleteL ( req );
-	MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-	MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-	MPresentityGroups& groups = presenceFeatures->PresentityGroups() ;
-
-	TOssAdapMtLogger::Log ( _L ( "presentity groups object created" ) );
-	_LIT ( KDummyListId, "" );
-	HBufC16* iListId;
-	iListId = KDummyListId().AllocL();
-	iListId->Des().Fold();
-	newGroupId->SetIdentityL ( *iListId );
-	delete iListId;
-	iListId = NULL;
-	req = groups.SubscribePresentityGroupContentL ( *newGroupId );
-
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::groups.SubscribePresentityGroupListL() called" ) );
-
-	eventObserver->WaitOpToCompleteL ( req );
-   CleanupStack::PopAndDestroy(2); //newGroupId,presenceFeatures
-
-	CUserAfter::AfterL ( 1000000 );
-	//Bind context to desired presence service
-	MImFeatures* imFeatures = NULL;
-	imFeatures = MImFeatures::NewL ( presecenCtx );
-	CleanupDeletePushL ( imFeatures );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imFeatures created\n" ) );
-	MImConversation& imconversation = imFeatures->ImConversation();
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::imconversation created\n" ) );
-	MImConversationInfo *aImMessage = NULL;
-	aImMessage = imFeatures->ImObjectFactory().NewImConversationInfoLC();
-	MXIMPIdentity* identity = objFactory.NewIdentityLC();
-	identity->SetIdentityL ( KMsgId );
-	aImMessage->SetMessageIdL ( identity );
-	aImMessage->SetTextMessageL ( message );
-	CDesCArrayFlat* aRecipients = new ( ELeave ) CDesCArrayFlat ( 1 );
-	CleanupStack::PushL ( aRecipients );  
-	aRecipients->AppendL ( username );  //userid of own
-	aImMessage->SetRecipientL ( aRecipients );
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::before sendmessage called\n" ) );
-    //send message is to own
-	req = imconversation.SendMessageL ( *aImMessage );
-	eventObserver->WaitOpToCompleteL ( req );
-	CleanupStack::Pop ( 3 );//identity,aRecipients,aImMessage
-	//send message to other guy
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::message sent\n " ) );
-	//Unbind the context and wait completion
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-	CleanupStack::PopAndDestroy(4); //imFeatures,presecenCtx,eventObserver,ximpClient,
-	TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ImOperationsCoverageL() start" ) );
-
-	return KErrNone;
-
-	}		
-// -----------------------------------------------------------------------------
-// Cossadapmt::SetAvtarL
-// Login test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt Cossadapmt::SetAvtarL ( CStifItemParser& aItem )
-    {
-
-
-
-    //Initialize XIMP client
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SetAvtarL() start" ) );
-
-    MXIMPClient* ximpClient = MXIMPClient::NewClientL();
-    CleanupDeletePushL ( ximpClient );
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::MXIMPClient::NewClientL() start" ) );
-
-    //Create new sink to receive presence context events
-    CUSContextObserver* eventObserver = CUSContextObserver::NewLC();
-
-    //Create new presence context
-    MXIMPContext* presecenCtx = ximpClient->NewPresenceContextLC();
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::ximpClient->NewPresenceContextLC() called" ) );
-    presecenCtx->RegisterObserverL ( *eventObserver );
-
-    MPresenceFeatures* presenceFeatures = NULL;
-    presenceFeatures = MPresenceFeatures::NewL(presecenCtx); 
-    CleanupDeletePushL( presenceFeatures );
-
-
-    //read data from cfg file
-    TPtrC               username;
-    TPtrC               password;
-    TInt                serviceId;
-    TPtrC               filename;
-    aItem.GetNextString ( username );
-    aItem.GetNextString ( password );
-    aItem.GetNextInt ( serviceId );
-    aItem.GetNextString ( filename );
-    TUid protocolUid = TUid::Uid ( KProtocolUid );
-    
-    //Bind context to desired presence service
-    TXIMPRequestId req = presecenCtx->BindToL ( protocolUid,
-                         username,
-                         password,
-                         serviceId );
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::presecenCtx->BindToL() called" ) );
-    //Wait with CActiveSchedulerWait the binding to complete
-    //If binding fails, it is handled with leave
-    eventObserver->WaitOpToCompleteL ( req );
-    // Take handles to object factory and publish interface
-    // Take handles to object factory and publish interface
-    presenceFeatures = MPresenceFeatures::NewL(presecenCtx); 
-    MXIMPObjectFactory& objFactory = presecenCtx->ObjectFactory();
-   
-    MXIMPIdentity* newGroupId = objFactory.NewIdentityLC();
-    MXIMPIdentity* newmemberId = objFactory.NewIdentityLC();
-
-    CleanupDeletePushL( presenceFeatures );
-
-    MPresencePublishing& publisher = presenceFeatures->PresencePublishing();
-  
-    //Fill presence doc with presence components and attributes
-    MPresenceInfo* myPresence = presenceFeatures->PresenceObjectFactory().NewPresenceInfoLC();//1
-    MPersonPresenceInfo *PersonPresence = presenceFeatures->PresenceObjectFactory().NewPersonPresenceInfoLC();
-    MPresenceInfoFieldCollection& attributeFields = PersonPresence->Fields();
-  
-    MPresenceInfoField* infoField = presenceFeatures->PresenceObjectFactory().NewInfoFieldLC();//3
-
-   //based on the state conver it to  ximpfw status.
- 
-
-    // "availability" attribute
-    MPresenceInfoFieldValueBinary* avatarField = presenceFeatures->PresenceObjectFactory().NewBinaryInfoFieldLC();//4
-    //avatarField->SetBinaryValueL(*(aImageLoader->GetContentData()));
-    _LIT8(KMimeType,"image/gif");
-    TBufC8<20> mimetype(KMimeType);
-
-    avatarField->SetMimeTypeL(mimetype.Des());
-   RFile file;
-   RFs iFs;
-   User::LeaveIfError( iFs.Connect() );
-   User::LeaveIfError( file.Open( iFs, _L("c:\\index.gif"), EFileRead ) );
-   CleanupClosePushL( file );
-        
-    // Get file size
-    TInt fileSize = 0;
-    User::LeaveIfError( file.Size( fileSize ) );
-    
-    // Check file size, if bigger than max transaction content -> leave
-  /*  if ( fileSize >
-        iImpsFactory.CreateImClientL()->MaxTransactionContentLengthL() )
-        {
-        User::Leave( KErrOverflow );
-        }*/
-        
-    // Get file content
-    HBufC8* Content = HBufC8::NewL( fileSize );
-    TPtr8 ptr( Content->Des() );
-    User::LeaveIfError( file.Read( ptr, fileSize ) );
-    
-    avatarField->SetBinaryValueL(*Content);
-    infoField->SetFieldTypeL( NPresenceInfo::NFieldType::KAvatar ); 
-    infoField->SetFieldValue( avatarField );
-    CleanupStack::Pop(); // availabilityField
-
-    attributeFields.AddOrReplaceFieldL(infoField );
- 
-    CleanupStack::Pop(); // infoField
-                  
-    myPresence->SetPersonPresenceL(PersonPresence);
-    CleanupStack::Pop(1); // PersonPresence
-
-    req = publisher.PublishOwnPresenceL( *myPresence );
-
-    // wait completion
-    eventObserver->WaitOpToCompleteL( req );
-    CleanupStack::PopAndDestroy(1); // myPresence
-        
-    req = presecenCtx->UnbindL();
-    eventObserver->WaitOpToCompleteL( req );
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::WaitOpToCompleteL() end" ) );
-
-    CleanupStack::PopAndDestroy ( 4 ); //presenceFeatures,presecenCtx,eventObserver,ximpClient
-    TOssAdapMtLogger::Log ( _L ( "Cossadapmt::SetAvtarL() End" ) );
-    return KErrNone;
-
-    }
-//  [End of File] - Do not remove
--- a/imservices/ossprotocoladaptation/tsrc/ossadapmt/src/uscontextobserver.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,753 +0,0 @@
-/*
-* Copyright (c) 2007-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: uscontextobserver.cpp
-*
-*/
-
-#include "uscontextobserver.h"
-
-#include <ximpidentity.h>
-#include <presenceinfofieldvaluetext.h>
-#include <presenceinfofieldvalueenum.h>
-#include <ximpstatus.h>
-#include <ximpcontextstateevent.h>
-#include <ximprequestcompleteevent.h>
-#include <presentitypresenceevent.h>
-#include <presentitygrouplistevent.h>
-#include <presentitygroupinfo.h>
-#include <presentitygroupcontentevent.h>
-#include <presentitygroupmemberinfo.h>
-#include <presencegrantrequestlistevent.h>
-#include <presenceblocklistevent.h>
-#include <presentitypresenceevent.h>
-#include <presencewatcherlistevent.h>
-#include "ossadapmt.h"
-#include <ximpdatasubscriptionstate.h>
-#include <presencewatcherinfo.h>
-#include "ximpcontextstate.h"
-#include <presenceinfo.h>
-#include <servicepresenceinfo.h>
-#include <devicepresenceinfo.h>
-#include <presencegrantrequestinfo.h>
-#include <presenceblockinfo.h>
-#include <presenceinfofieldcollection.h>
-#include <personpresenceinfo.h>
-#include <presenceinfofield.h>
-
-#include "imconversationevent.h"
-#include <searchevent.h>
-
-#include "imconversationinfo.h"
-#include <searchinfo.h>
-#include <searchkeysevent.h>
-#include <searchkeyinfo.h>
-
-#include <e32math.h>
-#include <f32file.h>
-#include <utf.h>
-// ============================ MEMBER FUNCTIONS ===============================
-
-// CONSTRUCTION
-CUSContextObserver* CUSContextObserver::NewLC()
-	{
-	CUSContextObserver* self = new ( ELeave ) CUSContextObserver();
-	CleanupStack::PushL ( self );
-	return self;
-	}
-
-
-CUSContextObserver::~CUSContextObserver()
-	{
-	}
-
-
-CUSContextObserver::CUSContextObserver()
-	{
-	}
-
-
-
-// ===========================================================================
-// PUBLIC FUNCTIONS
-// ===========================================================================
-//
-void CUSContextObserver::WaitOpToCompleteL ( const TXIMPRequestId& aOpToWait )
-	{
-	iReqToWait = aOpToWait;
-
-	iWait.Start();
-
-	}
-
-/*void CUSContextObserver::WaitCompleteL()
- {
- iWait.AsyncStop();
- }*/
-
-// ===========================================================================
-// FROM MXIMPContextObserver
-// ===========================================================================
-//
-void CUSContextObserver::HandlePresenceContextEvent (
-    const MXIMPContext& /*aContext*/,
-    const MXIMPBase& aEvent )
-	{
-
-	TOssAdapMtLogger::Log ( _L ( "HandlePresenceContextEvent called" ) );
-
-	TInt32 eventId = aEvent.GetInterfaceId();
-
-	switch ( aEvent.GetInterfaceId() )
-		{
-			_LIT ( KDir, "EVENT_LOG" );  // here we hv to write a folder name in wch we want to create log file
-			_LIT ( KFile, "event.txt" );          //here we hv to write a file name in wch we want to log default path is  " c:/Logs/"
-
-		case MXIMPRequestCompleteEvent::KInterfaceId:
-				{
-				TOssAdapMtLogger::Log ( _L ( "CUSContextObserver::MXIMPRequestCompleteEvent() start" ) );
-
-				const MXIMPRequestCompleteEvent* complEvent =
-				    TXIMPGetInterface< const MXIMPRequestCompleteEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-				_LIT ( KMsg, "Recvd RequestCompleteEvent " );         // here we hv to write message or text wch we want to write in log file
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, KMsg );
-
-				if ( iWait.IsStarted() && ( complEvent->RequestId() == iReqToWait ) )
-					{
-					iReqResult = complEvent->CompletionResult().ResultCode();
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Error code for the request is %d " ), iReqResult );
-					iWait.AsyncStop();
-					}
-
-				TOssAdapMtLogger::Log ( _L ( "CUSContextObserver::MXIMPRequestCompleteEvent() end" ) );
-
-				break;
-				}
-
-		case MXIMPContextStateEvent::KInterfaceId:
-				{
-				const MXIMPContextStateEvent* ctxtStateEvent =
-				    TXIMPGetInterface< const MXIMPContextStateEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-				_LIT ( KMsg, "Recvd PresenceContextStateEvent " );         // here we hv to write message or text wch we want to write in log file
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, KMsg );
-				const MXIMPStatus* fwStatus = ctxtStateEvent->StateChangeReason();
-				const MXIMPContextState& cState = ctxtStateEvent->ContextState();
-				MXIMPContextState::TState state = cState.ContextState();
-				break;
-				}
-
-		case MPresentityGroupListEvent::KInterfaceId:
-				{
-				const MPresentityGroupListEvent* groupListEvent =
-				    TXIMPGetInterface< const MPresentityGroupListEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-				_LIT ( Kna, "   Susbcription state is unavailable" );
-				_LIT ( Kava, "   Susbcription state is available" );
-				_LIT ( KDef, "   Susbcription state is ERROR" );
-
-				const  MXIMPDataSubscriptionState&  dstate = groupListEvent->DataSubscriptionState();
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						ssstate.Copy ( Kna );
-						break;
-
-					case 1:
-						ssstate.Copy ( Kava );
-						break;
-
-					default:
-						ssstate.Copy ( KDef );
-						break;
-					}
-
-				_LIT ( Kdna, "   Data state is unavailable" );
-
-				_LIT ( Kdava, "   Data state is available" );
-				_LIT ( KdDef, "   Data state is ERROR" );
-
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						sdstate.Copy ( Kdna );
-						break;
-
-					case 1:
-						sdstate.Copy ( Kdava );
-						break;
-
-					default:
-						sdstate.Copy ( KdDef );
-						break;
-					}
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd PresentityGroupListEvent New:%d, Updt:%d, Disappeared:%d, Current:%d, SubscrState:%d, DataState:%d" ), groupListEvent->NewGroupsCount(), groupListEvent->UpdatedGroupsCount(), groupListEvent->DisappearedGroupsCount(), groupListEvent->CurrentGroupsCount(), dstate.SubscriptionState(), dstate.DataState() );//KMsg);
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, sdstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, ssstate );
-				break;
-				}
-
-
-		case MPresentityGroupContentEvent::KInterfaceId:
-				{
-				const MPresentityGroupContentEvent* groupContentEvent =
-				    TXIMPGetInterface< const MPresentityGroupContentEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-				_LIT ( Kna, "   Susbcription state is unavailable" );
-				_LIT ( Kava, "   Susbcription state is available" );
-				_LIT ( KDef, "   Susbcription state is ERROR" );
-
-				const MXIMPDataSubscriptionState&  dstate = groupContentEvent->DataSubscriptionState();
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						ssstate.Copy ( Kna );
-						break;
-
-					case 1:
-						ssstate.Copy ( Kava );
-						break;
-
-					default:
-						ssstate.Copy ( KDef );
-						break;
-					}
-
-				_LIT ( Kdna, "   Data state is unavailable" );
-
-				_LIT ( Kdava, "   Data state is available" );
-				_LIT ( KdDef, "   Data state is ERROR" );
-
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						sdstate.Copy ( Kdna );
-						break;
-
-					case 1:
-						sdstate.Copy ( Kdava );
-						break;
-
-					default:
-						sdstate.Copy ( KdDef );
-						break;
-					}
-
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd PresentityGroupContentEvent New:%d, Updt:%d, Disappeared:%d, Current:%d, SubscrState:%d, DataState:%d" ), groupContentEvent->NewMembersCount(), groupContentEvent->UpdatedMembersCount(), groupContentEvent->DisappearedMembersCount(), groupContentEvent->CurrentMembersCount(), dstate.SubscriptionState(), dstate.DataState() );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, sdstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, ssstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, groupContentEvent->GroupId().Identity() );
-				// print the list contents
-
-				for ( TInt i = 0; i < groupContentEvent->CurrentMembersCount(); i++ )
-					{
-					const MPresentityGroupMemberInfo& gi = groupContentEvent->CurrentMember ( i );
-
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Id and displayname for cur group member %d X" ), i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.GroupMemberId().Identity() );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.GroupMemberDisplayName() );
-//     EUNIT_ASSERT_EQUALS_DESC( gi.GroupMemberId().Identity(), iContactid[i], "contact id's does'nt match");
-//     EUNIT_ASSERT_EQUALS_DESC( gi.GroupMemberDisplayName(), iNickname[i], "contact nickname  does'nt match");
-
-					}
-
-				// print the list contents
-				for ( TInt i = 0; i < groupContentEvent->NewMembersCount(); i++ )
-					{
-					const MPresentityGroupMemberInfo& gi = groupContentEvent->NewMember ( i );
-
-
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Id and displayname for new group member %d X" ), i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.GroupMemberId().Identity() );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.GroupMemberDisplayName() );
-//     EUNIT_ASSERT_EQUALS_DESC( gi.GroupMemberId().Identity(), iContactid[i], "contact id's does'nt match");
-//     EUNIT_ASSERT_EQUALS_DESC( gi.GroupMemberDisplayName(), iNickname[i], "contact nickname  does'nt match");
-					}
-
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************END*******************" ) );
-
-				break;
-				}
-
-		case MPresenceGrantRequestListEvent::KInterfaceId:
-				{
-				const MPresenceGrantRequestListEvent* grantreqEvent =
-				    TXIMPGetInterface< const MPresenceGrantRequestListEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-				_LIT ( Kna, "   Susbcription state is unavailable" );
-				_LIT ( Kava, "   Susbcription state is available" );
-				_LIT ( KDef, "   Susbcription state is ERROR" );
-
-				const  MXIMPDataSubscriptionState&  dstate = grantreqEvent->DataSubscriptionState();
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						ssstate.Copy ( Kna );
-						break;
-
-					case 1:
-						ssstate.Copy ( Kava );
-						break;
-
-					default:
-						ssstate.Copy ( KDef );
-						break;
-					}
-
-				_LIT ( Kdna, "   Data state is unavailable" );
-
-				_LIT ( Kdava, "   Data state is available" );
-				_LIT ( KdDef, "   Data state is ERROR" );
-
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						sdstate.Copy ( Kdna );
-						break;
-
-					case 1:
-						sdstate.Copy ( Kdava );
-						break;
-
-					default:
-						sdstate.Copy ( KdDef );
-						break;
-					}
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd Presentity Grant event" ) );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, sdstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, ssstate );
-
-				TInt index = grantreqEvent->NewRequestsCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MPresenceGrantRequestInfo& grantinfo = grantreqEvent->NewRequest ( i );
-
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, grantinfo.RequestorId().Identity() );
-					const TDesC16 dispname = grantinfo.RequestorDisplayName();
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, dispname );
-					}
-
-				index = grantreqEvent->CurrentRequestsCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MPresenceGrantRequestInfo& grantinfo = grantreqEvent->CurrentRequest ( i );
-
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, grantinfo.RequestorId().Identity() );
-					const TDesC16 dispname = grantinfo.RequestorDisplayName();
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, dispname );
-					}
-
-				break;
-				}
-
-		case MPresenceBlockListEvent::KInterfaceId:
-				{
-				const MPresenceBlockListEvent* blockListEvent =
-				    TXIMPGetInterface< const MPresenceBlockListEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-				_LIT ( Kna, "   Susbcription state is unavailable" );
-				_LIT ( Kava, "   Susbcription state is available" );
-				_LIT ( KDef, "   Susbcription state is ERROR" );
-
-				const  MXIMPDataSubscriptionState&  dstate = blockListEvent->DataSubscriptionState();
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						ssstate.Copy ( Kna );
-						break;
-
-					case 1:
-						ssstate.Copy ( Kava );
-						break;
-
-					default:
-						ssstate.Copy ( KDef );
-						break;
-					}
-
-				_LIT ( Kdna, "   Data state is unavailable" );
-
-				_LIT ( Kdava, "   Data state is available" );
-				_LIT ( KdDef, "   Data state is ERROR" );
-
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						sdstate.Copy ( Kdna );
-						break;
-
-					case 1:
-						sdstate.Copy ( Kdava );
-						break;
-
-					default:
-						sdstate.Copy ( KdDef );
-						break;
-					}
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd Presentity Grant event" ) );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, sdstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, ssstate );
-
-				TInt index = blockListEvent->NewBlocksCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MPresenceBlockInfo& blockinfo = blockListEvent->NewBlock ( i );
-
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, blockinfo.BlockedEntityId().Identity() );
-					const TDesC16& dispname = blockinfo.BlockedEntityDisplayName();
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, dispname );
-					}
-
-				index = blockListEvent->CurrentBlocksCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MPresenceBlockInfo& blockinfo = blockListEvent->CurrentBlock ( i );
-
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, blockinfo.BlockedEntityId().Identity() );
-					const TDesC16& dispname = blockinfo.BlockedEntityDisplayName();
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, dispname );
-					}
-
-				break;
-				}
-
-		case MPresentityPresenceEvent::KInterfaceId:
-				{
-				const MPresentityPresenceEvent* PresentityPresenceEvent =
-				    TXIMPGetInterface< const MPresentityPresenceEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-				_LIT ( Kna, "   Susbcription state is unavailable" );
-				_LIT ( Kava, "   Susbcription state is available" );
-				_LIT ( KDef, "   Susbcription state is ERROR" );
-
-				const  MXIMPDataSubscriptionState&  dstate = PresentityPresenceEvent->DataSubscriptionState();
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						ssstate.Copy ( Kna );
-						break;
-
-					case 1:
-						ssstate.Copy ( Kava );
-						break;
-
-					default:
-						ssstate.Copy ( KDef );
-						break;
-					}
-
-				_LIT ( Kdna, "   Data state is unavailable" );
-
-				_LIT ( Kdava, "   Data state is available" );
-				_LIT ( KdDef, "   Data state is ERROR" );
-
-
-				switch ( dstate.SubscriptionState() )
-					{
-
-					case 0:
-						sdstate.Copy ( Kdna );
-						break;
-
-					case 1:
-						sdstate.Copy ( Kdava );
-						break;
-
-					default:
-						sdstate.Copy ( KdDef );
-						break;
-					}
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************BEGIN******************" ) );
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd Presentity PresenceEvent" ) );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, sdstate );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, ssstate );
-
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, PresentityPresenceEvent->PresentityId().Identity() );
-
-				const MPresenceInfo& pi = PresentityPresenceEvent->SubscribedPresence();
-				const MPersonPresenceInfo* ppi =  pi.PersonPresence();
-				const MPresenceInfoFieldCollection& presinf = ppi->Fields();
-				TInt index = presinf.FieldCount();
-				// const MXIMPBase base;
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MPresenceInfoField& infofield = presinf.FieldAt ( i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, infofield.FieldType() );
-					const MPresenceInfoFieldValueText* PresentityPresencestatus =
-					    TXIMPGetInterface< const MPresenceInfoFieldValueText >::From ( infofield.FieldValue(),
-					            MXIMPBase::EPanicIfUnknown );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, PresentityPresencestatus->TextValue() );
-					//          EUNIT_ASSERT_EQUALS_DESC(PresentityPresencestatus->TextValue(), iPersonpresattributes[i], "statustext does'nt match");
-					}
-
-				index = pi.ServicePresenceCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MServicePresenceInfo& servicePresinfo = pi.ServicePresenceAt ( i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, servicePresinfo.ServiceType() );
-//            EUNIT_ASSERT_EQUALS_DESC(servicePresinfo.ServiceType(), servctype, "service does'nt match");
-					const MPresenceInfoFieldCollection& fields = servicePresinfo.Fields();
-
-					for ( TInt j = 0; j < fields.FieldCount(); j++ )
-						{
-						const MPresenceInfoField& infofield = fields.FieldAt ( j );
-						RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, infofield.FieldType() );
-						const MPresenceInfoFieldValueText* Presenceavailability =
-						    TXIMPGetInterface< const MPresenceInfoFieldValueText >::From ( infofield.FieldValue(),
-						            MXIMPBase::EPanicIfUnknown );
-
-//               EUNIT_ASSERT_EQUALS_DESC(Presenceavailability->TextValue(), _L("OPEN") , "Comm capability  does'nt match");
-						RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, Presenceavailability->TextValue() );
-						}
-					}
-
-				index = pi.DevicePresenceCount();
-
-				for ( TInt i = 0; i < index; i++ )
-					{
-					const MDevicePresenceInfo& DevicePresinfo = pi.DevicePresenceAt ( i );
-					const TPtrC8 devicename = DevicePresinfo.DeviceName();
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, DevicePresinfo.DeviceName() );
-					const MPresenceInfoFieldCollection& fields = DevicePresinfo.Fields();
-					TInt fieldcount = fields.FieldCount();
-
-					for ( TInt j = 0; j < fieldcount; j++ )
-						{
-						const MPresenceInfoField& infofield = fields.FieldAt ( j );
-						const TDesC8* fieldtype = & ( infofield.FieldType() );
-						RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, *fieldtype );
-						const MXIMPBase& base = infofield.FieldValue();
-						const MPresenceInfoFieldValueText* Presentityvalue =
-						    TXIMPGetInterface< const MPresenceInfoFieldValueText >::From ( infofield.FieldValue(),
-						            MXIMPBase::EPanicIfUnknown );
-
-						RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, Presentityvalue->TextValue() );
-//               EUNIT_ASSERT_EQUALS_DESC(Presentityvalue->TextValue(), clienttype, "Clienttype does'nt match");
-						}
-
-
-					}
-
-				_LIT ( KMsg, " presentity presence event  is getting " );         // here we hv to write message or text wch we want to write in log file
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, KMsg );
-				break;
-				}
-
-		case MPresenceWatcherListEvent::KInterfaceId:
-				{
-				const MPresenceWatcherListEvent* watcherListEvent =
-				    TXIMPGetInterface< const MPresenceWatcherListEvent >::From ( aEvent,
-				            MXIMPBase::EPanicIfUnknown );
-				TBuf<100> sdstate;
-				TBuf<100> ssstate;
-			
-				const  MXIMPDataSubscriptionState&  dstate = watcherListEvent->DataSubscriptionState();
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd watcher event" ) );
-				// print the list contents
-
-				for ( TInt i = 0; i < watcherListEvent->CurrentWatchersCount(); i++ )
-					{
-					const MPresenceWatcherInfo& gi = watcherListEvent->CurrentWatcher ( i );
-
-					gid[i].Copy ( gi.WatcherId().Identity() );
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Id and displayname for cur watcher group %d X" ), i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.WatcherId().Identity() );
-//             EUNIT_ASSERT_EQUALS_DESC(gi.WatcherId().Identity(), KContact1, "watcher does'nt match");
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.WatcherDisplayName() );
-					//  EUNIT_ASSERT_EQUALS_DESC(gi.WatcherDisplayName(), KNickname1, "Devicename does'nt match");
-					}
-
-				gidcount = watcherListEvent->CurrentWatchersCount();
-
-				// print the list contents
-
-				for ( TInt i = 0; i < watcherListEvent->NewWatchersCount(); i++ )
-					{
-					const MPresenceWatcherInfo& gi = watcherListEvent->NewWatcher ( i );
-					gid[i].Copy ( gi.WatcherId().Identity() );
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Id and displayname for new group %d X" ), i );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.WatcherId().Identity() );
-//             EUNIT_ASSERT_EQUALS_DESC(gi.WatcherId().Identity(), KContact1, "watcher does'nt match");
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, gi.WatcherDisplayName() );
-					// EUNIT_ASSERT_EQUALS_DESC(gi.WatcherDisplayName(), KNickname1, "Devicename does'nt match");
-					}
-
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "*************END*******************" ) );
-
-				gidcount = watcherListEvent->NewWatchersCount();
-
-				break;
-				}
-
-		case MImConversationEvent::KInterfaceId:
-				{
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "Recvd conversation event" ) );
-
-				const MImConversationEvent* convEvent =
-				    TXIMPGetInterface< const MImConversationEvent >::From
-				    ( aEvent, MXIMPBase::EPanicIfUnknown );
-				TInt count = convEvent->NewTextMessageCount();
-				const MImConversationInfo& convInfo = convEvent->NewTextMessage ( 0 );
-				const MXIMPIdentity& identity = convInfo.MessageId();
-				const TDesC16& msg = convInfo.TextMessage();
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "message is" ) );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, convInfo.TextMessage() );
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, convInfo.MessageId().Identity() );
-
-				/*  const MDesCArray& array= convInfo.RecipientL();
-				  TPtrC sender=array.MdcaPoint(0);*/
-				break;
-				}
-		case MSearchEvent::KInterfaceId:
-				{
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "search event"));
-				const MSearchEvent* srchEvent = 
-				TXIMPGetInterface< const MSearchEvent >::From
-										(aEvent, MXIMPBase::EPanicIfUnknown);	
-				TInt count=	srchEvent->SearchResultCount();
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend,_L("result count  :%d "),count);
-				RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, srchEvent->SearchId().Identity() );
-				
-				TInt64 radn;
-				TInt random = Math::Rand( radn );
-				
-				for(TInt i=0;i<count;++i)
-					{
-					const MSearchInfo& info=srchEvent->SearchResult(i);
-					RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend,_L("Result No:%d "),i);
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, info.GetFieldInfo(EFirstName) );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, info.GetFieldInfo(ELastName) );
-					RFileLogger::Write ( KDir, KFile, EFileLoggingModeAppend, info.GetFieldInfo(EEmailAddress) );
-					//take a random contact
-					if ( i == random % count ) 
-						{
-						
-						RFs fs;
-						RFile file;
-						TBuf8<100> buf;
-						User::LeaveIfError( fs.Connect() );
-						User::LeaveIfError( file.Replace( fs, 
-									KAddContactFileName, EFileWrite ) );
-									
-						CnvUtfConverter::ConvertFromUnicodeToUtf8( buf, 
-											info.GetFieldInfo(EEmailAddress) ); 
-						file.Write( buf );
-						file.Close();
-						fs.Close();
-							
-						}
-					}
-				RFileLogger::WriteFormat ( KDir, KFile, EFileLoggingModeAppend, _L ( "search event processed"));	
-				break;	
-				}
-				
-		case MSearchKeysEvent::KInterfaceId:
-            {
-            const MSearchKeysEvent* srchEvent = 
-                        TXIMPGetInterface< const MSearchKeysEvent >::From
-                                                (aEvent, MXIMPBase::EPanicIfUnknown);
-            TInt count= srchEvent->InfoCount();
-            
-            for(TInt a=0; a < count; a++)
-                {
-                const MSearchKeyInfo& keyInfo=srchEvent->SearchKeyInfo( a);
-                switch(keyInfo.Type())
-                    {
-                    case EKey:
-                        {
-                        TInt key= keyInfo.Key();
-                        }
-                        break;
-                       
-                    case ELabel:
-                        {
-                        TPtrC label = keyInfo.Label();
-                        break;
-                        }
-                	}
-                 }
-            
-            break;
-            }
-		
-		default:
-				{
-				break;
-				}
-		}
-	}
-
-
-// end of file
-
-
-
-
-
-
--- a/imservices/xmppsettingsapi/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ b/imservices/xmppsettingsapi/group/bld.inf	Tue Apr 27 16:58:25 2010 +0300
@@ -24,12 +24,14 @@
 DEFAULT
 
 PRJ_EXPORTS
+
+#ifdef FF_MECO_XMPP
 ../rom/xmppsettingsapi.iby						 CORE_MW_LAYER_IBY_EXPORT_PATH(xmppsettingsapi.iby)
 1020E334.txt                					 /epoc32/data/Z/private/10202be9/1020E334.txt				//temporary
 1020E334.txt                					 /epoc32/release/winscw/udeb/Z/private/10202be9/1020E334.txt	//temporary
 
 1020E334.txt                					 /epoc32/release/winscw/urel/Z/private/10202be9/1020E334.txt	//temporary
-
+#endif
 
 PRJ_MMPFILES
 xmppsettingsapi.mmp
--- a/imservices/xmppsettingsfetcher/group/bld.inf	Wed Apr 14 16:17:20 2010 +0300
+++ b/imservices/xmppsettingsfetcher/group/bld.inf	Tue Apr 27 16:58:25 2010 +0300
@@ -22,7 +22,10 @@
 DEFAULT
 
 PRJ_EXPORTS
+
+#ifdef FF_MECO_XMPP
 ../rom/xmppsettingsfetcher.iby						 CORE_MW_LAYER_IBY_EXPORT_PATH(xmppsettingsfetcher.iby)
+#endif
 
 PRJ_MMPFILES
 
--- a/imsrv_plat/ximp_core_feature_plugin_api/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ b/imsrv_plat/ximp_core_feature_plugin_api/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp	Tue Apr 27 16:58:25 2010 +0300
@@ -186,6 +186,7 @@
         RArray< TXIMPTestStatusEventSnapshot >& aArray,
         TXIMPTestStatusEventTemplate aTemplate )
     {
+	CleanupClosePushL(aArray);
     switch( aTemplate )
         {
         // session handling
@@ -552,6 +553,7 @@
             Panic( EStatusEventListenerUnknownEventTemplate );
             }
         }
+		CleanupStack::Pop(&aArray);
     }
 
 
--- a/ximpfw/core/srcutils/ximpobjecthelpers.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ b/ximpfw/core/srcutils/ximpobjecthelpers.cpp	Tue Apr 27 16:58:25 2010 +0300
@@ -59,6 +59,7 @@
 //
 EXPORT_C void TXIMPHBuf8Packer::UnPackArrayL( RPointerArray< HBufC8 >& aBufferArray, const TDesC8& aPack  )
     {
+	CleanupClosePushL( aBufferArray );
 	// No reset
     if ( ! aPack.Length() )
         {
@@ -83,6 +84,7 @@
         aBufferArray.AppendL( theObject );
 		}
     CleanupStack::Pop( objCount ); // all the objects
-    CleanupStack::PopAndDestroy(); // rs    
+    CleanupStack::PopAndDestroy(); // rs   
+    CleanupStack::Pop( &aBufferArray );
     }
 // End of file
--- a/ximpfw/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp	Wed Apr 14 16:17:20 2010 +0300
+++ b/ximpfw/tsrc/tsrcutils/testcaseutils/prfwteststatuseventlistener.cpp	Tue Apr 27 16:58:25 2010 +0300
@@ -186,6 +186,7 @@
         RArray< TXIMPTestStatusEventSnapshot >& aArray,
         TXIMPTestStatusEventTemplate aTemplate )
     {
+	CleanupClosePushL(aArray); 
     switch( aTemplate )
         {
         // session handling
@@ -552,6 +553,7 @@
             Panic( EStatusEventListenerUnknownEventTemplate );
             }
         }
+		CleanupStack::Pop(&aArray);
     }