RCS feature support in MCE/MCC. rcs
authorvnuitven <>
Mon, 06 Sep 2010 17:32:13 +0530
branchrcs
changeset 49 64c62431ac08
parent 44 fb024d5e35fa
child 50 1d8943dd8be6
RCS feature support in MCE/MCC. Provides APIs to do RCS chat and file transfer as per RCS specificaitons. For both os these MCE uses the MSRP protocol.
ipappsrv_plat/media_control_api/inc/mmcccodecinformation.h
ipappsrv_plat/media_control_api/inc/mmccevents.h
ipappsrv_plat/media_control_api/inc/mmccinterface.h
ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h
ipappsrv_plat/media_control_api/inc/mmccnetworksettings.h
ipappsrv_plat/multimedia_comms_api/group/bld.inf
ipappsrv_plat/multimedia_comms_api/inc/mccdatareceiver.h
ipappsrv_plat/multimedia_comms_api/inc/mccdatareceiverobserver.h
ipappsrv_plat/multimedia_comms_api/inc/mccdatasender.h
ipappsrv_plat/multimedia_comms_api/inc/mcedatasinkobserver.h
ipappsrv_plat/multimedia_comms_api/inc/mcedefs.h
ipappsrv_plat/multimedia_comms_api/inc/mceexternalsink.h
ipappsrv_plat/multimedia_comms_api/inc/mceexternalsource.h
ipappsrv_plat/multimedia_comms_api/inc/mcefilesharingobserver.h
ipappsrv_plat/multimedia_comms_api/inc/mcemanager.h
ipappsrv_plat/multimedia_comms_api/inc/mcemediastream.h
ipappsrv_plat/multimedia_comms_api/inc/mcemessagecodec.h
ipappsrv_plat/multimedia_comms_api/inc/mcemessagesink.h
ipappsrv_plat/multimedia_comms_api/inc/mcemessagesource.h
ipappsrv_plat/multimedia_comms_api/inc/mcemessagestream.h
ipappsrv_plat/multimedia_comms_api/inc/mcemsrpcodec.h
ipappsrv_plat/multimedia_comms_api/inc/mcemsrpsink.h
ipappsrv_plat/multimedia_comms_api/inc/mcemsrpsource.h
ipappsrv_plat/multimedia_comms_api/inc/mcesession.h
ipappsrv_plat/multimedia_comms_api/inc/mcesessionutility.h
multimediacommscontroller/group/bld.inf
multimediacommscontroller/mmccMsrppayloadformat/group/bld.inf
multimediacommscontroller/mmccMsrppayloadformat/group/msrppayloadformat.mmp
multimediacommscontroller/mmccMsrppayloadformat/inc/SendStateMachine.h
multimediacommscontroller/mmccMsrppayloadformat/inc/buffertimer.h
multimediacommscontroller/mmccMsrppayloadformat/inc/mccmsrpformatlogs.h
multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatdefs.h
multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatread.h
multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatwrite.h
multimediacommscontroller/mmccMsrppayloadformat/src/BufferTimer.cpp
multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatimplementationproxy.cpp
multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatread.cpp
multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatwrite.cpp
multimediacommscontroller/mmccMsrppayloadformat/src/SendStateMachine.cpp
multimediacommscontroller/mmccanysourcesink/group/anysourcesink.mmp
multimediacommscontroller/mmccanysourcesink/inc/mccanysink.h
multimediacommscontroller/mmccanysourcesink/inc/mccanysource.h
multimediacommscontroller/mmccanysourcesink/inc/mccdatareceiver.h
multimediacommscontroller/mmccanysourcesink/inc/mccdatareceiverobserver.h
multimediacommscontroller/mmccanysourcesink/inc/mccdatasender.h
multimediacommscontroller/mmccanysourcesink/src/mccanysink.cpp
multimediacommscontroller/mmccanysourcesink/src/mccanysource.cpp
multimediacommscontroller/mmccanysourcesink/src/mccdatareceiver.cpp
multimediacommscontroller/mmccanysourcesink/src/mccdatasender.cpp
multimediacommscontroller/mmcccontroller/inc/mccasynclinkcreator.h
multimediacommscontroller/mmcccontroller/inc/mcccontroller.h
multimediacommscontroller/mmcccontroller/src/mccasynclinkcreator.cpp
multimediacommscontroller/mmcccontroller/src/mcccontroller.cpp
multimediacommscontroller/mmccinterface/BWINS/mmccinterfaceU.DEF
multimediacommscontroller/mmccinterface/group/interface.mmp
multimediacommscontroller/mmccinterface/inc/mmcccodecmsrp.h
multimediacommscontroller/mmccinterface/src/mmcccodecinformationfactory.cpp
multimediacommscontroller/mmccinterface/src/mmcccodecmsrp.cpp
multimediacommscontroller/mmccinterface/src/mmccevent.cpp
multimediacommscontroller/mmccinterface/src/mmccinterface.cpp
multimediacommscontroller/mmccmsrpsourcesink/group/bld.inf
multimediacommscontroller/mmccmsrpsourcesink/group/msrpsourcesink.mmp
multimediacommscontroller/mmccmsrpsourcesink/inc/mccdatareceiverobserver.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpdataobserver.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpdatasender.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpinterface.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsink.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsource.h
multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsourcesinklogs.h
multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpdatasender.cpp
multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsink.cpp
multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsource.cpp
multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsourcesinkfactory.cpp
multimediacommscontroller/mmccshared/inc/formatstatemachine.h
multimediacommscontroller/mmccshared/inc/mccinternaldef.h
multimediacommscontroller/mmccshared/inc/mccuids.hrh
multimediacommscontroller/mmccsubcontroller/BWINS/mmccsubcontrollerU.DEF
multimediacommscontroller/mmccsubcontroller/group/subcontroller.mmp
multimediacommscontroller/mmccsubcontroller/inc/mccinternalcodecs.h
multimediacommscontroller/mmccsubcontroller/inc/mccmsrpconnobserver.h
multimediacommscontroller/mmccsubcontroller/inc/mccmsrpmanager.h
multimediacommscontroller/mmccsubcontroller/inc/mccsubthreadclientbase.h
multimediacommscontroller/mmccsubcontroller/inc/mccsymsimpledlstream.h
multimediacommscontroller/mmccsubcontroller/inc/mccsymstreambase.h
multimediacommscontroller/mmccsubcontroller/inc/mccsymsubthreadclient.h
multimediacommscontroller/mmccsubcontroller/inc/mccsymulstream.h
multimediacommscontroller/mmccsubcontroller/inc/mcculdlclient.h
multimediacommscontroller/mmccsubcontroller/inc/msrpcallbackmgrobserver.h
multimediacommscontroller/mmccsubcontroller/src/mcccodecconfigurator.cpp
multimediacommscontroller/mmccsubcontroller/src/mccdldatapath.cpp
multimediacommscontroller/mmccsubcontroller/src/mccmsrpmanager.cpp
multimediacommscontroller/mmccsubcontroller/src/mccsubthreadclientbase.cpp
multimediacommscontroller/mmccsubcontroller/src/mccsymsimpledlstream.cpp
multimediacommscontroller/mmccsubcontroller/src/mccsymstreambase.cpp
multimediacommscontroller/mmccsubcontroller/src/mccsymsubthreadclient.cpp
multimediacommscontroller/mmccsubcontroller/src/mccsymulstream.cpp
multimediacommscontroller/mmccsubcontroller/src/mcculdlclient.cpp
multimediacommscontroller/mmccsubcontroller/src/msrpcallbackmgrobserver.cpp
multimediacommsengine/mmcecli/bwins/mceclientU.DEF
multimediacommsengine/mmcecli/group/mceclient.mmp
multimediacommsengine/mmcecli/inc/mcedatareceiver.h
multimediacommsengine/mmcecli/inc/mcedatasender.h
multimediacommsengine/mmcecli/inc/mcefactory.h
multimediacommsengine/mmcecli/src/mcedatareceiver.cpp
multimediacommsengine/mmcecli/src/mcedatasender.cpp
multimediacommsengine/mmcecli/src/mceexternalsink.cpp
multimediacommsengine/mmcecli/src/mceexternalsource.cpp
multimediacommsengine/mmcecli/src/mcefactory.cpp
multimediacommsengine/mmcecli/src/mcemanager.cpp
multimediacommsengine/mmcecli/src/mcemediastream.cpp
multimediacommsengine/mmcecli/src/mcemessagecodec.cpp
multimediacommsengine/mmcecli/src/mcemessagesink.cpp
multimediacommsengine/mmcecli/src/mcemessagesource.cpp
multimediacommsengine/mmcecli/src/mcemessagestream.cpp
multimediacommsengine/mmcecli/src/mcemsrpcodec.cpp
multimediacommsengine/mmcecli/src/mcemsrpsink.cpp
multimediacommsengine/mmcecli/src/mcemsrpsource.cpp
multimediacommsengine/mmcecli/src/mcesession.cpp
multimediacommsengine/mmcecli/src/mcesessionutility.cpp
multimediacommsengine/mmceshared/inc/mceclientserver.h
multimediacommsengine/mmceshared/inc/mcecomaudiocodec.h
multimediacommsengine/mmceshared/inc/mcecomcodec.h
multimediacommsengine/mmceshared/inc/mcecomexternalsink.h
multimediacommsengine/mmceshared/inc/mcecomexternalsource.h
multimediacommsengine/mmceshared/inc/mcecomfactory.h
multimediacommsengine/mmceshared/inc/mcecommediastream.h
multimediacommsengine/mmceshared/inc/mcecommessagecodec.h
multimediacommsengine/mmceshared/inc/mcecommessagesink.h
multimediacommsengine/mmceshared/inc/mcecommessagesource.h
multimediacommsengine/mmceshared/inc/mcecommessagestream.h
multimediacommsengine/mmceshared/inc/mcecommsrpcodec.h
multimediacommsengine/mmceshared/inc/mcecommsrpsink.h
multimediacommsengine/mmceshared/inc/mcecommsrpsource.h
multimediacommsengine/mmceshared/inc/mcecomvideocodec.h
multimediacommsengine/mmceshared/inc/mceevents.h
multimediacommsengine/mmceshared/inc/mceserial.h
multimediacommsengine/mmceshared/inc/mceserial.inl
multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp
multimediacommsengine/mmceshared/src/mcecomaudiocodec.cpp
multimediacommsengine/mmceshared/src/mcecomcodec.cpp
multimediacommsengine/mmceshared/src/mcecomexternalsink.cpp
multimediacommsengine/mmceshared/src/mcecomexternalsource.cpp
multimediacommsengine/mmceshared/src/mcecomfactory.cpp
multimediacommsengine/mmceshared/src/mcecommediastream.cpp
multimediacommsengine/mmceshared/src/mcecommessagecodec.cpp
multimediacommsengine/mmceshared/src/mcecommessagesink.cpp
multimediacommsengine/mmceshared/src/mcecommessagesource.cpp
multimediacommsengine/mmceshared/src/mcecommessagestream.cpp
multimediacommsengine/mmceshared/src/mcecommsrpcodec.cpp
multimediacommsengine/mmceshared/src/mcecommsrpsink.cpp
multimediacommsengine/mmceshared/src/mcecommsrpsource.cpp
multimediacommsengine/mmceshared/src/mcecomsession.cpp
multimediacommsengine/mmceshared/src/mcecomvideocodec.cpp
multimediacommsengine/mmceshared/src/mceserial.cpp
multimediacommsengine/mmcesrv/group/mceserver.mmp
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediadefs.h
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediamanager.h
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediasdpcodec.h
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemessagesdpcodec.h
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesdpsession.h
multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesrvstream.h
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediaidle.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediamanager.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemessagesdpcodec.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcepreparingstreams.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp
multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp
multimediacommsengine/mmcesrv/mmceserver/src/mceactionset.cpp
--- a/ipappsrv_plat/media_control_api/inc/mmcccodecinformation.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmcccodecinformation.h	Mon Sep 06 17:32:13 2010 +0530
@@ -48,10 +48,12 @@
 _LIT8( KH2632000SdpName, "H263-2000" );
 _LIT8( KAVCSdpName, "H264" );
 _LIT8( KAACSdpName, "AAC" );
+_LIT8( KMSRPSdpName, "message codec" );
 _LIT8( KIlbcFmtp, "mode=" );
 _LIT8( KSemicolonSpace, "; " );
 _LIT8( KCommaSign, "," );
 const TInt KPTimeFactor = 1000;
+static const TUid KUidMediaTypeMessage = {0x10289999};
 
 // Maximum buffer length for SDP names
 const TInt KMaxSdpNameLength = 20;
@@ -115,6 +117,9 @@
 // ( 'H', '2', '6', '4' )
 const TUint32 KMccFourCCIdAVC = 0x461A1BDD;
 
+// ( 'M', 'S', 'R', 'P' )
+const TUint32 KMccFourCCIdMSRP = 6789;
+
 // Red - not official
 const TUint32 KMccFourCCIdRed = 0x4DDDDDDD;
 
--- a/ipappsrv_plat/media_control_api/inc/mmccevents.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmccevents.h	Mon Sep 06 17:32:13 2010 +0530
@@ -71,6 +71,10 @@
 const TMccEventType KMccUnknownMediaReceived = 27;
 const TMccEventType KMccMediaQualityStatus = 28;
 const TMccEventType KMccMasterKeyStaled = 29;
+const TMccEventType KMccFileSendCompleted = 30;
+const TMccEventType KMccFileSendProgressNotification = 31;
+const TMccEventType KMccFileReceiveCompleted = 32;
+const TMccEventType KMccFileReceiveProgressNotification = 33;
 
 const TMccRtcpPacketType KRtcpPacketUndefined = 0;
 const TMccRtcpPacketType KRtcpSdesPacket = 1;
--- a/ipappsrv_plat/media_control_api/inc/mmccinterface.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmccinterface.h	Mon Sep 06 17:32:13 2010 +0530
@@ -45,6 +45,8 @@
 const TUid KUidMccTranscoder    = { 0x10282897 };
 const TUid KUidMccAnySource     = { 0x10283394 };
 const TUid KUidMccAnySink       = { 0x10283395 };
+const TUid KUidMccMsrpSource     = { 0xA000EBE3 };
+const TUid KUidMccMsrpSink       = { 0xA000EBE4 };
 
 // MACROS
 
@@ -556,8 +558,35 @@
      */
     IMPORT_C TInt CancelMediaQualityRequest( 
         const TMccMediaQualityConfig& aConfig );
+   
+    /**
+    * Set remote msrp path and port number for a given session.
+    * @param aSessionId session ID
+    * @param aLinkId link ID
+    * @param aRemoteMsrpPath Remote msrp path to set
+    * @return One of the standard system-wide error codes.
+    */
+    IMPORT_C TInt SetRemoteMsrpPath( TUint32 aSessionId, TUint32 aLinkId,
+                                    TDes8& aRemoteAddr, TDes8& aConnStatus);
      
     /**
+    * Creates a new MCC link with a remote participant. Link creates
+    * new MSRP session with given network settings.
+    * @param aSessionId session ID
+    * @param aLinkType Defines is stream Up- or Downlink
+    * @param aLinkId ID of new link
+    * @param aNetSettings network settings for the link
+    * @param &aLocalMsrpPath Returned LocalMSRPPath from MSRP stack
+    * @return KErrNone if success; otherwise system wide error code.
+    */
+                              
+                              
+    IMPORT_C TInt CreateLink( TUint32 aSessionId,
+        TInt aLinkType,
+        TUint32& aLinkId,
+        TMccMsrpSettings& aNetSettings);
+    
+     /**
      * Returns the reference to handle to controller plugin which interface
      * use for sending custom commands.
      * Client representation of a controller plugin for
--- a/ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmccinterfacedef.h	Mon Sep 06 17:32:13 2010 +0530
@@ -40,6 +40,9 @@
 const TUid KMccVideoSinkUid     = { 0x102747D8 };
 const TUid KMccAnySourceUid     = { 0x10283394 };
 const TUid KMccAnySinkUid       = { 0x10283395 };
+// MSRP Source and Sink UIDs same as KUidMccMsrpSink and Source values
+const TUid KMccMsrpSourceUid     = { 0xA000EBE3 };
+const TUid KMccMsrpSinkUid       = { 0xA000EBE4 };
 
 
 const TUint32 KMccAudioToPrivate = 3;
@@ -53,6 +56,7 @@
 const TInt KMccLinkGeneral = 100;     
 const TInt KMccLinkLocal = 101;    
 const TInt KMccLinkGeneralVideo = 102;
+const TInt KMccLinkMessage = 120;
 
 // Mcc stream types
 const TInt KMccAudioUplinkStream = 200;
@@ -63,6 +67,9 @@
 const TInt KMccVideoLocalStream = 205;
 const TInt KMccAudioDownlinkStandbyStream = 206;
 const TInt KMccDtmfStream = 207;
+const TInt KMccMessageUplinkStream = 220;
+const TInt KMccMessageDownlinkStream = 221;
+const TInt KMccMessageLocalStream = 222;
 
 const TInt KMccMaxBundleSize = 40;     
 
--- a/ipappsrv_plat/media_control_api/inc/mmccnetworksettings.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/media_control_api/inc/mmccnetworksettings.h	Mon Sep 06 17:32:13 2010 +0530
@@ -86,6 +86,53 @@
 
 typedef TPckgBuf<TMccNetSettings> TMccNetSettingsPackage;
 
+class TMccMsrpSettings: public TMccNetSettings
+    {
+public:
+    
+    inline TMccMsrpSettings(TMccNetSettings& aMccNetSettings)
+    {
+    iRemoteAddress = aMccNetSettings.iRemoteAddress;
+    iRemoteRtcpPort = aMccNetSettings.iRemoteRtcpPort;
+    iLocalAddress = aMccNetSettings.iLocalAddress;
+    iLocalPublicAddress = aMccNetSettings.iLocalPublicAddress;
+    iLocalRtcpPort = aMccNetSettings.iLocalRtcpPort;
+    iLocalPublicRtcpPort = aMccNetSettings.iLocalPublicRtcpPort;
+    iMediaQosValue = aMccNetSettings.iMediaQosValue;
+    iIapId = aMccNetSettings.iIapId;
+    
+    iLocalMsrpPath = NULL ;
+    iFileName = NULL;
+    iFileSize = 0;
+    iFileType= NULL;
+    iFileShare= EFalse;
+    iFTProgressNotification = EFalse;
+    };
+    
+    
+    inline TMccMsrpSettings() :
+        TMccNetSettings()
+        {
+        iLocalMsrpPath = NULL;
+        iFileName = NULL;
+        iFileSize = 0;
+        iFileType=NULL;
+        iFileShare = EFalse;
+        iFTProgressNotification = EFalse;
+        };
+            
+    public:
+        //not owned
+        HBufC8*    iLocalMsrpPath;
+        //not owned
+        HBufC16*   iFileName;
+        TInt       iFileSize; 
+        // not owned
+        HBufC8*    iFileType;
+        TBool      iFileShare;
+        TBool      iFTProgressNotification;
+    };
+
 #endif /* MMCCNETWORKSETTINGS_H */
 
 // End of File
--- a/ipappsrv_plat/multimedia_comms_api/group/bld.inf	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/group/bld.inf	Mon Sep 06 17:32:13 2010 +0530
@@ -71,4 +71,15 @@
 ../inc/mcetransactiondatacontainer.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcetransactiondatacontainer.h)
 ../inc/mcevideocodec.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcevideocodec.h)
 ../inc/mcevideostream.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcevideostream.h)			
-			
+../inc/mceexternalsink.h     MW_LAYER_PLATFORM_EXPORT_PATH(mceexternalsink.h)
+../inc/mceexternalsource.h     MW_LAYER_PLATFORM_EXPORT_PATH(mceexternalsource.h)
+../inc/mcemsrpsink.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcemsrpsink.h)
+../inc/mcemsrpsource.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcemsrpsource.h)	
+../inc/mcemessagesink.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcemessagesink.h)
+../inc/mcemessagesource.h     MW_LAYER_PLATFORM_EXPORT_PATH(mcemessagesource.h)
+../inc/mcemessagestream.h   MW_LAYER_PLATFORM_EXPORT_PATH(mcemessagestream.h)
+../inc/mcemsrpcodec.h   MW_LAYER_PLATFORM_EXPORT_PATH(mcemsrpcodec.h)
+../inc/mcemessagecodec.h   MW_LAYER_PLATFORM_EXPORT_PATH(mcemessagecodec.h)
+../inc/mcesessionutility.h	MW_LAYER_PLATFORM_EXPORT_PATH(mcesessionutility.h)			
+../inc/mcedatasinkobserver.h	MW_LAYER_PLATFORM_EXPORT_PATH(mcedatasinkobserver.h)
+../inc/mcefilesharingobserver.h	MW_LAYER_PLATFORM_EXPORT_PATH(mcefilesharingobserver.h)			
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mccdatareceiver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,66 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATARECEIVER_H
+#define MCCDATARECEIVER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+#include "mccdatareceiverobserver.h"
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccDataReceiver class declaration
+*/
+class CMccDataReceiver : public CActive
+	{
+    public:
+    
+	    static CMccDataReceiver* NewL( MMccDataReceiverObserver& aObserver );
+		
+	    ~CMccDataReceiver(); 
+		
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMccDataReceiver( MMccDataReceiverObserver& aObserver );
+	    void ConstructL(); // second construction phase
+	    TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+		RMsgQueue<TQueueBuffer> iMsgQueue;	
+		RMsgQueue<TQueueBuffer> iMsgQueue1;    
+		RMsgQueue<TQueueBuffer> iMsgQueue2;    
+		MMccDataReceiverObserver* iObserver;
+    };
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mccdatareceiverobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,42 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATARECEIVEROBSERVER_H
+#define MCCDATARECEIVEROBSERVER_H
+
+#include <E32Base.h>
+
+// CLASS DECLARATION
+
+/**
+*  CMccDataReceiver class declaration
+*/
+class MMccDataReceiverObserver
+	{
+    public:
+    
+		virtual void DataReceivedL( const TDesC8& aData ) = 0;
+
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mccdatasender.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,70 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATASENDER_H
+#define MCCDATASENDER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccPeriodicRunner class declaration
+*/
+class CMccDataSender : public CActive
+	{
+    public:
+    
+	    static CMccDataSender* NewL();
+		
+	    ~CMccDataSender(); 
+		
+	public:
+	 
+	 	void Send( const TDesC8& aData );
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMccDataSender();
+	    void ConstructL(); // second construction phase
+	    TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+		RMsgQueue<TQueueBuffer> iSendMsgQueue;
+		RMsgQueue<TQueueBuffer> iSendMsgQueue1;
+		RMsgQueue<TQueueBuffer> iSendMsgQueue2;
+		TQueueBuffer iBuffer;
+		TBool iReady;
+		 
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcedatasinkobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,58 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef MMCEDATASINKOBSERVER_H
+#define MMCEDATASINKOBSERVER_H
+
+// INCLUDES
+#include <e32std.h>
+
+// FORWARD DECLARATIONS
+class CMceMediaStream;
+class CMceMediaSink;
+
+// CLASS DECLARATION
+
+/**
+*  An interface to be implemented by users of MCE if they wish to receive
+*  data from CMceDataSink.
+*
+*  This observer is set using CMceManager::SetDataSinkObserver function.
+*
+*  @lib mceclient.lib
+*/
+class MMceDataSinkObserver
+	{
+	public: 
+
+	    /**
+	    * Data received fro stream.
+	    * @param aStream, the stream that uses the sink.
+	    * @param aSink, the sink that received data.
+	    * @param aData, received data.
+	    */
+	    virtual void DataReceived (
+	                    CMceMediaStream& aStream,
+	                    CMceMediaSink& aSink,
+	                    const TDesC8& aData ) = 0;
+
+	};
+
+#endif
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcedefs.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcedefs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -50,6 +50,23 @@
 _LIT8( KMceSDPNameH2631998, "H263-1998" );
 _LIT8( KMceSDPNameH264, "H264" );
 
+_LIT8( KMceSDPNameMsrp, "message codec" );
+_LIT8( KMceSDPNamePath, "path" );
+_LIT8( KMceSDPNameAcceptTypes, "accept-types" );
+_LIT8( KMceSDPNameAcceptWrappedTypes, "accept-wrapped-types" );
+_LIT8( KMCESDPNameFileselector, "file-selector");
+_LIT8( KMCESDPNameFiletransferid, "file-transfer-id");
+_LIT8( KMCESDPNameFiledisposition, "file-disposition");
+_LIT8(KMceSDPNameConnection, "connection");
+_LIT8( KMceSDPFileName, "name:");
+_LIT8( KMceSDPFileType, " type:");
+_LIT8( KMceSDPFileSize, " size:");
+_LIT8( KMceMediaMessage,"message");
+_LIT8( KMceSDPMsrpTcp,"TCP/MSRP");
+_LIT8( KMceSDPMsrpTls, "TCP/TLS/MSRP");
+_LIT8( KMceAcceptWrappedTypes, "*");
+
+
 typedef TInt TMceReturnStatus;
 const TMceReturnStatus KMceAsync = 1;
 const TMceReturnStatus KMceReady = 0;
@@ -215,7 +232,17 @@
     friend class CMceG711CodecTest;\
     friend class CMceSecureInSessionTest;\
     friend class CMceAvcCodecTest;\
-    friend class CMceSecureOutSessionTest;
+    friend class CMceSecureOutSessionTest;\
+    friend class CMceMessageStreamTest;\
+    friend class CMceMsrpSourceTest;\
+    friend class CMceMsrpSinkTest;\
+    friend class CMceExternalSourceTest;\
+    friend class CMceExternalSinkTest;\
+    friend class CMceSessionUtilityTest;\
+    friend class CMceMessageSinkTest;\
+    friend class CMceMessageSourceTest;\
+    friend class CMceMessageCodecTest;\
+    friend class CMceMsrpCodecTest;
 #else
 #define MCE_UNIT_TEST_DEFS
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mceexternalsink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,84 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEEXTERNALSINK_H
+#define CMCEEXTERNALSINK_H
+
+// INCLUDES
+#include <e32std.h>  
+#include <MceMediaSink.h>
+
+// CONSTANTS
+const TMceSinkType KMceExternalSink = 6;
+
+// CLASS DECLARATION
+
+/**
+* Class representing a sink for a media stream that is implemented outside MCE.
+* 
+*  @lib mceclient.lib
+*/
+class CMceExternalSink: public CMceMediaSink
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceExternalSink* NewL();
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceExternalSink* NewLC();
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CMceExternalSink();
+
+    public: // From CMceMediaSource
+
+        /**
+        * Sets the sink enabled. 
+        */
+        IMPORT_C void EnableL(); 
+
+        /**
+        * Sets the sink disabled.
+        */
+        IMPORT_C void DisableL();
+	
+	private:
+		/**
+	     * C++ default constructor.
+	     */
+		CMceExternalSink();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL();
+		
+        //for testing
+
+        MCE_UNIT_TEST_DEFS 
+    };
+
+#endif // CMCEEXTERNALSINK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mceexternalsource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,86 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEEXTERNALSOURCE_H
+#define CMCEEXTERNALSOURCE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <mcemediasource.h>
+
+// CONSTANTS
+const TMceSourceType KMceExternalSource = 6;
+
+// CLASS DECLARATION
+/**
+* Class representing a source for a media stream that is implemented outside MCE.
+* 
+*  @lib mceclient.lib
+*/
+class CMceExternalSource: public CMceMediaSource
+    {
+
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceExternalSource* NewL();
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceExternalSource* NewLC();
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CMceExternalSource();
+
+    public: // From CMceMediaSource
+
+        /**
+        * Sets the source enabled.
+        */
+        IMPORT_C void EnableL(); 
+
+        /**
+        * Sets the source disabled.
+        */
+        IMPORT_C void DisableL(); 
+	
+	private: //methods
+
+	    /**
+	     * C++ default constructor.
+	     */
+		CMceExternalSource();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL();
+		
+        //for testing
+
+        MCE_UNIT_TEST_DEFS 
+    };
+
+
+#endif // CMCEEXTERNALSOURCE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcefilesharingobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,74 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef MMCEFILESHARINGOBSERVER_H
+#define MMCEFILESHARINGOBSERVER_H
+
+// INCLUDES
+#include <e32std.h>
+
+// FORWARD DECLARATIONS
+class CMceMediaStream;
+class CMceMediaSink;
+
+// CLASS DECLARATION
+
+/**
+*  An interface to be implemented by users of MCE if they wish to receive
+*  data from CMceDataSink.
+*
+*  This observer is set using CMceManager::SetFileSharingObserver function.
+*
+*  @lib mceclient.lib
+*/
+class MMceFileSharingObserver
+	{
+	public: 
+
+        /**
+         * Will be invoked when sending file completes
+         * 
+         * @return KErrNone if successful otherwise any of the system wide error
+         */
+	    void virtual SendFileCompleted(TInt error) = 0;
+	    
+	    /**
+	     * Will be called when the receiving of the file completes. 
+	     * @return KErrNone if successful otherwise any of the system wide error
+	     */
+	    void virtual ReceiveFileCompleted(TInt error) = 0;
+	    
+	    /**
+	     * Progress notificaiton on sending the file
+	     * @return aBytesTransferred. holds the part of the file size in bytes which has been set successfully
+	     * @return aTotalBytesOffile. Total size of the file being sent in bytes
+	     */
+	    void virtual SendFileProgressNotification(TUint32 aBytesTransferred, TUint32& aTotalBytesOffile) = 0;
+	    
+	    /**
+	     * Progress notificaiton on receiving file
+	     * @return aReceivedBytes. holds the part of the file size in bytes which has been received successfully
+         * @return aTotalBytesOffile. Total size of the file being sent in bytes 
+	     */
+	    void virtual ReceiveFileProgressNotification(TUint32 aReceivedBytes, TUint32 aTotalBytesOfFile) = 0;
+	    
+	};
+
+#endif
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcemanager.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemanager.h	Mon Sep 06 17:32:13 2010 +0530
@@ -50,10 +50,13 @@
 class TMceMediaId;
 class CMceAudioCodec;
 class CMceVideoCodec;
+class CMceMessageCodec;
 class CMceItcSender;
 class TMceTransactionDataContainer;
 class CMceFileSource;
 class TMceIds;
+class MMceDataSinkObserver;
+class MMceFileSharingObserver;
 
 // CLASS DECLARATION
 
@@ -228,6 +231,33 @@
 	    IMPORT_C CDesC8Array* DefaultHeadersL( const TDesC8& aMethod ) const;
 
 	    
+        /**
+        * Sets observer for data sink events.
+        * @param aDataSinkObserver, observer of the event. Ownership is
+		*	     not transferred. May be NULL to remove observer.
+        */
+		IMPORT_C void SetDataSinkObserver(
+					 MMceDataSinkObserver* aDataSinkObserver );
+		
+		
+		/**
+		 * Sets observer for data sink events.
+		 * @param aDataSinkObserver, observer of the event. Ownership is
+		 *        not transferred. May be NULL to remove observer.
+		 */
+		IMPORT_C void SetFileSharingObserver(
+		        MMceFileSharingObserver* aFileSharingObserver );
+				
+	
+		/**
+        * Returns supported message codecs of the system.
+        * @return supported message codecs of the system.
+        */
+        IMPORT_C const RPointerArray<const CMceMessageCodec>& SupportedMessageCodecs() const;
+        
+        /*
+		
+			
 	public: // Functions
 
 	    /**
@@ -292,6 +322,16 @@
         MMceInTransactionObserver* InTransactionObserver() const;
                            
                 
+        /**
+        * Gets data sink observer
+        * @return data sink observer
+        */
+        MMceDataSinkObserver* DataSinkObserver() const;
+        
+        /*
+         * 
+         */
+        MMceFileSharingObserver* FileSharingObserver() const;
         
         /**
         * Gets dtmf observer
@@ -388,7 +428,12 @@
 	     */
 	    void ReceiveSupportedVideoCodecsL();
 	    
-	    /**
+        /**
+         * Receives supported Message codecs
+         */
+        void ReceiveSupportedMessageCodecsL();
+
+        /**
 	    * Session registers itself to manager
 	    * @param aSession the session
 	    * @param aParams parameter list for dialog creation
@@ -522,7 +567,12 @@
 	     */
 	    RPointerArray<const CMceVideoCodec> iSupportedVideoCodecs;
 	    
-	    /**
+        /**
+         * supported message codecs
+         */
+        RPointerArray<const CMceMessageCodec> iSupportedMessageCodecs;
+        
+        /**
 	     * manager receiver for sessions
 	     */
 	    CMceManagerReceiver* iSessionReceiver;
@@ -617,7 +667,17 @@
         * Dtmf observer.
         */
         MMceDtmfObserver* iDtmfObserver;
-                	    
+
+        /**
+        * data sink observer.
+        */
+        MMceDataSinkObserver* iDataSinkObserver;
+        
+        /*
+         * file sharing observer
+         */
+        MMceFileSharingObserver* iFileSharingObserver;
+        
     private: // Reserved for future use
     
         TAny* iReserved;       
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcemediastream.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemediastream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -77,7 +77,10 @@
 	        EDisabled,            // Stream is explicitly disabled
 	        ENoResources,         // Stream has no needed resources to stream
 	        ETranscodingRequired, // Stream requires non-realtime transcoding
-	        ETranscoding          // Stream is transcoding in non-realtime
+	        ETranscoding,           // Stream is transcoding in non-realtime
+			EFileSendInProgress,    // Sending a file is in progress
+	        EFileTransferCompleted, // either send/receive of file is completed
+	        EFileReceiveInProgress // Receiving a file is in progress 
 	        };
 	        
 	public: // Destructor
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemessagecodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,153 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef MCEMESSAGECODEC_H
+#define MCEMESSAGECODEC_H
+
+// INCLUDES
+#include <e32base.h>
+#include <mcedefs.h>
+#include <mcecodec.h>
+
+// FORWARD DECLARATIONS
+class RReadStream;
+class RWriteStream;
+class CMceComMessageCodec;
+class CMceMediaStream;
+class TMceIds;
+class TMceEvent;
+class TMceMediaId;
+class TMceFactory;
+class TMceTextCodecFactory;
+class CMceCommessageCodec;
+
+// CLASS DECLARATION
+
+/**
+* Container class for message codecs.
+*
+*  @lib mceclient.lib
+*/
+class CMceMessageCodec : public CMceCodec
+    {
+	public:  // Constructors and destructor
+	        
+	    /**
+	    * Destructor.
+	    */
+	    virtual ~CMceMessageCodec();
+
+	public: // New functions
+	        
+	    /**
+	    * Enable / Disable Voice Activity Detection.
+	    * @param aEnableVAD, Boolean indicating whether to enable Voice Activity Detection
+	    * @return KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
+	    */
+	    virtual TInt EnableVAD(TBool aEnableVAD) = 0;
+	    
+	    /**
+	    * Sets the sampling frequency.
+	    * @param aSamplingFreq, Sampling frequency to be used
+	    * @return KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
+	    */
+	    virtual TInt SetSamplingFreq(TUint aSamplingFreq) = 0;
+	    
+	    /**
+	    * Sets the packetization rate. 
+	    * @param aPTime, Packetization rate, must be multiple of audio frame size.
+	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+	    */
+	    virtual TInt SetPTime(TUint aPTime) = 0;        
+	    
+	    /**
+	    * Sets the maximum packetization rate.
+	    * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
+	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+	    */
+	    virtual TInt SetMaxPTime(TUint aMaxPTime) = 0; 
+	          
+	    /**
+	    * Clones codec, ownership is transferred.
+	    * @return cloned codec
+	    */
+	    virtual CMceMessageCodec* CloneL() const = 0;
+	    
+	    /**
+	    * Gets sampling frequency used currently.
+	    * @return Sampling frequency
+	    */
+	    virtual TUint SamplingFreq() const;
+
+	    /**
+	    * Get VAD status.
+	    * @return Boolean indicating is VAD activated
+	    */
+	    virtual TBool VAD() const;
+	    
+	    /**
+	    * Gets the packetization rate.
+	    * @return packetization rate.
+	    */
+	    virtual TUint PTime() const;        
+	    
+	    /**
+	    * Gets max packetization rate.
+	    * @return Max packetization rate.
+	    */
+	    virtual TUint MaxPTime() const;
+
+	public: 
+
+	    /**
+	    * Initializes 
+	    * @param aParent the parent
+	    */
+	    virtual void InitializeL( CMceMediaStream& aParent );    
+	                
+	    /**
+	    * Factory
+	    * @return factory
+	    */
+	    //static TMceMessageCodecFactory Factory();
+	                
+	protected:  // New functions
+
+	    /**
+	    * C++ default constructor.
+	    */
+	    CMceMessageCodec();
+
+	    /**
+	     * second-phase constructor
+	     * @paramaFlatData flat data container
+	     * @param aType type of sink
+	     */
+		void ConstructL( CMceComMessageCodec* aFlatData );
+
+
+		//for testing
+
+	    MCE_UNIT_TEST_DEFS	
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemessagesink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,114 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEMESSAGESINK_H
+#define CMCEMESSAGESINK_H
+
+// INCLUDES
+#include <e32std.h>  
+#include <mcedatasinkobserver.h>
+
+
+// FORWARD DECLARATIONS
+class CMceManager;
+class CMceItcSender;
+class CMceDataReceiver;
+#include <MceMediaSink.h>
+
+// CONSTANTS
+const TMceSinkType KMceMessageSink = 12;
+
+// CLASS DECLARATION
+
+/**
+* Class representing a sink for a media stream that is implemented outside MCE.
+* 
+*  @lib mceclient.lib
+*/
+class CMceMessageSink: public CMceMediaSink, public MMceDataSinkObserver
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+		IMPORT_C static CMceMessageSink* NewL( CMceManager& aManager );
+
+	    /**
+	    * Two-phased constructor.
+	    * @param aManager reference to the manager
+	    */
+		IMPORT_C static CMceMessageSink* NewLC( CMceManager& aManager );
+
+	    /**
+	    * Destructor.
+	    */
+		IMPORT_C ~CMceMessageSink();
+
+
+	public: // From CMceMediaSink
+
+	    /**
+	    * Enables the sink explicitly.
+	    */
+		IMPORT_C void EnableL(); 
+
+	    /**
+	    * Disables the sink explicitly.
+	    */
+		IMPORT_C void DisableL(); 
+    		    
+	public: 
+
+	    /**
+	    * Two-phased constructor.
+	    */
+	    static CMceMessageSink* NewL();
+
+	    /**
+	    * Two-phased constructor.
+	    */
+		static CMceMessageSink* NewLC();
+
+	private:
+                           
+		void DataReceived( CMceMediaStream& aStream,
+	        CMceMediaSink& aSink, const TDesC8& aData );
+	
+	private:
+
+	    /**
+	     * C++ constructor.
+	     */
+		CMceMessageSink();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL( CMceManager* aManager );
+		
+    private: // Reserved for future use
+    
+        CMceDataReceiver* iReceiver;
+        TAny* iReserved;    
+        
+        MCE_UNIT_TEST_DEFS
+    };
+
+#endif // CMCEMESSAGESINK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemessagesource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,119 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEMESSAGESOURCE_H
+#define CMCEMESSAGESOURCE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <mcemediasource.h>
+
+//FORWARD DECLARATIONS
+class CMceManager;
+class CMceItcSender;
+class CMceDataSender;
+
+// CONSTANTS
+const TMceSourceType KMceMessageSource = 12;
+
+// CLASS DECLARATION
+/**
+* Class representing a source for a Message stream.
+* 
+*  @lib mceclient.lib
+*/
+class CMceMessageSource: public CMceMediaSource
+    {
+
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceMessageSource* NewL(CMceManager& aManager);
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceMessageSource* NewLC(CMceManager& aManager);
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CMceMessageSource();
+
+    public: // From CMceMediaSource
+
+        /**
+        * Sets the source enabled.
+        */
+        IMPORT_C void EnableL(); 
+
+        /**
+        * Sets the source disabled.
+        */
+        IMPORT_C void DisableL(); 
+        
+	public: // New functions
+
+	    /**
+	    * Sends data into stream
+	    */
+        IMPORT_C void SendDataL( const TDesC8& aData ); 
+	public: // internal
+	
+	    /**
+	    * Initializes 
+	    * @param aManager the manager. Ownership is NOT transferred
+	    */
+	    void InitializeL( CMceManager* aManager );
+    public:
+
+	    /**
+	    * Two-phased constructor.
+	    */
+		static CMceMessageSource* NewL();
+
+	    /**
+	    * Two-phased constructor.
+	    */
+		static CMceMessageSource* NewLC();
+
+	private: //methods
+
+	    /**
+	     * C++ default constructor.
+	     */
+		CMceMessageSource();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL(CMceManager* aManager);
+		
+	    void ConstructL();
+    
+		
+	private:
+	    
+        CMceDataSender* iDataSender;
+        TAny* iReserved;  
+    };
+
+#endif // CMCEMESSAGESOURCE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemessagestream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,246 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEMESSAGESTREAM_H
+#define CMCEMESSAGESTREAM_H
+
+//  INCLUDES          
+#include <e32std.h>
+#include <mcemediastream.h>
+
+// CONSTANTS
+const TMceMediaType KMceMessage = 3;
+
+// FORWARD DECLARATIONS
+class CMceMessageCodec;
+
+// CLASS DECLARATION
+
+/**
+* Class for representing a message stream.
+*
+* It defines the used messgae codecs for the stream.
+* In order to be complete structure, at least one codec is required.
+*
+*  @lib mceclient.lib
+*/
+class CMceMessageStream: public CMceMediaStream
+    {
+    
+    public:
+        enum TConnSetup
+            {
+            EActive=0,
+            EActpass,
+            EPassive
+            };
+        enum TMsrpConnectionUsage
+            {
+            ENew = 0,
+            EExisting
+            };
+    
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C static CMceMessageStream* NewL();
+
+	    /**
+	    * Two-phased constructor.
+	    */
+        IMPORT_C static CMceMessageStream* NewLC();
+
+	    /**
+	    * Destructor.
+	    */
+        IMPORT_C ~CMceMessageStream();
+
+	public: // Functions
+
+        /**
+         * The MCE extracts the host addr and the port for both local and remote ends 
+         * from the MSRP path attribute if passed parameter is set to TRUE 
+         * otherwise it uses SDP c and m lines. 
+         * @param usePathAttr MCE sets the host addr and port depende upon the valus of this bool parameter
+         *        The default value is ETrue
+         */
+        IMPORT_C void DoExtractHostAddrAndPortFromMsrpPathAttr(TBool usePathAttr = ETrue);
+
+
+
+	    /**
+	    * Returns the available codecs to the session.
+	    * For CMEOutSession, array contains all codecs supported by
+	    * terminal in default. For CMEInSession, array contains codecs
+	    * that were offered by remote terminal, and supported by local terminal.
+	    * Codecs are in preference order in the array.
+	    * Codec in the first element of the array has highest preference.
+	    * @return codecs available for the session.
+	    */
+		IMPORT_C const RPointerArray<CMceMessageCodec>& Codecs();
+	    /**
+	    * Adds codec to the stream.
+	    * @param aCodec codec added to the stream; ownership is transferred
+	    */
+		IMPORT_C void AddCodecL( CMceMessageCodec* aCodec );
+	    /**
+	    * Removes codec from the stream
+	    * @param aCodec codec removed from stream
+	    */
+		IMPORT_C void RemoveCodecL( CMceMessageCodec& aCodec );
+
+		/**
+	    * Replaces codecs of the stream. Codecs should be in preference order in
+	    * the passed array.
+	    * @param aCodecs array of codecs which will replace existing codecs;
+	    *        ownership is transferred
+	    */
+		IMPORT_C void ReplaceCodecsL( RPointerArray<CMceMessageCodec>* aCodecs );
+
+         /* Returns true if Msrp Path attribute is used for either setting or getting
+         * the host address and port number for both local and remote end points
+         * @return Either ETRUE or EFALSE  
+         */
+        IMPORT_C TBool IsMsrpPathAttrPreferredForHostAddrAndPort();
+
+        /*
+         * Used to set up the connection negostiaiton .The value of this decides who initiates the 
+         *  Msrp TCP connection establishment. 
+         * refer http://tools.ietf.org/html/draft-ietf-simple-msrp-acm-02 on how to set this API.
+         * @param TConnSetup.  
+         */
+        IMPORT_C void ConnectionSetUpL(TConnSetup  aSetup);
+        
+        /*
+         * Returns the conneciton setup value. 
+         * @return TConnSetup. Retunrs the value configured using the API ConnectionSetUp
+         */
+        IMPORT_C TConnSetup GetConnectionSetup();
+
+
+	public: // serialization
+	
+
+        /**
+         * Re-establishment of the MSRP TCP based connection as per RFC 4145
+         * It creates the SDP media level line (a=connection)
+         * @param aReUse  The default value for this is 'EFalse'
+         */
+        //IMPORT_C void ReuseMsrpConnectionL(TMsrpConnectionUsage aUsage = CMceMessageStream::ENew);
+        IMPORT_C void ReuseMsrpConnectionL(TBool aReUse = EFalse);
+
+
+
+	    /**
+	    * Internalizes
+	    * @param aReadStream read stream
+	    * @param aTarget to which read to
+	    */
+	    void InternalizeL( MMceComSerializationContext& aSerCtx );
+
+	    /**
+	    * Externalizes
+	    * @param aWriteStream write stream
+	    */
+	    void ExternalizeL( MMceComSerializationContext& aSerCtx );
+
+
+	public: //from CMceMediaStream
+
+	    /**
+	    * Initializes
+	    * @param aParent the parent
+	    */
+	    void InitializeL( CMceSession& aParent );
+
+	    /**
+	    * Initializes
+	    * @param aManager the manager. Ownership is NOT transferred
+	    * @param aSession the Session.
+	    */
+        void InitializeL( CMceManager* aManager, CMceSession& aSession );
+
+	    /**
+	    * Traversal event handler
+	    * @param aEvent the event
+	    * @return status, if event was consumed or not or object needs update
+	    */
+	    TInt EventReceivedL( TMceEvent& aEvent );
+
+	    /**
+	    * Called file source wants to synchronized with stream
+	    * @param aFile the file source
+	    */
+        void SynchronizeWithFileL( CMceFileSource& aFile );
+
+        /**
+        * Searches for codec matching with input codec instance or sdp name
+        * @param aCodec the search term
+        * @return matching codec or NULL if not found
+        */
+        CMceCodec* FindCodec( CMceCodec& aCodec );
+
+    public: //internal
+
+      /**
+	    * Arranges codec priority order based on codecs preference values.
+	    * @param aDiscardUnusedCodecs ETrue if all disabled codecs should
+	    *        be removed from the stream
+	    */
+        void ReorderCodecsByPreferenceL( TBool aDiscardUnusedCodecs );
+        
+        /**
+        * Removes codec
+        * @param aCodec
+        * @param aBinderOriginated
+        */
+        void RemoveCodecL( CMceMessageCodec& aCodec, TBool aBinderOriginated );
+
+        /**
+        * Return codecs of stream.
+        * @return list of codecs in the stream.
+        */
+        const RPointerArray<CMceCodec>& BaseCodecs();
+	
+	private:
+			    /**
+	     * C++ default constructor.
+	     */
+		CMceMessageStream();
+
+	    /**
+	    * Second-phase constructor.
+	    */
+		void ConstructL();
+
+		//for testing
+
+		MCE_UNIT_TEST_DEFS 
+
+	private: // Owned data
+
+	    /**
+	     * codecs
+	     */
+		RPointerArray<CMceMessageCodec> iCodecs;
+    };
+
+#endif // CMCEMESSAGESTREAM_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemsrpcodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,161 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef MCEMSRPCODEC_H
+#define MCEMSRPCODEC_H
+
+// INCLUDES
+#include <mcemessagecodec.h>
+#include <mcedefs.h>
+
+// CONSTANTS
+
+//recommended 200
+const TUint KMceT140DefaultMaxPtime = 200;
+const TUint KMceT140DefaultPtime = 20;
+
+// DATA TYPES
+enum TMsrpCodecMode
+    {
+    EMceMode1 = 4,
+    EMceMode2
+    };
+
+// CLASS DECLARATION
+
+/**
+* Class for the MSRP dummy codec information.
+*
+*  @lib mceclient.lib
+*/
+class CMceMsrpCodec : public CMceMessageCodec
+    {
+	public:  // Constructors and destructor
+	    
+	    /**
+	    * Destructor.
+	    */
+	    IMPORT_C ~CMceMsrpCodec();
+	        
+	public: // From base class
+
+	    /**
+	    * Enable / Disable Voice Activity Detection.
+	    * @param aEnableVAD, Boolean indicating whether to enable Voice Activity Detection
+	    * @return KErrNotSupported if codec doesn't support VAD; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt EnableVAD(TBool aEnableVAD);
+
+	    /**
+	    * Sets bitrate used with codec for encoding.
+	    * @param aBitrate, bitrate value for encoding
+	    * @return KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetBitrate(TUint aBitrate);
+	    
+	    /**
+	    * Sets bitrates allowed with codec.
+	    * @param aBitrates, allowed bitrate values (like KMceAmrNbBitrate590|KMceAmrNbBitrate670)
+	    * @return KErrNotSupported if codec doesn't support bitrate value issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetAllowedBitrates(TUint aBitrates);
+	        
+	    /**
+	    * Sets the sampling frequency.
+	    * @param aSamplingFreq, Sampling frequency to be used
+	    * @return KErrNotSupported if codec doesn't support sampling frequency issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetSamplingFreq(TUint aSamplingFreq);
+
+	    /**
+	    * Sets the packetization rate. 
+	    * @param aPTime, Packetization rate, must be multiple of audio frame size.
+	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetPTime(TUint aPTime);
+	    
+	    /**
+	    * Sets the maximum packetization rate.
+	    * @param aMaxPTime, maximum allowed packetization rate, must be multiple of audio frame size.
+	    * @return KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetMaxPTime(TUint aMaxPTime);
+
+	    /**
+	    * Sets the payload type identifier.
+	    * @param aPayloadType payload type identifier.
+	    * @return One of the standard system-wide error codes.
+	    */
+	    IMPORT_C TInt SetPayloadType(TUint8 aPayloadType);
+
+	    /**
+	    * Sets the codec mode.
+	    * @param aCodecMode	Codec mode ( Bandwidth efficient / octet aligned )
+	    * @return KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
+	    */
+	    IMPORT_C TInt SetCodecMode(TUint aCodecMode);
+	    
+	    /**
+	    * Clones codec, ownership is transferred.
+	    * @return cloned codec
+	    */
+	    IMPORT_C CMceMessageCodec* CloneL() const;
+
+	public: 
+
+	    /**
+	    * Two-phased constructor.
+	    * @param aSdpName sdp name
+	    */
+	    static CMceMsrpCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName);
+
+	    /**
+	    * Two-phased constructor.
+	    * @param aSdpName sdp name
+	    */
+	    static CMceMsrpCodec* NewLC(TBuf8<KMceMaxSdpNameLength> aSdpName);
+
+	    	    
+	private:
+
+	    /**
+	    * C++ default constructor.
+	    */
+	    CMceMsrpCodec();
+
+	    /**
+	    * By default Symbian 2nd phase constructor is private.
+	    */
+	    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName); 
+
+	    /**
+	    * Sets the sdp name.
+	    * @param aSdpName the sdp name
+	    */
+	    void SetSdpNameL( const TDesC8& aSdpName );
+
+		//for testing
+
+	    MCE_UNIT_TEST_DEFS	    
+    };
+
+
+#endif      
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemsrpsink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,184 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEMSRPSINK_H
+#define CMCEMSRPSINK_H
+
+// INCLUDES  
+#include <mcemediasink.h>
+#include <e32std.h>
+#include <bamdesca.h>
+#include<uri8.h>
+#include<e32des8.h>
+#include <mcemessagestream.h>
+#include <badesca.h>
+
+// CONSTANTS
+const TMceSinkType KMceMSRPSink = 5;
+
+// CLASS DECLARATION
+
+/**
+* Class representing a MSRP sink (RFC 4975).
+* 
+*  @lib mceclient.lib
+*/
+class CMceMsrpSink: public CMceMediaSink
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.        
+        */
+        IMPORT_C static  CMceMsrpSink* NewL();
+	
+		/**
+        * Two-phased constructor.
+        */
+		IMPORT_C static CMceMsrpSink* NewLC();
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CMceMsrpSink();
+
+    public: // From CMceMediaSink
+
+        /**
+        * Sets the sink enabled. 
+        */
+        IMPORT_C void EnableL(); 
+
+        /**
+        * Sets the sink disabled.
+        */
+        IMPORT_C void DisableL();
+
+    public: // New functions
+
+	/**
+        * Gets the value for "path" attribute.
+        */
+        IMPORT_C RPointerArray<TUriC8>& Path();
+
+	/**
+        * Sets the value for "path" attribute.
+        */
+        IMPORT_C void SetPathL( const RPointerArray<TUriC8>& aPath );
+
+	/**
+        * Gets the values for "accept-types" attribute.
+        */
+        IMPORT_C void AcceptTypesL(CDesC8ArrayFlat& aAcceptTypes);
+
+	/**
+        * Sets the values for "accept-types" attribute.
+        */
+        IMPORT_C void SetAcceptTypesL( const MDesC8Array& aAcceptTypes );
+        
+        /**
+         * Gets the values for "accept-wrapped-types" attribute
+         */
+        
+        IMPORT_C TDes8& AcceptWrappedTypesL();
+        
+        /**
+         * Sets the values for "accept-wrapped-types" attribute.
+         * @param aAcceptWrappedTypes list of MIME types that are allowed inside compound types 
+         */
+        
+        IMPORT_C void SetAcceptWrappedTypesL ( const TDes8& aAcceptWrappedTypes );
+        
+        /**
+         * Sets the values for file-selector attributes ('name', 'type', 'size').
+         * @param aName name of the file to be transferred
+         * @param aPath path of the file to be transferred
+         */            
+        IMPORT_C void SetFileSelectorL(const TDesC& aName = KNullDesC,
+                                       const TDesC8& aFileType = KNullDesC8,
+                                       TUint aSize = 0 );
+        
+        /**
+         * Sets the value for file-disposition attribute.
+         * @param aDispositionValue indicate a preferred disposition of the file to be transferred
+         */            
+        IMPORT_C void SetFileDispositionL (const TDes8& aDispositionValue);
+        
+        /**
+         * Sets the value for file-transfer-id attribute.
+         * @returns the value of the file-transfer-id
+         */
+        IMPORT_C void SetFileTransferIdL (TDes8& aId);
+        
+        /**
+         * Sets the information attribue.
+         * @param aInfo information to be set 
+         */
+        IMPORT_C void SetInformationAttrL(const TDes8& aInfo);
+        
+        /**
+         * Set the path to save the received file in file sharing use case
+         * It is mandatory for the clients to set this path to let
+         * the MCE know the path where the received file will be shared
+         * 
+         * @Param aFilePath Holds the path to save the received file
+         */
+        IMPORT_C void SetPathToSaveReceivedFile(const TDesC16& aFilePath);
+        
+        /*
+         * Used to get the file transfer progress notifications like transferred x bytes 
+         * out of total y file size. This is true by default. 
+         * @param enableFlag Default value is ETrue. 
+         */
+        IMPORT_C void EnableFileTransferProgressNotifications(TBool enableFlag = ETrue);
+        
+    public: // for internal purpose
+        /**
+         * 
+         */
+        void InitializeL( CMceMediaStream& aParent );
+        
+        
+    private: 
+		/**
+	     * C++ default constructor.
+	     */
+        CMceMsrpSink();
+		/**
+	     * C++ parameterized constructor.
+	     */        
+	
+		/**
+	     * Second phase constructior.
+	     */
+		 void ConstructL();
+		 
+         /**
+          * Sets the local media port form the MSRP path attribute
+          * @par aMsrpUri The Uri from which the port has to be extracted
+          * @aStream  Sets the local media port with the port extracted form the aMsrpUri 
+          */
+         void SetPortFromPathAttrL(TUriC8& aMsrpUri, CMceMessageStream& aStream);
+         
+         //for testing
+
+         MCE_UNIT_TEST_DEFS  
+    };
+
+#endif // CMCEMSRPSINK_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcemsrpsource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,183 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCEMSRPSOURCE_H
+#define CMCEMSRPSOURCE_H
+
+// INCLUDES
+#include <mcemediasource.h>
+#include <e32std.h>
+#include <bamdesca.h>
+#include<uri8.h>
+#include<e32des8.h>
+#include <mcemessagestream.h>
+#include <badesca.h>
+
+// CONSTANTS
+const TMceSourceType KMceMSRPSource = 5;
+
+// CLASS DECLARATION
+/**
+* Class representing a MSRP source (RFC 4975).
+* 
+*  @lib mceclient.lib
+*/
+class CMceMsrpSource: public CMceMediaSource
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.        
+        */
+        IMPORT_C static CMceMsrpSource* NewL();
+	
+		/**
+        * Two-phased constructor.
+        */
+		IMPORT_C static CMceMsrpSource* NewLC();
+
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CMceMsrpSource();
+
+    public: // From CMceMediaSource
+
+        /**
+        * Sets the source enabled.
+        */
+        IMPORT_C void EnableL(); 
+
+        /**
+        * Sets the source disabled.
+        */
+        IMPORT_C void DisableL();
+
+    public: // New functions
+
+        /**
+            * Gets the value for "path" attribute.
+            */
+            IMPORT_C RPointerArray<TUriC8>& Path();
+
+        /**
+            * Sets the value for "path" attribute.
+            */
+            IMPORT_C void SetPathL( const RPointerArray<TUriC8>& aPath );
+
+        /**
+            * Gets the values for "accept-types" attribute.
+            */
+            IMPORT_C void AcceptTypesL(CDesC8ArrayFlat& aAcceptTypes); 
+
+        /**
+            * Sets the values for "accept-types" attribute.
+            */
+            IMPORT_C void SetAcceptTypesL( const MDesC8Array& aAcceptTypes );
+            
+            /**
+             * Gets the values for "accept-wrapped-types" attribute
+             */
+            
+            IMPORT_C TDes8& AcceptWrappedTypesL();
+            
+            /**
+             * Sets the values for "accept-wrapped-types" attribute.
+             * @param aAcceptWrappedTypes list of MIME types that are allowed inside compound types 
+             */
+            
+            IMPORT_C void SetAcceptWrappedTypesL ( const TDes8& aAcceptWrappedTypes );
+            
+            /**
+             * Sets the values for file-selector attributes ('name', 'type', 'size').
+             * @param aName name of the file to be transferred
+             * @param aPath path of the file to be transferred
+             */            
+            IMPORT_C void SetFileSelectorL(const TDesC& aName = KNullDesC,
+                                           const TDesC8& aFileType = KNullDesC8,
+                                           const TUint aSize = 0 );
+            
+            /**
+             * Sets the value for file-disposition attribute.
+             * @param aVar indicate a preferred disposition of the file to be transferred
+             */            
+            IMPORT_C void SetFileDispositionL (const TDes8& aDispositionValue);
+            
+            /**
+             * Sets the value for file-transfer-id attribute.
+             * @returns the value of the file-transfer-id
+             */
+            IMPORT_C void SetFileTransferIdL (TDes8& aId);
+            
+            /**
+             * Sets the information attribue.
+             * @param aInfo information to be set 
+             */
+            IMPORT_C void SetInformationAttrL(const TDes8& aInfo);
+            
+            /**
+             * Set the path to save the received file in file sharing use case
+             * It is mandatory for the clients to set this path to let
+             * the MCE know the path where the received file will be saved
+             * 
+             * @Param aFilePath Holds the path to save the received file
+             */
+            IMPORT_C void SetPathToSaveReceivedFile(const TDesC16& aFilePath);
+            
+            /*
+             * Used to get the file transfer progress notifications like transferred x bytes 
+             * out of total y file size. This is true by default. 
+             * @param enableFlag Default value is ETrue. 
+             */
+            IMPORT_C void EnableFileTransferProgressNotifications(TBool enableFlag = ETrue);
+            
+    public: // for internal purpose
+        /**
+         * Calls to set the local media port from the MSRP URI
+         * @return Symtem wide error if the path attribute is not set for the aParent
+         */
+        void InitializeL( CMceMediaStream& aParent );
+      
+      private: 
+		
+		/**
+	     * C++ default constructor.
+	     */
+        CMceMsrpSource();		
+		
+		/**
+	     * Second phase constructior.
+	     */
+		 void ConstructL();
+	 
+		 /**
+		  * Sets the local media port form the MSRP path attribute
+		  * @par aMsrpUri The Uri from which the port has to be extracted
+		  * @aStream  Sets the local media port with the port extracted form the aMsrpUri 
+		  */
+		 void SetPortFromPathAttrL(TUriC8& aMsrpUri, CMceMessageStream& aStream);
+		 
+		 //for testing
+
+		 MCE_UNIT_TEST_DEFS  
+
+    };
+
+
+#endif // CMCEMSRPSOURCE_H
--- a/ipappsrv_plat/multimedia_comms_api/inc/mcesession.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcesession.h	Mon Sep 06 17:32:13 2010 +0530
@@ -565,6 +565,13 @@
 	    * @return ETrue, if session is zombie by update
 	    */
 	    TBool IsZombie();
+	    
+	    /**
+	     * Return ETrue, if session is zombie by update
+	     * @return ETrue, if session is zombie by update
+	     */
+	    const CMceComSession* FlatData();
+	    
 
 	protected:
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ipappsrv_plat/multimedia_comms_api/inc/mcesessionutility.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,165 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef TMceSessionUtility_H
+#define TMceSessionUtility_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <mcedefs.h>
+#include <mcemediastream.h>
+#include <e32des8.h>
+#include <in_sock.h>
+#include <sdpdocument.h>
+
+
+// CLASS DECLARATION
+
+/**
+* Base class for MCE sessions, inherited by both CMceInSession and CMceOutSession.
+*
+* CMceSession represents peer-to-peer connection made with remote terminal.
+* This connection is also known as dialog and it is set up using SIP INVITE
+* method.
+*
+* The characteristics of the session are defined by user of this class by attaching
+* media streams into the session.
+*
+* After the session has been succesfylly established, it can be later updated and
+* must be finally terminated.
+*
+* If for any reason instance of this class is deleted while in established state,
+* session is automatically terminated by MCE server.
+*
+*  @lib mceclient.lib
+*/
+class TMceSessionUtility : public CBase
+    {   
+    public: // Session states
+
+        enum TSDPLineName
+            {
+            EVersion, // v=
+            //EOrigin, // o=
+            ESession, // s=
+            EInfo,    // i=
+            EUri,     // u=
+            //EEmail,   // e=
+            //EPhone,   // p=
+            //EConnection, // c=
+            //EBandwidth, // b=
+            EZone      // z=
+            //EKey,       // k=
+            //EAttribute, // a=
+            //ETime,      //t=
+            //ERepeat,    //r=
+            //EMedia,     //m=    
+            };
+        
+    public:  // Constructors and destructor
+        
+        
+        //static TMceSessionUtility(CMceSession* aSession);          
+
+        /**
+        * Destructor.
+        */
+        //virtual ~TMceSessionUtility();
+
+    public: // Functions
+
+        /**
+        * Returns value of remote session SDP line.
+        * @param aSess MCE session object
+        * @param TSDPLineName  SDP session level SDP line name
+        * @return The valid pointer of HBufC8 if the value exists otherwise returns NULL
+        *  The ownership of HBufC8 is transferred to the clietns.
+        */
+        
+        static HBufC8* getSessionSdPLineL(CMceSession* aSess,
+                TSDPLineName aLSdpLineName);
+        
+        /**
+         * Returns the value of remote media sdp attribute value.
+         * @param aStream . The stream object for which the remote attribute is required 
+         * @param aAttrName  attribte name like "accept-types", "accept-wrapped-types" etc
+         * @return The valid pointer of HBufC8 if the value for the attribute exists otherwise returns NULL
+         *  The ownership of HBufC8 is transferred to the clietns.
+         *  @Pre session->State() < CMceSession::ECancelling) || 
+         *       session->State() > CMceSession::EIdle
+         */
+        
+        IMPORT_C static HBufC8* getRemoteMediaSDPAttrL(CMceMediaStream* aStream,
+                const TDesC8& aAttrName);
+        
+        /**
+         * Returns the local conneciton address for the passed session
+         * @param CMceSession MCE session object for which the conneciton address is requested
+         * @param TInetAddr The conneciton address of the session will be filled in this parameter
+         *  
+         */
+        
+        IMPORT_C static void GetLocalConnectionAddrL(CMceSession* aSess, TInetAddr& aAddr); 
+        
+        
+        /**
+         * Returns the remote conneciton address for the passed stream
+         * @param aStream The stream object for which the remote connection addr is requested
+         * @return The HBufC8 pointer either holds the FQDN or the IP address of the remote end
+         *  The Ownership is transferred to the clients
+         * @Pre session->State() < CMceSession::ECancelling) || 
+         *      session->State() > CMceSession::EIdle  
+         */
+        
+        IMPORT_C static HBufC8* GetRemoteConnectionAddrL(CMceMediaStream* aStream);
+        
+        
+        /**
+         * Get local media port of the stream
+         * @aSession MCE session
+         * @aMediaPort On return filled with local media port 
+         * @Pre session->State() < CMceSession::ECancelling) || 
+         *      session->State() > CMceSession::EIdle
+         */
+        
+        IMPORT_C static void GetLocalMediaPortL(CMceMediaStream* aStream, TUint& aMediaPort );
+         
+         
+         /**
+          * Get remote media port of the session
+          * @aSession MCE session
+          * @aMediaPort On return filled with local media port 
+          * @Pre session->State() < CMceSession::ECancelling) || 
+          *      session->State() > CMceSession::EIdle
+          */
+        
+        IMPORT_C static void GetRemoteMediaPortL(CMceMediaStream* aStream, TUint& aMediaPort );
+        
+    private:
+
+        static void ConstructSdpDocumentL(CDesC8Array* asdpLines, CSdpDocument*& asdpDoc);
+        
+        static HBufC8* FindAttributeL(CDesC8Array* asdpLines , const TDesC8& aAttrName);
+        
+    private:
+        MCE_UNIT_TEST_DEFS
+    };
+
+#endif // TMceSessionUtility_H
--- a/multimediacommscontroller/group/bld.inf	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/group/bld.inf	Mon Sep 06 17:32:13 2010 +0530
@@ -1,46 +1,48 @@
-/*
-* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:    This file provides the information required for building the
-*                whole of a MCC
-*
-*/
-
-
-
-#include <platform_paths.hrh>
-
-PRJ_EXPORTS
-../rom/multimediacommscontroller.iby CORE_MW_LAYER_IBY_EXPORT_PATH(multimediacommscontroller.iby)
-../rom/multimediacommscontroller_stub.SIS /epoc32/data/z/system/install/multimediacommscontroller_stub.sis
-
-PRJ_MMPFILES
-../mmccinterface/group/interface.mmp
-../mmccjitterbuffer/group/jitterbuffer.mmp
-../mmccqoscontroller/group/qoscontroller.mmp
-../mmccmultiplexer/group/multiplexer.mmp
-../mmccsubcontroller/group/subcontroller.mmp
-../mmcccontroller/group/controller.mmp
-../mmccredpayloadformat/group/redpayloadformat.mmp
-../mmccamrpayloadformat/group/amrpayloadformat.mmp
-../mmccg711payloadformat/group/g711payloadformat.mmp
-../mmccg729payloadformat/group/g729payloadformat.mmp
-../mmccilbcpayloadformat/group/ilbcpayloadformat.mmp
-../mmccdtmfpayloadformat/group/dtmfpayloadformat.mmp
-../mmccrtpsourcesink/group/rtpsourcesink.mmp
-../mmccvideosourcesink/group/videosourcesink.mmp
-../mmcch263payloadformat/group/h263payloadformat.mmp
-../mmccanypayloadformat/group/anypayloadformat.mmp
-../mmccfilesourcesink/group/filesourcesink.mmp
-../mmccanysourcesink/group/anysourcesink.mmp
-../mmccavcpayloadformat/group/avcpayloadformat.mmp
+/*
+* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    This file provides the information required for building the
+*                whole of a MCC
+*
+*/
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_EXPORTS
+../rom/multimediacommscontroller.iby CORE_MW_LAYER_IBY_EXPORT_PATH(multimediacommscontroller.iby)
+../rom/multimediacommscontroller_stub.SIS /epoc32/data/z/system/install/multimediacommscontroller_stub.sis
+
+PRJ_MMPFILES
+../mmccinterface/group/interface.mmp
+../mmccjitterbuffer/group/jitterbuffer.mmp
+../mmccqoscontroller/group/qoscontroller.mmp
+../mmccmultiplexer/group/multiplexer.mmp
+../mmccsubcontroller/group/subcontroller.mmp
+../mmcccontroller/group/controller.mmp
+../mmccredpayloadformat/group/redpayloadformat.mmp
+../mmccamrpayloadformat/group/amrpayloadformat.mmp
+../mmccg711payloadformat/group/g711payloadformat.mmp
+../mmccg729payloadformat/group/g729payloadformat.mmp
+../mmccilbcpayloadformat/group/ilbcpayloadformat.mmp
+../mmccdtmfpayloadformat/group/dtmfpayloadformat.mmp
+../mmccrtpsourcesink/group/rtpsourcesink.mmp
+../mmccvideosourcesink/group/videosourcesink.mmp
+../mmcch263payloadformat/group/h263payloadformat.mmp
+../mmccanypayloadformat/group/anypayloadformat.mmp
+../mmccfilesourcesink/group/filesourcesink.mmp
+../mmccanysourcesink/group/anysourcesink.mmp
+../mmccavcpayloadformat/group/avcpayloadformat.mmp
+../mmccmsrppayloadformat/group/msrppayloadformat.mmp
+../mmccmsrpsourcesink/group/msrpsourcesink.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/group/bld.inf	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,28 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+
+
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+msrppayloadformat.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/group/msrppayloadformat.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    
+*
+*/
+
+
+
+#include <platform_paths.hrh>
+
+TARGET         	mmccmsrpplformat.dll		
+
+CAPABILITY 		CAP_ECOM_PLUGIN
+VENDORID		VID_DEFAULT
+TARGETTYPE		PLUGIN
+
+UID             0x10009D8D 0x10299988                      
+
+SOURCEPATH      ../src
+SOURCE          msrppayloadformatread.cpp
+SOURCE          msrppayloadformatwrite.cpp
+SOURCE          msrppayloadformatimplementationproxy.cpp
+SOURCE          sendstatemachine.cpp
+SOURCE 		BufferTimer.cpp
+
+SOURCEPATH      ../../mmccshared/src
+SOURCE          formatstatemachine.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../mmccshared/inc
+USERINCLUDE     ../../mmccrtpsourcesink/inc
+USERINCLUDE     ../../mmccmsrpsourcesink/inc
+USERINCLUDE     ../../mmcccontroller/inc
+USERINCLUDE     ../../mmccinterface/inc
+USERINCLUDE     ../../mmccsubcontroller/inc
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   /epoc32/include/mmf/common
+SYSTEMINCLUDE   /epoc32/include/mmf/server
+SYSTEMINCLUDE   /epoc32/include/ecom
+
+#ifdef FTD_ENABLED
+USERINCLUDE     ../../internal/FTD
+#endif
+
+SOURCEPATH      ../data
+
+START RESOURCE	10299988.rss
+TARGET			mmccmsrpplformat.rsc
+END
+
+LIBRARY         euser.lib
+LIBRARY         mmfserverbaseclasses.lib
+LIBRARY         ecom.lib
+LIBRARY         mmfcontrollerframework.lib
+LIBRARY		charconv.lib
+
+PAGED
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/SendStateMachine.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef SENDSTATEMACHINE_H
+#define SENDSTATEMACHINE_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <e32std.h>
+#include <mmfformat.h>
+
+// DATA TYPES
+// Send states.
+
+// CLASS DECLARATION
+
+
+class MSendStateObserver 
+    {
+    public:
+    
+        virtual void TimerExpiredL() = 0;
+
+    };
+    
+/**
+*  Sendstate machine
+*/
+class CSendStateMachine : public CBase
+    {
+    public: // Constructors and destructor
+
+        /**
+        * Two-phased constructor.
+        */
+        static CSendStateMachine* NewL( MSendStateObserver* aClient );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CSendStateMachine() ;
+
+
+    public: // New functions
+
+	     // Starts the timer.
+	    void Start  ();
+	 
+	    // Cancels the timer.
+	    void Cancel ();
+	    
+	    void SetTimeOut(TTimeIntervalMicroSeconds32 aValue);
+
+    private: // Functions from base classes
+    
+    	static TInt IdleCallBackL (TAny* aPtr);
+
+    private:
+   
+        /**
+        * C++ default constructor.
+        */
+        CSendStateMachine( MSendStateObserver* aClient );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    private: // Data
+        
+        // Client who uses this state machine
+        MSendStateObserver* iClient;
+        
+        CPeriodic*  iPeriodic; 
+        
+        TTimeIntervalMicroSeconds32 iTimeOutValue;
+        
+        
+    };
+
+#endif  //
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/buffertimer.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+
+#include <e32base.h>
+
+class MBufferTimerNotify
+	{
+	public:
+		virtual TInt TimerExpired() = 0;
+		
+};
+ 
+ 
+	class CBufferTimer: public CActive
+		{
+	public:
+		
+		static CBufferTimer* NewL(MBufferTimerNotify& aNotify);
+		~CBufferTimer();
+		
+	public:
+		
+		void After(TTimeIntervalMicroSeconds32 aInterval);
+
+	protected:
+		
+		void RunL();
+		void DoCancel();
+		
+	private:
+		
+		CBufferTimer(MBufferTimerNotify& aNotify);
+		void ConstructL(void);
+		void Call(void);
+		
+	private:
+		RTimer					iTimer;
+		MBufferTimerNotify&	iNotify;
+		TTimeIntervalMicroSeconds32 iInterval;
+		
+		};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/mccmsrpformatlogs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MCCMSRPFORMATLOGS_H
+#define MCCMSRPFORMATLOGS_H
+
+#include "mcclogs.h"
+
+_LIT(KMsrpFormat, "Mcc/MsrpFormat:");
+
+#ifdef _DEBUG
+	#define __MCC_MsrpFORMAT_CONTROLL
+	#define __MCC_MsrpFORMAT_MEDIA
+#endif // end of _DEBUG
+
+#ifdef __MCC_MsrpFORMAT_CONTROLL
+	#define __MsrpFORMAT_CONTROLL( a ) \
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpFormat, KStr ); }
+	#define __MsrpFORMAT_CONTROLL_INT1( a, b ) \
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpFormat, KStr, b ); }
+	#define __MsrpFORMAT_CONTROLL_INT2( a, b, c, d ) \
+		{ _LIT( KStr1, a ); _LIT( KStr2, c ); \
+		  TMccLog::Print( KMsrpFormat, KStr1, b, KStr2, d ); }
+#else
+	#define __MsrpFORMAT_CONTROLL( a )
+	#define __MsrpFORMAT_CONTROLL_INT1( a, b )
+	#define __MsrpFORMAT_CONTROLL_INT2( a, b, c, d )
+#endif // end of ifdef __MCC_ANYFORMAT_CONTROLL
+
+#ifdef __MCC_MsrpFORMAT_MEDIA
+	#define __MsrpFORMAT_MEDIA( a )	\
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpFormat, KStr ); }
+	#define __MsrpFORMAT_MEDIA_INT1( a, b ) 	\
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpFormat, KStr, b ); }
+	#define __MsrpFORMAT_MEDIA_INT2( a, b, c, d ) \
+		{  _LIT( KStr1, a ); _LIT( KStr2, c ); \
+		   TMccLog::Print( KMsrpFormat, KStr1, b, KStr2, d );}
+#else
+	#define __MsrpFORMAT_MEDIA( a )
+	#define __MsrpFORMAT_MEDIA_INT1( a, b )
+	#define __MsrpFORMAT_MEDIA_INT2( a, b, c, d )
+#endif // end of ifdef __MCC_ANYFORMAT_MEDIA
+
+#endif 
+// end of file 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatdefs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MSRPPAYLOADFORMATDEFS_H
+#define MSRPPAYLOADFORMATDEFS_H
+
+//  INCLUDES
+#include <e32base.h>
+
+#ifdef _DEBUG
+    #include <e32svr.h>
+    #define DEBUG_MSRP_WRITE
+#endif
+
+// CONSTANTS
+
+// MACROS
+#ifdef DEBUG_MSRP_WRITE
+
+    #define DP_MSRP_WRITE(a) { _LIT( KName, a); RDebug::Print(KName); }
+    #define DP_MSRP_WRITE2(a, b) \
+    	{ _LIT(KName, a); RDebug::Print(KName, b); }
+    #define DP_MSRP_WRITE3(a, b, c) \
+ 		{ _LIT(KName, a);  RDebug::Print(KName, b, c); } 
+ 		
+ 	#define DP_MSRP_WRITE_INT(a) \
+ 	{ RDebug::Print(_L("Value - VAL: %d"), a);  }
+ 	 		
+#else
+    #define DP_MSRP_WRITE(a);
+    #define DP_MSRP_WRITE2(a, b);
+    #define DP_MSRP_WRITE3(a, b, c);
+    #define DP_MSRP_WRITE_INT(a);
+#endif
+
+#endif      // MSRPPAYLOADFORMATDEFS_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatread.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,405 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+
+#ifndef MSRPPAYLOADFORMATREAD_H
+#define MSRPPAYLOADFORMATREAD_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <e32std.h>
+#include <rtpheader.h>
+#include <mmfformat.h>
+#include <rtpheader.h>
+
+#include "formatstatemachine.h"
+#include "mccinternalcodecs.h"
+
+
+// CLASS DECLARATION
+class CMMFBuffer;
+class TStringElement;
+
+/**
+*
+*/ 
+class CMsrpPayloadFormatRead : public CPayloadFormatRead,
+                              public MPayloadFormatRead
+    {
+    public:  // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @param aSource    Source of the data for the payload format plugin
+        */
+        static   CMsrpPayloadFormatRead* NewL ( MDataSource* aSource );
+
+        /**
+        * Destructor.
+        */
+        virtual  ~CMsrpPayloadFormatRead ( );
+
+    public:  // New functions
+
+        /**
+        * Get number of audio packets received on downlink in last talk spurt.
+        * @since Series-60 2.1
+        * @return Number of audio packets received
+        */
+        virtual TInt LastDlPacketCount( );
+
+        /**
+        * Cancel any requests from DataPath and Stop state machine also
+        * @since Series-60 2.1
+        * @return None
+        */
+        virtual void CancelDlRequest( );
+
+        /**
+        * Send full sink buffer with AMR frames to data path.
+        * Sink buffer is decided on one of the two frame buffers
+        * Called by the state machine.
+        * @since Series-60 2.1
+        * @return None
+        */
+        void SendDataToSinkL( );
+
+        /*
+        * Fill the sink buffer by decoding the RTP payload into AMR frames
+        * Sink buffer is decided on one of the two frame buffers
+        * Called by the state machine.
+        * @since Series-60 2.1
+        * @return None
+        */
+        void FillSinkBufferL( );
+
+        /**
+        * Request the RTPSource to fill the source buffer with RTP payload
+        * Source buffer is decided by the RTPSource.
+        * Called by the state machine.
+        * @since Series-60 2.1
+        * @return None
+        */
+        void FillSourceBufferL( );
+        
+    public: // From CMMFFormatDecode
+
+        /**
+        * From CMMFFormatDecode. Return number of audio streams for the given
+        * media Raw audio files can only have 1 audio stream.
+        *
+        * @param    aMediaType KUidMediaTypeAudio or KUidMediaTypeVideo
+        * @return   Number of audio streams
+        */
+        TUint Streams( TUid aMediaType ) const;
+
+        /**
+        * Return the frame time interval for the given media
+        *
+        * @param aMediaType KUidMediaTypeAudio or KUidMediaTypeVideo
+        *
+        * @return           Time interval in micro seconds
+        */
+        TTimeIntervalMicroSeconds FrameTimeInterval( TMediaId aMediaType ) const;
+
+        /**  *** NOT SUPPORTED ***
+        * Return the clip duration for the given media
+        *
+        * @param aMediaType KUidMediaTypeAudio or KUidMediaTypeVideo
+        *
+        * @return           Clip duration in micro seconds
+        */
+        TTimeIntervalMicroSeconds Duration( TMediaId aMediaType ) const;
+
+        /**
+        * From CMMFFormatDecode
+        */
+        TFourCC SinkDataTypeCode( TMediaId aMediaId );
+        
+    public: // From MDataSource.  CAmrPayloadFormatRead is data source to the data path and AMR codec.
+
+        /**
+        * From MDataSource. Read the next block of data from file into the
+        * given buffer.
+        *
+        * @param aBuffer    source data buffer for the AMR-NB data read
+        * @param aConsumer  data sink pointer
+        * @param aMediaId   contains the media type KUidMediaTypeAudio or KUidMediaTypeVideo
+        *
+        * @return
+        */
+        void FillBufferL( CMMFBuffer* aBuffer, 
+                          MDataSink* aConsumer,
+                          TMediaId aMediaId );
+
+        /**
+        * From MDataSource. Primes the source.
+        * @since Series 60 3.0
+        * @return None
+        */
+        void SourcePrimeL( );
+
+        /**
+        * From MDataSource. Plays the source.
+        * @since Series 60 3.0
+        * @return None
+        */
+        void SourcePlayL( );
+        
+        /**
+        * From MDataSource. Pauses the source.
+        * @since Series 60 3.0
+        * @return None
+        */
+        void SourcePauseL( );
+        
+        /**
+        * From MDataSource. Stops the source.
+        * @since Series 60 3.0
+        * @return None
+        */
+        void SourceStopL( );
+
+        /**
+        * Create a source buffer for the given media
+        *
+        * @param aMediaId   contains the media type KUidMediaTypeAudio or KUidMediaTypeVideo
+        * @param aReference value of False is returned to caller if source buffer is created
+        *
+        * @return           Pointer to source buffer created
+        */
+        CMMFBuffer* CreateSourceBufferL( TMediaId aMediaId, 
+                                         TBool &aReference );
+
+        /**
+        * Create a source buffer for the given media, setting frame size to match 
+        * the given sink buffer
+        *
+        * @param aMediaId    contains the media type KUidMediaTypeAudio or KUidMediaTypeVideo
+        * @param aSinkBuffer address of sink buffer
+        * @param aReference  value of False is returned to caller if source buffer is created
+        *
+        * @return            Pointer to source buffer created
+        */
+        CMMFBuffer* CreateSourceBufferL( TMediaId aMediaId, 
+                                         CMMFBuffer& aSinkBuffer, 
+                                         TBool &aReference );
+
+        /**
+        * Return the four CC code for the given media
+        *
+        * @param aMediaId    contains the media type KUidMediaTypeAudio or KUidMediaTypeVideo
+        *
+        * @return            FourCC code
+        */
+        TFourCC SourceDataTypeCode( TMediaId aMediaId );
+
+        /**
+        * Set the source data type to the given four CC code for the given media
+        *
+        * @param aSourceFourCC    fourCC code
+        * @param aMediaId         contains the media type KUidMediaTypeAudio or KUidMediaTypeVideo
+        *
+        * @return                 error code KErrNotSupported if invalid media ID, else return KErrNone
+        */
+        TInt SetSourceDataTypeCode( TFourCC aSourceFourCC, 
+                                    TMediaId aMediaId ); 
+
+        /**
+        * Log in to the source thread - this funtion merely passes the command to 
+        * its source clip data source object. The source clip object will handle 
+        * the thread log on procedures.
+        *
+        * @param aEventHandler    address of event handler
+        *
+        * @return                 error code returned by source clip
+        */
+        TInt SourceThreadLogon( MAsyncEventHandler& aEventHandler );
+
+        /**
+        * Log out of the source thread - this funtion merely passes the command to 
+        * its source clip data source object. The source clip object will handle 
+        * the thread log off procedures.
+        *
+        * @return None
+        */
+        void SourceThreadLogoff( );
+
+        /**
+        * Negotiate source settings ( buffer size ) to match 
+        * given source object
+        *
+        * @param aDataSink          address of sink object
+        *
+        * @return None
+        */
+        void NegotiateSourceL( MDataSink& aDataSink );
+
+
+    public: // From MDataSink. CAmrPayloadFormatRead is data sink to the RTP data source.
+
+        /**
+        * Called after the data buffer is filled. Update the number of bytes read
+        * and the current read position for the next read operation. 
+        *
+        * @param    aBuffer         data buffer filled
+        * @param    aHeaderInfo     RTP packet header information
+        * @return None
+        */
+        virtual void DataBufferFilledL( CMMFBuffer* aBuffer, 
+                                    const TRtpRecvHeader& aHeaderInfo );
+
+    public: // only for videosource-anyformatter-filesink
+       void BufferFilledL( CMMFBuffer* aBuffer );
+    public:
+    
+        /**
+        * Configures payload format with format spesific parameters.
+        * Leaves with KErrArgument if parameters are invalid.
+        *
+        * @since    Series 60 3.0 
+        * @param    aConfigParams       Configuration parameters
+        * @return   void
+        */
+        virtual void ConfigurePayloadFormatL( const TDesC8& aConfigParams );
+        
+       
+
+    protected:  // Functions from base classes
+    private:
+        /**
+        * C++ default constructor.
+        */
+        CMsrpPayloadFormatRead();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        *
+        * @param aSource    Source of the data for the payload format plugin
+        */
+        void ConstructL( MDataSource* aSource );
+
+        /**
+         * Creates a buffer used in data transfer between format read and
+         * its datasource.
+         *
+         * @since    Series 60 3.2 
+         * @param    aSize              Suggested buffer size
+         * @param    aIsOwnBuffer       Indicates ownership of the buffer
+         * @return   Created buffer
+         */
+        CMMFDataBuffer* CreateClipBufferL( TUint aSize, TBool& aIsOwnBuffer );
+        
+        TBool FilterUnwantedData(const TDesC8& aBuffer);
+        
+        void UpdateConfigurationL( const TDesC8& aConfigParams );
+        
+        TInt DecodePayloadL( const TDesC8& aSourceBuffer );
+        
+        TInt HandleRedundancyL(TInt aErrNo);
+        
+        void SelectFrameBuffer(const TRtpRecvHeader& aRtpHeader);
+        
+       	TUint32 Read32( const TUint8* const aPointer );
+       	
+       	TUint32 Read24( const TUint8* const aPointer );
+       	
+       	TUint32 Read8 ( const TUint8* const aPointer );
+       	
+       	TInt ParseRedHeader(TUint32 aheader, TUint16& aLenght, TUint16& aTimeStamp );
+       	
+       	void ResetBuffers();
+       	
+       	void ResetPacketBuffers();
+    
+    private:    // data
+
+        // Flag used to determine which buffer is currently used as a sink buffer
+        enum TCurrentBuffer
+            {
+            EBufferOne = 0,
+            EBufferTwo,
+            EBufferNone
+            };
+            
+            
+        // Data source providing RTP data
+        MDataSource* iRtpDataSource;
+
+        TFourCC iFourCC;
+
+        TMediaId iMediaId;
+
+		TBool iFillRequested;
+		
+		TBool iBufferToReadExists;
+                
+        // Format decoding state machine
+        CFormatDecodeStateMachine* iStateMachine;
+        
+        // Buffer one to store data 
+        CMMFDataBuffer* iFrameBufferOne;
+        
+        // Buffer two to store data 
+        CMMFDataBuffer* iFrameBufferTwo;
+        
+        // Current buffer in use
+        CMMFDataBuffer* iCurrentBuffer;
+        
+        // Buffer to hold payload got from RtpSourceSink
+        CMMFDataBuffer* iPayloadBuffer;
+        
+        // decodedData
+        CMMFDataBuffer* iDecodedBuffer;
+        
+        // Indicates whether payload read has ownership of source buffer
+        TBool iSourceBufOwnership;
+        		
+				// Parameters relating to data decoding
+        TMccCodecInfo iCodecInfo;
+        
+        // MMF AsyncEventHandler
+        MAsyncEventHandler* iEventHandler;
+        
+        TInt iPacketCount;
+
+        TInt iDroppedPacketCount;
+        
+        TInt64 iSatisfySecNumber;
+        
+        TInt64 iCheckSum;
+        
+        TBool iFirstPacketsMissing;
+        
+        TInt iLevelsMissing;
+        
+        CArrayFixFlat< TStringElement >* iRedData;
+        
+        HBufC8* iCharData;
+        
+        //Flag to indicate have we getten the check sum seed
+        TBool iPacketSecNumber;
+        
+        
+        //#ifdef TEST_EUNIT
+            // For EUnit test cases
+            friend class UT_CMsrpPayloadFormatRead;
+        //#endif
+
+    };
+
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/inc/msrppayloadformatwrite.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,401 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MSRPPAYLOADFORMATWRITE_H
+#define MSRPPAYLOADFORMATWRITE_H
+
+//  INCLUDES
+#include <e32base.h>
+#include <mmfformat.h>
+#include <mmfdatabuffer.h>
+#include <mmfutilities.h>
+#include "formatstatemachine.h"
+#include "mccinternalcodecs.h"
+#include "sendstatemachine.h"
+#include "mccmsrpsink.h"
+
+
+// RFC 4103 specifies that time stamp offset maxvalue
+const TUint16 KHighestTimeStampOffset = 0x3FFF; // 16383
+ 
+// 0x200 is selected because when using redundancy we must 
+// be able to send 3x payload + header. This is the treshold 
+// when RTP packet size grows too much
+const TInt KMaxRTTChunkSize = 0x200; // 512
+
+// When using level 2 redundancy, Redundancy Header size.
+const TInt KRedHeaderSize = 0x48; // 32 + 32 + 8 = 72; 
+
+// Maximum datasize
+const TInt KDataSize = 0x600;// KMaxRTTChunkSize * 3;
+
+// Default sampling Rate for RTP Clock
+const TInt KDefaultSampleRate = 1000;
+
+
+// FORWARD DECLARATIONS
+class MMccRtpDataSink;
+class CMccRtpMediaClock;
+class TCharElement;
+
+
+class TStringElement
+ {
+ 	
+	public :
+	 TStringElement();
+	 
+	public :
+	 TBuf16<512> iData;
+	 TInt64 iTimestamp; 
+ 
+ };
+    
+// CLASS DECLARATION
+/**
+*  Packetizes RTP payload containing Msrp data.
+*
+*  @lib MccMsrpPlFormat.dll
+
+*/
+class CMsrpPayloadFormatWrite : public CPayloadFormatWrite, 
+							MPayloadFormatWrite, MSendStateObserver
+    {
+    public:  // Constructors and destructor
+    
+   
+        static CMsrpPayloadFormatWrite* NewL( MDataSink* aSink );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CMsrpPayloadFormatWrite();
+
+    public: // New functions
+
+        /**
+        * Configures payload format with format spesific parameters.
+        * Leaves with KErrArgument if parameters are invalid.
+        *
+        * @since    Series 60 3.0 
+        * @param    aConfigParams       Configuration parameters
+        * @return   void
+        */
+        virtual void ConfigurePayloadFormatL( const TDesC8& aConfigParams,
+                                              CMccRtpMediaClock& aClock );
+    
+    public: // From MPayloadFormatWrite
+    
+        /**
+        * Empty the source buffer by formatting the Msrp frames into payload.
+        * Source buffer is given in "iBuffer".
+        * Called by the state machine.
+        *
+        * @since    Series 60 3.0
+        * @param    None
+        * @return   void
+        */
+        void EmptySourceBufferL();
+
+        /**
+        * Handle the event that source buffer has been emptied.
+        * Source buffer is given in "iBuffer".
+        * Called by the state machine.
+      	*/
+        void SourceBufferEmptiedL();
+    
+    public: // From CMMFFormatEncode
+
+        /**
+        * Funtion to return time interval for the complete frame
+        *
+        * @param aMediaType KUidMediaTypeText
+        *
+        * @return           time interval in micro seconds
+        */
+        TTimeIntervalMicroSeconds FrameTimeInterval( TMediaId aMediaType ) const;
+                    
+                    
+        /**   *** NOT SUPPORTED ***
+        * Function to return the clip duration
+        *
+        * @param aMediaType KUidMediaTypeText
+        *
+        * @return           clip duration in micro seconds
+        */
+        TTimeIntervalMicroSeconds Duration( TMediaId aMediaType ) const;
+
+        /**
+        * Create a sink buffer for the given media
+        *
+        * @param aMediaId   contains the media type KUidMediaTypeText
+        * @param aReference value of False is returned to caller if sink 
+        *                   buffer is created
+        * @return           Pointer to sink buffer created
+        */
+        CMMFBuffer* CreateSinkBufferL( TMediaId aMediaId, 
+                                       TBool& aReference );
+
+        /**
+        * Return the sink four CC code for the given media
+        *
+        * @param aMediaId    contains the media type KUidMediaTypeText
+        * @return            FourCC code for the mediaId
+        */
+        TFourCC SinkDataTypeCode( TMediaId aMediaId );
+
+        /**
+        * Set the sink data type to the given four CC code for the given media
+        *
+        * @param aSourceFourCC    fourCC code
+        * @param aMediaId         contains the media type KUidMediaTypeText
+        * @return                 error code KErrNotSupported if invalid media 
+        *                         ID, else return KErrNone
+        */
+        TInt SetSinkDataTypeCode( TFourCC aSinkFourCC, 
+                                  TMediaId aMediaId );
+
+        /**
+        * Log in to the sink thread - this funtion merely passes the command to 
+        * its sink clip data source object. The sink clip object will handle 
+        * the thread log on procedures.
+        *
+        * @param aEventHandler    address of event handler
+        *
+        * @return                 error code returned by source clip
+        */
+        TInt SinkThreadLogon( MAsyncEventHandler& aEventHandler );
+
+        /**
+        * Log out of the sink thread - this funtion merely passes the command to 
+        * its sink clip data source object. The sink clip object will handle 
+        * the thread log off procedures.
+        *
+        * @param
+        *
+        * @return
+        */
+        void SinkThreadLogoff();
+
+        /**
+        * Empty the given source buffer.
+        *
+        * @param aBuffer    data buffer containing Msrp data / redundancy data
+        * @param aSupplier  data source pointer
+        * @param aMediaId   contains the media type KUidMediaTypeText
+        * @return
+        */
+        void EmptyBufferL( CMMFBuffer* aBuffer, 
+                           MDataSource* aSupplier, 
+                           TMediaId aMediaId );
+        
+        /**
+        * Called after the data buffer is written. Update the number of bytes 
+        * written and the current write position for the next write operation. 
+        *
+        * @param aBuffer       data buffer emptied
+        *
+        * @return
+        */
+        void BufferEmptiedL( CMMFBuffer* aBuffer );
+
+    public: // From MDataSink
+    
+        /**
+        * From MDataSink Primes the source.
+        * @since 
+        * @param
+        * @return
+        */
+        void SinkPrimeL();
+
+        /**
+        * From MDataSink Plays the source.
+        * @since 
+        * @param
+        * @return
+        */
+        void SinkPlayL();
+
+        /**
+        * From MDataSink Pauses the source.
+        * @since 
+        * @param
+        * @return
+        */
+        void SinkPauseL();
+
+        /**
+        * From MDataSink Stops the source.
+        * @since 
+        * @param
+        * @return
+        */
+        void SinkStopL();
+        
+        
+       //FROM NONE, THIS IS A TEST METHOD
+       //TInt TimerExpired();
+       
+       TInt SendRedundantDataL();
+       
+       TInt FormUserDataL();
+        
+        //FROM MSendStateObserver
+       void TimerExpiredL();
+       
+       void ForwardDataL();
+       
+       void GotoIdleL();
+       
+       TInt GenerateRedPacket(); 
+       
+    
+    private: // New functions
+
+        /**
+        * Prepare packet header and deliver the packet to the datasink.
+        * @since Series 60 3.0
+        * @param aPayload Payload to deliver to the datasink.
+        * @return
+        */        
+        void DeliverPacketL( CMMFDataBuffer& aPayload );
+        
+        void AssembleRedPacket();
+        
+
+        
+        /**
+        * Create a sink buffer of the given size.
+        *
+        * @param   aSize     size of sink buffer to create
+        *
+        * @return  Pointer to sink buffer created
+        */
+        CMMFDataBuffer* CreateSinkBufferOfSizeL( TUint aSize );
+        
+        /**
+         * Update payload format with format spesific parameters.
+         * Leaves with KErrArgument if parameters are invalid.
+         *
+         * @since    Series 60 3.0 
+         * @param    aConfigParams       Configuration parameters
+         * @return   void
+         */
+        void UpdateConfigurationL( const TDesC8& aConfigParams );
+
+    private:
+    
+        /**
+        * C++ default constructor.
+        */
+        CMsrpPayloadFormatWrite ();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        *
+        * @param aConf    Decoder Configuration params
+        */
+        void ConstructL( MDataSink* aSource );
+        
+        void Write24( TUint8* const aPointer, TUint32 aValue );
+        
+        void Write32( TUint8 *const aPointer, TUint32 aValue );
+        
+        TUint16 SetTimeOffset( TInt64& aPrim, TInt64& aSecond );
+        
+        void CancelUlRequest();
+        
+    private: // Data
+
+        // FourCC
+        TFourCC iFourCC;
+        
+        // Format encoding state machine
+        CFormatEncodeStateMachine* iStateMachine;
+        
+        // Pointer to source data buffer, that is passed from DataPath
+        CMMFDataBuffer* iSourceBuffer;
+
+        // Sink buffer to hold Msrp/RTP payload
+        CMMFDataBuffer* iSinkBuffer;
+        
+        // Current RTP timestamp 
+        TUint32 iCurrentTimestamp;
+
+        // Flag to indicate whether to set MARK field to be 1 (the first 
+        // packet in a session should have MARK field set. Also first packet 
+        // after and idle period should have MARK field seet to 1 )
+        TBool iFirstPacketFinished;
+                
+        // Data sink capable to receive RTP data
+        MMccRtpDataSink* iRtpDataSink; 
+        
+        // Data sink capable to receive MSRP data
+        CMccMsrpSink* iMsrpDataSink; 
+        
+        // Parameters relating to RTP data encoding
+        TMccCodecInfo iCodecInfo;
+        
+        // Rtp Sink, this is default ETrue
+        TBool iIsRtpSink;
+        
+        // Msrp Sink
+        TBool iIsMsrpSink;
+        
+        // Key for Rtp media clock 
+        TUint32 iKey;
+        
+        /**
+         * Rtp media clock instance
+         * Not own.
+         */
+        CMccRtpMediaClock* iRtpMediaClock;
+        
+        
+        //Redundancy Data
+        CArrayFixFlat< TStringElement >* iRedData;
+        
+        CArrayFixFlat< TStringElement >* iUserBuffer;
+        
+        //Data that is modified so that we can create 
+        //msrppacket
+        HBufC8* iBuf;
+        
+        // pointer to the beginning of the iBuf
+        TUint8* iData;
+        
+        //Timer that is used to send data in buffer periods
+         CSendStateMachine* iTimer;
+        
+        //Flag indicating that we are in idle mode
+        TBool iIdleMode;
+        
+  
+    private: 
+        
+        //#ifdef TEST_EUNIT
+            // For EUnit test cases
+        friend class UT_CMsrpPayloadFormatWrite;
+        //#endif
+        
+    };
+
+#endif //MsrpPAYLOADFORMATWRITE_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/src/BufferTimer.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#include "buffertimer.h"
+#include "msrppayloadformatdefs.h"
+
+CBufferTimer::CBufferTimer(MBufferTimerNotify& aNotify)
+:CActive( EPriorityStandard ),iNotify(aNotify)
+{
+	CActiveScheduler::Add( this );
+}
+ 
+CBufferTimer::~CBufferTimer()
+{	
+	Cancel();
+	iTimer.Close();
+}
+ 
+CBufferTimer* CBufferTimer::NewL(MBufferTimerNotify& aNotify)
+{
+	
+		DP_MSRP_WRITE( "CBufferTimer::NewL" );
+    CBufferTimer* me = new (ELeave) CBufferTimer(aNotify); 
+    CleanupStack::PushL(me);
+		me->ConstructL();
+		CleanupStack::Pop();
+    return me;
+}
+ 
+void CBufferTimer::ConstructL(void)
+{
+	iTimer.CreateLocal();
+}
+ 
+void CBufferTimer::After(TTimeIntervalMicroSeconds32 aInterval)
+{
+	DP_MSRP_WRITE( "CBufferTimer::After()" );
+	iInterval = aInterval;
+	Call(); 
+
+}
+
+ 
+void CBufferTimer::DoCancel()
+{
+	iTimer.Cancel();
+}
+ 
+void CBufferTimer::Call()
+	{
+			DP_MSRP_WRITE( "CBufferTimer::Call()" );
+	    TRequestStatus* stat = &iStatus; 
+     
+      // Cancel the statemachine and set a new state
+    	Cancel();
+      User::RequestComplete( stat, KErrNone );
+      SetActive();
+	} 
+ 
+ 
+void CBufferTimer::RunL()
+{
+	
+	if ( KErrNone == iStatus.Int() )
+		{
+			DP_MSRP_WRITE( "CBufferTimer::RunL()" );
+			iTimer.After(iStatus,iInterval); 
+			iNotify.TimerExpired();
+		}
+	else
+		{
+			  #ifdef _DEBUG
+            RDebug::Print( _L("CBufferTimer::RunL ERROR: %d"), iStatus.Int());
+        #endif
+        User::Leave( iStatus.Int() );
+		}
+	
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatimplementationproxy.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+// INCLUDE FILES
+#include <ImplementationProxy.h>
+#include "MsrpPayloadFormatRead.h"
+#include "MsrpPayloadFormatWrite.h"
+#include "mccuids.hrh"
+
+// CONSTANTS
+
+// Exported proxy for instantiation method resolution
+// Define the interface UIDs
+const TImplementationProxy ImplementationTable[] = 
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KImplUidMsrpPayloadFormatDecode,
+            CMsrpPayloadFormatRead::NewL ),
+    IMPLEMENTATION_PROXY_ENTRY( KImplUidMsrpPayloadFormatEncode,
+            CMsrpPayloadFormatWrite::NewL )
+    };
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// -----------------------------------------------------------------------------
+// ImplementationGroupProxy
+// Function to return the implementation proxy table
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
+    return ImplementationTable;
+    };
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatread.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,1230 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+// INCLUDE FILES
+#include <E32base.h>
+#include <mmffourcc.h>
+#include <mmfdatabuffer.h>
+#include 	<utf.h> // charconv.lib
+
+#include "MsrpPayloadFormatRead.h"
+#include "MsrpPayloadFormatWrite.h" // TStringElement, move independent
+#include "MccRtpDataSource.h"
+#include "Mccinternaldef.h"
+#include "MccMsrpFormatLogs.h"
+#include "msrppayloadformatdefs.h"  
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+const TUint KLostChar = 0xFFFD;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CMsrpPayloadFormatRead
+//
+// CMsrpPayloadFormatRead default constructor, can NOT contain Msrp code,
+// that might leave
+// Phase #1 of 2-phase constructor
+// -----------------------------------------------------------------------------
+//
+CMsrpPayloadFormatRead::CMsrpPayloadFormatRead ( ) : iFirstPacketsMissing (EFalse),
+iPacketSecNumber(EFalse)
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::ConstructL ( MDataSource* aSource )
+    {
+    
+   	DP_MSRP_WRITE( "CMsrpPayloadFormatRead::ConstructL" );
+    __ASSERT_ALWAYS( aSource, User::Leave( KErrArgument ) ); 
+ 
+ 		// we are coming downstream, the clip is now the source and
+ 		// datapath the sink. If we use RTP source if of source the RTPSource
+
+    iRtpDataSource = aSource;  
+    iClip = aSource;
+    
+    //Flags to indicate actions
+	iFillRequested = EFalse;	 
+	iBufferToReadExists = EFalse; 
+		
+    iFourCC = KMccFourCCIdMSRP ;
+    //iFourCC.Set( TFourCC( 'T','1','4','0' ) );
+    
+    iRedData = new(ELeave)CArrayFixFlat<TStringElement>(3);
+    TStringElement empty;
+    iRedData->AppendL(empty);
+    iRedData->AppendL(empty);
+    iRedData->AppendL(empty);
+		
+	// TODO : refine my sizes
+	iCharData = HBufC8::NewL( KDataSize );
+	iDecodedBuffer = CMMFDataBuffer::NewL( KRedHeaderSize +  KDataSize );
+		
+    // Initialize decoding state machine 
+    iStateMachine = CFormatDecodeStateMachine::NewL( this );
+    iStateMachine->ChangeState( EDecodeIdle );
+    
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::NewL
+// Two-phased constructor.
+// Static function for creating and constructing an instance of 
+// the Text/Msrp Format
+// Returns:  CMsrpPayloadFormatRead* : pointer to created instance
+// -----------------------------------------------------------------------------
+//
+CMsrpPayloadFormatRead* CMsrpPayloadFormatRead::NewL(
+	MDataSource* aSource )
+	
+    {
+     
+		DP_MSRP_WRITE("CMsrpPayloadFormatRead::NewL"); 
+
+		__ASSERT_ALWAYS( aSource, User::Leave( KErrArgument ) );
+ 
+		//__ASSERT_ALWAYS( ( KMccRtpSourceUid == aSource->DataSourceType() ||
+		//           KMccMsrpSourceUid == aSource->DataSourceType() ), 
+		//         User::Leave( KErrArgument ) );
+		CMsrpPayloadFormatRead* self = new ( ELeave ) CMsrpPayloadFormatRead;
+		CleanupStack::PushL ( self );
+		self->ConstructL ( aSource );
+		CleanupStack::Pop( self );
+		return self;
+    
+    }
+    
+   
+   
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::~CMsrpPayloadFormatRead
+//
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CMsrpPayloadFormatRead::~CMsrpPayloadFormatRead( )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::~CMsrpPayloadFormatRead");
+   	delete iFrameBufferOne;
+    delete iFrameBufferTwo;
+    
+    if ( iSourceBufOwnership )
+        {
+        delete iPayloadBuffer;
+        }
+    else
+        {
+        iPayloadBuffer = NULL;
+        }
+    
+    if(iRedData)
+        {
+        delete iRedData;
+        iRedData = NULL;
+        }
+    
+    if(iCharData)
+        {
+        delete iCharData;
+        iCharData = NULL;
+        }
+    
+    if(iDecodedBuffer)
+        {
+        delete iDecodedBuffer;
+        iDecodedBuffer = NULL;
+        }
+    
+    if ( iStateMachine )
+        {
+        iStateMachine->Cancel( );
+        delete iStateMachine;
+        }
+    iCurrentBuffer = NULL;
+    iRtpDataSource = NULL;
+    iClip = NULL;
+    iDataPath = NULL;
+    iEventHandler = NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::Streams
+// Return number of message streams for the given media
+// -----------------------------------------------------------------------------
+//
+TUint CMsrpPayloadFormatRead::Streams( TUid /*aMediaType*/) const
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::Streams");
+    return 1;
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::FrameTimeInterval
+// Return the frame time interval for the given media
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds CMsrpPayloadFormatRead::FrameTimeInterval( 
+    TMediaId /*aMediaId*/ ) const
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::FrameTimeInterval");
+        
+    return TTimeIntervalMicroSeconds( TInt64( 0 ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::
+// Fill Buffer. If DataSink asks to Fill a buffer
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::FillBufferL( CMMFBuffer* aBuffer, 
+                                         MDataSink*  aConsumer, 
+                                         TMediaId    aMediaId )
+    {
+	   	DP_MSRP_WRITE("CMsrpPayloadFormatRead::FillBufferL");
+	    __ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) );
+	    __ASSERT_ALWAYS( aBuffer->Type() == KUidMmfDataBuffer, User::Leave( KErrArgument ) );
+	    __ASSERT_ALWAYS( aConsumer, User::Leave( KErrArgument ) );
+	    __ASSERT_ALWAYS( iStateMachine, User::Leave( KErrArgument ) );
+	    __ASSERT_ALWAYS( iFrameBufferOne, User::Leave( KErrArgument ) );
+	    __ASSERT_ALWAYS( iFrameBufferTwo, User::Leave( KErrArgument ) );
+	
+	    iDataPath = aConsumer;
+	    iMediaId = aMediaId;
+	    iFillRequested = ETrue;
+
+	if ( iCurrentBuffer )
+		{
+		iCurrentBuffer->SetStatus( EAvailable );
+		iCurrentBuffer = NULL;		
+		}
+
+	if (iFrameBufferOne->Status() == EFull )
+		{
+		iCurrentBuffer = iFrameBufferOne;
+        iStateMachine->ChangeState( ESourceDataReady );				
+		}
+	else if (iFrameBufferTwo->Status() == EFull )
+		{
+		iCurrentBuffer = iFrameBufferTwo;
+        iStateMachine->ChangeState( ESourceDataReady );		
+		}
+    else
+        {
+        FillSourceBufferL();
+        } 
+//		ResetBuffers();
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::FillSinkBuffer
+// Read RTP payload and convert it into Text/Msrp Data
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::FillSinkBufferL()
+    {
+  	
+  	// reset all bufs
+    ResetPacketBuffers();
+    const TDesC8& srcBuf( iCurrentBuffer->Data() );
+    
+  	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iPacketCount: %d ", iPacketCount );
+  	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iFirstPacketsMissing: %d ", iFirstPacketsMissing );
+  	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iSatisfySecNumber: %d ", iSatisfySecNumber );
+  	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iLevelsMissing: %d ", iLevelsMissing );
+  	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iDroppedPacketCount: %d ", iDroppedPacketCount );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, iCurrentBuffer Size() : %d ", iCurrentBuffer->Data().Size() );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FillSinkBufferL, Currentbuffer BufferSize() : %d ", iCurrentBuffer->BufferSize() );
+     
+    
+    // Do not forward zero length buffers, even though we filtered all unwanted data
+    // allready in BufferFilledL() -method
+    if ( iCurrentBuffer->BufferSize() > 0 )
+        {
+       
+            TInt pValue(0); 
+		    switch ( iCodecInfo.iRedundancyCount )  
+		    {
+		    		case 0:
+		    			iDecodedBuffer->Data().Append( iCurrentBuffer->Data() );
+		    			iSatisfySecNumber++;
+		    		break;
+		    		
+		    		case 2:
+			    		pValue = DecodePayloadL( srcBuf );
+			    		User::LeaveIfError(HandleRedundancyL(pValue)); 
+		    		break;
+		    }
+                
+		if ( !pValue )
+			{
+			iStateMachine->ChangeState( EEmptyDataToSink );	
+			}
+		else
+			{
+	        FillSourceBufferL();
+			}
+        }
+    else
+    	{  
+    	// No payload or Data sent by SipCon1, ask for more
+    	DP_MSRP_WRITE("CMsrpPayloadFormatRead::FillSinkBufferL - Empty Data");
+        iStateMachine->ChangeState( EWaitSourceData );                           
+        }
+    }
+
+ 
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::ResetBuffers()
+// Send fill buffer request to RTP Data Source
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::ResetBuffers()
+{
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::ResetBuffers");
+	if ( iCurrentBuffer ) 
+		{
+		iCurrentBuffer->SetStatus( EAvailable );
+		iCurrentBuffer = NULL;		
+		}
+
+	if (iFrameBufferOne->Status() == EFull )
+		{
+		DP_MSRP_WRITE("CMsrpPayloadFormatRead::ResetBuffers() - FB1 - was FULL");
+		iCurrentBuffer = iFrameBufferOne;
+		iStateMachine->ChangeState( ESourceDataReady );				
+		}
+	else if (iFrameBufferTwo->Status() == EFull )  
+		{
+		DP_MSRP_WRITE("CMsrpPayloadFormatRead::ResetBuffers() - FB2 - was FULL");
+		iCurrentBuffer = iFrameBufferTwo;
+		iStateMachine->ChangeState( ESourceDataReady );		
+		}
+	else
+		{
+		iStateMachine->ChangeState( EWaitSourceData ); 
+		} 
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::FillSourceBufferL
+// Send fill buffer request to RTP Data Source
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::FillSourceBufferL()
+    { 
+    	
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::FillSourceBufferL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( iPayloadBuffer, User::Leave( KErrArgument ) );
+
+    iClip->FillBufferL(iPayloadBuffer, this, iMediaId );
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SendDataToSinkL
+// Send full frame buffer to Data Path
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SendDataToSinkL( )
+    {
+		
+	DP_MSRP_WRITE("CMsrpPayloadFormatRead::SendDataToSinkL()");
+    iFillRequested = EFalse;
+    iDataPath->BufferFilledL( iDecodedBuffer );
+   
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CreateSourceBufferL
+// Create a source buffer for the given media and indicate in aReference if 
+// buffer is created.
+// -----------------------------------------------------------------------------
+//
+CMMFBuffer* CMsrpPayloadFormatRead::CreateSourceBufferL( 
+    TMediaId /*aMediaId*/, 
+    TBool &aReference )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::CreateSourceBufferL");
+    // the source buffers belong to MsrpPayloadFormatRead not to datapath
+    // aReference should be set to ETrue and destroyed by MsrpPayloadFormatRead 
+    // itself.
+    aReference = ETrue;
+    iCurrentBuffer = iFrameBufferOne;
+    return iFrameBufferOne; 
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CreateSourceBufferL
+// Create a source buffer for the given media, setting frame size to match
+// the given sink buffer
+// -----------------------------------------------------------------------------
+//
+CMMFBuffer* CMsrpPayloadFormatRead::CreateSourceBufferL(
+    TMediaId aMediaId,
+    CMMFBuffer& /*aSinkBuffer*/, 
+    TBool &aReference )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::CreateSourceBufferL");
+    return CreateSourceBufferL( aMediaId, aReference );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourceDataTypeCode
+// Return the source data type ( four CC code ) for the given media
+// -----------------------------------------------------------------------------
+//
+TFourCC CMsrpPayloadFormatRead::SourceDataTypeCode( 
+	TMediaId aMediaId )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourceDataTypeCode");
+    //TODO: Change me when platform supports
+	if ( KUidMediaTypeAudio == aMediaId.iMediaType )
+		{
+		return iFourCC;
+		}
+	else
+		{
+		return TFourCC( ); //defaults to 'NULL' fourCC
+		}
+	    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SetSourceDataTypeCode
+// Set the source data type to the given four CC code for the given 
+// media
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::SetSourceDataTypeCode( TFourCC aSourceFourCC, 
+    											   TMediaId aMediaId )
+    {
+    
+	//TODO Change me when platform supports
+	/*
+	if ( KUidMediaTypeAudio != aMediaId.iMediaType ) 
+		{
+		return KErrNotSupported;
+		}
+	*/
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SetSourceDataTypeCode");
+    iFourCC = aSourceFourCC;
+    iMediaId = aMediaId;
+    iClip->SetSourceDataTypeCode( iFourCC, iMediaId );
+    return KErrNone;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourceThreadLogon
+// Log in to the source thread
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::SourceThreadLogon( 
+    MAsyncEventHandler& aEventHandler )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourceThreadLogon");
+   	iEventHandler = &aEventHandler;
+    iClip->SourceThreadLogon( aEventHandler );
+    return KErrNone;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::NegotiateSourceL( MDataSink& aDataSink )
+// Negotiate source settings to match data sink object.
+// Re-size frame buffers if needed
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::NegotiateSourceL( MDataSink& /*aDataSink*/ )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::NegotiateSourceL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    iClip->NegotiateSourceL( *this );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourceThreadLogoff
+// Log out of the source thread.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SourceThreadLogoff()
+    {  
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourceThreadLogoff");
+	iClip->SourceThreadLogoff( );
+    }
+ 
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::FilterUnwantedData 
+// this method can be used to filter unwanted data off
+//
+// e.g SipCon1 sends BOM data in first String and PS data as carriage return
+// Engine should NOT touch these but Presentation layer should take care of these
+
+// Method can be used to filtering pusposes if needed
+// -----------------------------------------------------------------------------
+//
+TBool CMsrpPayloadFormatRead::FilterUnwantedData(const TDesC8& aBuffer)
+{
+
+	//TODO: We must do a entity recognizer, which handles this kind of data
+	// This does not affect to actual formatter, instead we
+	// a) must do it to application side
+	// b) we must define an interface, which can be called
+	TBool ret = ETrue; 
+	DP_MSRP_WRITE2("CMsrpPayloadFormatRead::FilterUnwantedData() - BufferSize:%d",aBuffer.Length()); 
+	
+	//get Three first or Three last chars
+	if( aBuffer.Length() >= 3 )
+	{
+		//SipCon sends BOM for the first time
+		TPtrC8 pBOM = aBuffer.Left(3);
+		if ( pBOM[0] == 0xEF && pBOM[1] == 0xBB && pBOM[2]== 0xBF)
+		{
+			//return EFalse if want to filter the whole message
+			ret = ETrue;
+		}
+		
+	
+		// last are unicode PS char ( return )
+		TPtrC8 pPS = aBuffer.Right(3);
+		if ( pPS[0] == 0xE2 && pPS[1] == 0x80 && pPS[2]== 0xA8)
+		{
+			//return EFalse if want to filter
+			ret = ETrue;
+		}
+	
+	}
+	//There might be back spaces and other marks
+	else if( aBuffer.Length() >= 1 )
+	{
+		TPtrC8 pChar = aBuffer.Left(1);
+		if( pChar[0] == 0x08 )
+			{
+				ret = ETrue;
+			}
+		//bell
+		else if( pChar[0] == 0x07)
+			{
+				ret = ETrue;
+			}
+		//tab
+		else if( pChar[0] == 0x09)
+			{
+				ret = ETrue;
+			}
+		//escape
+		else if( pChar[0] == 0x1B)
+			{
+				ret = ETrue;
+			}
+
+		//etc
+	}
+	
+	return ret;
+}
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::BufferFilledL
+// Called after the data buffer is filled. Update the number of bytes read
+// and the current read position for the next read operation.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::DataBufferFilledL( CMMFBuffer* aBuffer, 
+                                           const TRtpRecvHeader& aRtpHeader )
+    { 
+     
+     DP_MSRP_WRITE2("CMsrpPayloadFormatRead::SendDataToSinkL() - BufferSize:%d",aBuffer->BufferSize()); 
+     
+   	__ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( aBuffer->Type() == KUidMmfDataBuffer, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( iStateMachine, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( iFrameBufferOne , User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( iFrameBufferTwo , User::Leave( KErrArgument ) );
+		
+	
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::BufferFilledL with RTP header param:");
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iPadding: %d", aRtpHeader.iPadding );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iExtension: %d", aRtpHeader.iExtension );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iCsrcCount: %d", aRtpHeader.iCsrcCount );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iMarker: %d", aRtpHeader.iMarker );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iPayloadType: %d", aRtpHeader.iPayloadType );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iSeqNum: %d", aRtpHeader.iSeqNum );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iTimestamp: %d", aRtpHeader.iTimestamp );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iHeaderExtension: %d", (TInt)aRtpHeader.iHeaderExtension );
+    DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iCsrcList: %d", (TInt)aRtpHeader.iCsrcList );
+	 
+	 // Do not forward smaller zero length buffers or unwanted data
+    if ( aBuffer->BufferSize() > 0 && FilterUnwantedData(static_cast<CMMFDataBuffer*>( aBuffer )->Data()) )
+    {
+		//check seqnumber, if first packet get sequence Nr. from it
+		if ( iPacketCount == 0 )
+		{
+			//if marker == 1, then we know this is the first packet
+			if(aRtpHeader.iMarker == 1)
+				{
+					// flag to indicate, because first of idle sends this also
+					if ( !iPacketSecNumber )
+						{
+						iSatisfySecNumber =	aRtpHeader.iSeqNum;
+						iCheckSum = iSatisfySecNumber;
+						iPacketSecNumber = ETrue;
+						}
+				}
+			else
+				{
+				// first packet was missing, signal this
+				iFirstPacketsMissing = ETrue;
+				DP_MSRP_WRITE("First Packet Is MISSING!");
+				}
+				
+		}
+		else 
+		{
+			// 0, -1, -2; ( 0 means expected packet arrived )
+			//iLevelsMissing = iSatisfySecNumber - aRtpHeader.iSeqNum;
+            iLevelsMissing = 0; 
+			DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iLevelsMissing: %d", iLevelsMissing );
+			DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL aRtpHeader.iSeqNum: %d", aRtpHeader.iSeqNum );
+			DP_MSRP_WRITE2("CMsrpPayloadFormatRead::BufferFilledL iSatisfySecNumber: %d", iSatisfySecNumber );
+		}
+	
+	
+	iPacketCount++;
+	// check for packets arriving late, redundant data allready got 
+	if ( iLevelsMissing <= 0)
+	{
+	    // we add packet count here. This is for physical packets, not for redundant data
+	   	
+	    if ( iFrameBufferOne->Status() == EAvailable )
+	        {
+			    iFrameBufferOne->Data().Copy( static_cast<CMMFDataBuffer*>( aBuffer )->Data() );
+			    iFrameBufferOne->SetTimeToPlay( aRtpHeader.iTimestamp );
+				iFrameBufferOne->SetLastBuffer( aRtpHeader.iMarker );
+				iFrameBufferOne->SetFrameNumber( aRtpHeader.iSeqNum );
+				iFrameBufferOne->SetStatus( EFull );
+
+	        if (iFrameBufferTwo->Status() == EAvailable )
+	        	{
+	        	iCurrentBuffer = iFrameBufferOne;
+	        	iStateMachine->ChangeState( ESourceDataReady );
+	        	}
+	        }
+	    else if ( iFrameBufferTwo->Status() == EAvailable )
+	        {
+			    iFrameBufferTwo->Data().Copy( static_cast<CMMFDataBuffer*>( aBuffer )->Data() );
+			    iFrameBufferTwo->SetTimeToPlay( aRtpHeader.iTimestamp );  
+				iFrameBufferTwo->SetLastBuffer( aRtpHeader.iMarker );
+				iFrameBufferTwo->SetFrameNumber( aRtpHeader.iSeqNum );
+				iFrameBufferTwo->SetStatus( EFull );
+			
+	        if (iFrameBufferOne->Status() == EAvailable ) 
+		        {
+		        iCurrentBuffer = iFrameBufferTwo;   
+		       	iStateMachine->ChangeState( ESourceDataReady );    	
+		        }
+	       	}
+	    else
+	        {
+	        // Neither of the buffers is available and leave
+	        User::Leave( KErrNotReady ); 
+	        }
+    }
+    else
+		{
+		DP_MSRP_WRITE("CMsrpPayloadFormatRead::BufferFilledL IGNORING Packet, data recovered!");
+		}
+		
+    }
+    else
+    {
+    	DP_MSRP_WRITE("CMsrpPayloadFormatRead::BufferFilledL NO PAYLOAD, Data smaller than 8 bytes ");
+    	iStateMachine->ChangeState( EWaitSourceData );
+    }
+    
+    
+}
+
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::DecodePayloadL( const TDesC8& aBuffer )
+//
+// Decodec payload according level 2 redundancy ( RFC 4103 )
+// First there are Normal RTP Header, which was extracted by RTP Stack.
+// Then there are two 32-bit Redundant headers and one 8 -bit primary Header.
+// Then there are R2, R1 and Primary data appended respectively.
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::DecodePayloadL( const TDesC8& aBuffer )
+{	
+		DP_MSRP_WRITE("CMsrpPayloadFormatRead::DecodePayload()");
+		
+		TInt ret = KErrNone;
+		RDebug::Print( _L("CMsrpPayloadFormatRead::DecodePayload() -> %d") , aBuffer.Size() );
+		const TUint8* aPtr = aBuffer.Ptr(); 
+		TInt ctr(0);
+	
+		// get 1st 32 = R2 header
+		TUint32 r2Header = Read32( aPtr );
+		
+		RDebug::Print( _L("CMsrpPayloadFormatRead R2 Header Data : %x"), r2Header );
+		aPtr += 4;
+		ctr+= 4; 
+		TUint16 aR2Lenght(0), aR2TimeStamp(0);
+		TInt err = ParseRedHeader( r2Header, aR2Lenght, aR2TimeStamp );
+		
+	    RDebug::Print( _L("CMsrpPayloadFormatRead R2 Lengt : %d , TimeStamp %x "), aR2Lenght, aR2TimeStamp );
+		if( err )
+		{
+			User::Leave( err );
+		}
+		
+		// get 2nd 32 =  R1 header
+		TUint32 r1Header = Read32( aPtr );
+		RDebug::Print( _L("CMsrpPayloadFormatRead R1 Header Data : %x"), r1Header );
+		aPtr += 4;
+		ctr +=4; 
+		TUint16 aR1Lenght(0), aR1TimeStamp(0);
+		err = ParseRedHeader( r1Header, aR1Lenght, aR1TimeStamp );
+		RDebug::Print( _L("CMsrpPayloadFormatRead R1 Lengt : %x , TimeStamp %x "), aR1Lenght, aR1TimeStamp );
+		if( err )
+		{
+			User::Leave( err );
+		}
+		
+		// get 
+		TUint8 aPt = ( Read8( aPtr ) & 255 ); 
+		aPtr += 1;
+		ctr += 1;
+		TUint8 pPayloadType = ( aPt & 127 ); 
+		TUint8 pBit = ( aPt >> 7 );
+	
+		RDebug::Print( _L("CMsrpPayloadFormatRead Primary data : %d "), aPt );
+		RDebug::Print( _L("CMsrpPayloadFormatRead Primary bit : %d , PT %d "), pBit, pPayloadType );
+		
+		//TODO: When IOP-Tests Are done clean me out.
+		TPtr8 pP = iCharData->Des();
+		pP.FillZ();
+		pP.Zero();
+		pP.Append(aPtr, aR2Lenght); 
+		aPtr += aR2Lenght;
+		TBuf16<KDataSize> unicode;
+	  	User::LeaveIfError(
+	    			CnvUtfConverter::ConvertToUnicodeFromUtf8(unicode, pP ));
+		TStringElement data;
+		data.iData = unicode;
+		iRedData->AppendL(data);
+		
+		RDebug::Print( _L("CMsrpPayloadFormatRead GOT Data %S "), &pP );
+		
+		pP.FillZ();
+		pP.Zero();
+		pP.Append(aPtr, aR1Lenght);
+		aPtr += aR2Lenght;
+		unicode.FillZ();
+		unicode.Zero();
+		User::LeaveIfError(
+	    			CnvUtfConverter::ConvertToUnicodeFromUtf8(unicode, pP ));
+		data.iData = unicode;
+		iRedData->AppendL(data);
+
+		RDebug::Print( _L("CMsrpPayloadFormatRead GOT Data %S "), &pP );
+		TInt rest = aBuffer.Size() - ( ctr + aR2Lenght + aR1Lenght);
+		
+		//NO PRIMARY DATA, means redundant packet 
+		if( rest == 0)
+		{
+			ret = KErrNotFound;	
+		}
+		
+		RDebug::Print( _L("CMsrpPayloadFormatRead Rest %d "), rest );
+		
+		pP.FillZ();
+		pP.Zero();
+		pP.Append(aPtr, rest );
+		aPtr += aBuffer.Size();
+		unicode.FillZ();
+		unicode.Zero();
+		User::LeaveIfError(
+	    			CnvUtfConverter::ConvertToUnicodeFromUtf8(unicode, pP ));
+		data.iData = unicode;
+		iRedData->AppendL(data);
+		
+		RDebug::Print( _L("CMsrpPayloadFormatRead GOT Data %S "), &pP );
+		return ret;
+	
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::ParseRedHeader
+// Small helper method that parses the 32-bit redundant header
+// according to RFC 4103
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::ParseRedHeader(TUint32 /*aHeader*/, TUint16& /*aLenght*/, TUint16& /*aTimeStamp*/ )
+{
+	// Not Supported
+#if 0
+		TUint8 aPt = ( aHeader >> 24 ) & 255;
+		TUint8 aTest = ( aHeader ) & 255;
+		
+		TUint8 aBit = ( aPt >> 7 ) & 1;
+		TUint8 aPayloadType = ( aPt & 127 );
+		//TODO: Checks fi PayloadTypes and bits match
+		
+		aTimeStamp = ( aHeader >> 10 ) & 0x3FFF; 
+		aLenght = ( aHeader & 0x3FF );
+		//TODO: Checks if timestampoffset and lenght is ok
+#endif
+		return KErrNone;
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::HandleRedundancyL
+// Logic method, that updates all counters and decides what data we should
+// append to userBuffer. If packets are missing, we must use redundant data
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::HandleRedundancyL(TInt aErrNo)
+{
+		
+		DP_MSRP_WRITE2("CAnyPayloadFormatRead::BufferFilledL iLevelsMissing: %d", iLevelsMissing );
+		DP_MSRP_WRITE2("CAnyPayloadFormatRead::BufferFilledL iFirstPacketsMissing: %d", iFirstPacketsMissing );
+		DP_MSRP_WRITE2("CMsrpPayloadFormatRead::HandleRedundancy() -> 0 :%S", &iRedData->At(0).iData  );
+		DP_MSRP_WRITE2("CMsrpPayloadFormatRead::HandleRedundancy() -> 1 :%S", &iRedData->At(1).iData  );
+		DP_MSRP_WRITE2("CMsrpPayloadFormatRead::HandleRedundancy() -> 2 :%S", &iRedData->At(2).iData );
+		
+			//if first packet is missing handle all redData
+			if( iFirstPacketsMissing )
+			{	
+	        	iDecodedBuffer->Data().Append( iRedData->At(2).iData );
+	        	iDecodedBuffer->Data().Append( iRedData->At(1).iData );
+	        	iDecodedBuffer->Data().Append( iRedData->At(0).iData );					
+				iSatisfySecNumber += 3;
+			}
+			else // check levels from 
+			{
+				switch(iLevelsMissing)
+				{	
+						case(0):		
+							// expected packet errived
+							iDecodedBuffer->Data().Append(iRedData->At(2).iData);
+							iSatisfySecNumber ++;	
+						break;
+						
+						case(-1): // one packet missing
+							if( aErrNo )
+								{
+								iDecodedBuffer->Data().Append(iRedData->At(2).iData);	
+								}
+							if ( iRedData->At(1).iData.Length() != 0 )
+								{
+								iDecodedBuffer->Data().Append(iRedData->At(1).iData);	
+								}
+							iSatisfySecNumber += 2;
+							iDroppedPacketCount += 1;	
+						break;
+						
+						case(-2): // two packets missing
+							if( aErrNo )
+								{
+								iDecodedBuffer->Data().Append(iRedData->At(2).iData);	
+								}
+							if ( iRedData->At(1).iData.Length() != 0 )
+								{
+								iDecodedBuffer->Data().Append(iRedData->At(1).iData);	
+								}
+							if ( iRedData->At(0).iData.Length() != 0 )
+								{
+								iPayloadBuffer->Data().Append(iRedData->At(0).iData);	
+								}
+							iSatisfySecNumber += 3;
+							iDroppedPacketCount += 2;
+						break;
+						 
+						default:
+							//bacause if network idles or in debugging state
+							// a lot of packets might not be received.
+							//we are handlng all as missing chars
+							DP_MSRP_WRITE("CMsrpPayloadFormatRead::LevelsMissing > 2!");
+						
+							iDecodedBuffer->Data().Append(KLostChar);
+							iSatisfySecNumber += (-iLevelsMissing ) +1;
+							iDroppedPacketCount += (-iLevelsMissing );
+						
+						break;
+				}
+			}		
+	return KErrNone;
+}
+        
+         
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::ResetPacketBuffers()
+// Helper method that that resets all buffers used
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::ResetPacketBuffers()
+	{
+	DP_MSRP_WRITE("CMsrpPayloadFormatRead::ResetPacketBuffers()");
+	iRedData->Reset();
+	iCharData->Des().FillZ();
+	iCharData->Des().Zero();
+	iDecodedBuffer->Data().FillZ();
+	iDecodedBuffer->Data().Zero();
+	}
+
+
+// NOT CALLED, BECAUSE WE ARE USING RTP ONLY
+void CMsrpPayloadFormatRead::BufferFilledL( CMMFBuffer* /*aBuffer*/ )
+	{        
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::BufferFilledL");
+    User::Leave( KErrNotSupported );
+	}
+	
+	
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::Duration
+// Return the clip duration for the given media.
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds CMsrpPayloadFormatRead::Duration( 
+	TMediaId /*aMediaType*/ ) const
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::Duration");    
+    return TTimeIntervalMicroSeconds( TInt64( 0 ) );
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::LastDlPacketCount
+// Return current packet count for current talk spurt
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatRead::LastDlPacketCount( ) 
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::LastDlPacketCount");   
+    return iPacketCount;
+    }
+ 
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CancelDlRequest( )
+// 
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::CancelDlRequest()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::CancelDlRequest");
+  	iStateMachine->Cancel();
+    iStateMachine->ChangeState( EDecodeIdle );
+    
+    if ( iFrameBufferOne && iFrameBufferTwo )
+        {
+        iFrameBufferOne->SetLastBuffer( EFalse );
+        iFrameBufferTwo->SetLastBuffer( EFalse );
+
+        iFrameBufferOne->SetStatus( EAvailable );
+        iFrameBufferTwo->SetStatus( EAvailable );
+        }
+
+    iBufferToReadExists = EFalse;
+    iCurrentBuffer = iFrameBufferOne;
+    iFillRequested = EFalse;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourcePrimeL()
+// 
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SourcePrimeL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourcePrimeL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    iClip->SourcePrimeL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourcePlayL()
+//
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SourcePlayL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourcePlayL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+
+		// init packet count
+    iPacketCount = 0;
+    
+    //init satisfiable sec number count
+    iSatisfySecNumber = 0;
+    
+    iCheckSum = 0;
+    
+    // init levelsMissingNumber
+    iLevelsMissing = 0;
+    
+    //init flag
+    iPacketSecNumber = EFalse;
+    
+    iClip->SourcePlayL();
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourcePauseL()
+//
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SourcePauseL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourcePauseL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    
+    this->CancelDlRequest();
+    iClip->SourcePauseL();
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SourceStopL( )
+//
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::SourceStopL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SourceStopL");
+    __ASSERT_ALWAYS( iClip, User::Leave( KErrArgument ) );
+    
+    this->CancelDlRequest();
+    iClip->SourceStopL();
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::SinkDataTypeCode()
+// Returns the datatype code for this Format Decoder
+// -----------------------------------------------------------------------------
+//
+TFourCC CMsrpPayloadFormatRead::SinkDataTypeCode( TMediaId aMediaId )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::SinkDataTypeCode");
+    //TODO: We have to check that media type text
+	
+		if ( KUidMediaTypeAudio == aMediaId.iMediaType )
+			{
+			return iFourCC;
+			}
+		else
+			{
+			return TFourCC(); //defaults to 'NULL' fourCC
+			}
+	
+    }
+   
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::ConfigurePayloadFormatL
+// Configure payload decoding parameters.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatRead::ConfigurePayloadFormatL( 
+	const TDesC8& aConfigParams )
+	
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::ConfigurePayloadFormatL");
+    TMccCodecInfoBuffer infoBuffer;
+    infoBuffer.Copy( aConfigParams );
+    TMccCodecInfo cInfo = infoBuffer();
+    
+    if ( cInfo.iIsUpdate && cInfo.iFrameSize == iCodecInfo.iFrameSize )
+        {
+        //__MsrpFORMAT_CONTROLL( "CMsrpPayloadFormatRead::ConfigurePayloadFormatL, nothing to configure" )
+        return;
+        }
+        
+    UpdateConfigurationL( aConfigParams );
+        
+}
+
+
+void CMsrpPayloadFormatRead::UpdateConfigurationL(const TDesC8& aConfigParams)
+	{
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::UpdateConfigurationL");
+	TMccCodecInfoBuffer infoBuffer;
+    infoBuffer.Copy( aConfigParams );
+    TMccCodecInfo cInfo = infoBuffer();
+	
+	//TODO: get me right 
+   // iCodecInfo = cInfo;
+   //	iCodecInfo.iRedundancyCount = 0;
+   iCodecInfo = cInfo;
+
+    //Create buffers respectively
+  	if ( !iFrameBufferOne )
+	    {
+	    iFrameBufferOne = 
+	    	CMMFDataBuffer::NewL( KRedHeaderSize + KDataSize );
+	    iFrameBufferOne->SetStatus( EAvailable );
+	    }
+	    
+	if ( !iFrameBufferTwo )
+	    {
+	    iFrameBufferTwo =
+	    	CMMFDataBuffer::NewL( KRedHeaderSize + KDataSize );
+	    iFrameBufferTwo->SetStatus( EAvailable );
+	    }
+	    
+	if ( iPayloadBuffer && iSourceBufOwnership ) 	
+	    {
+	    delete iPayloadBuffer;
+	    iPayloadBuffer = NULL;
+	    }
+    
+    iPayloadBuffer 
+        = CreateClipBufferL( KRedHeaderSize + KDataSize, iSourceBufOwnership );
+    
+    iCurrentBuffer = NULL;
+    
+	}
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CreateClipBufferL
+// Creates buffer needed in data transfer with format readers clip.
+// -----------------------------------------------------------------------------
+//
+CMMFDataBuffer* CMsrpPayloadFormatRead::CreateClipBufferL( 
+        TUint aSize, TBool& aIsOwnBuffer )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::CreateClipBufferL");
+    CMMFDataBuffer* buffer( NULL );
+    
+    if ( iClip->CanCreateSourceBuffer() )
+        {
+        static_cast<CMMFFormatDecode*>( iClip )->SuggestSourceBufferSize( aSize );
+        TBool reference( EFalse );
+        
+        //TODO: We have to change media type
+        CMMFBuffer* sourceBuf 
+            = iClip->CreateSourceBufferL( KUidMediaTypeAudio, reference );
+            
+        TBool isSupportedBuf 
+            = CMMFBuffer::IsSupportedDataBuffer( sourceBuf->Type() );
+            
+        TBool isOwnBuffer = reference ? EFalse : ETrue;
+        
+        if ( !isSupportedBuf )
+            {
+            if ( isOwnBuffer )
+                {
+                delete sourceBuf;
+                }
+            
+            User::Leave( KErrNotSupported );
+            }
+        
+        aIsOwnBuffer = isOwnBuffer;
+        buffer = static_cast<CMMFDataBuffer*>( sourceBuf );
+        
+        }
+    else
+        {
+        aIsOwnBuffer = ETrue;
+        buffer = CMMFDataBuffer::NewL( aSize );
+        }
+        
+    
+    return buffer;
+  
+    }
+
+// ==========================    HELPER FUNCTIONS    =========================
+// ========================== 						 =========================
+// ========================== 						 =========================
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::Read32
+// Helper method that reads 32-bit unsigned integer from databuffer
+// -----------------------------------------------------------------------------
+//
+TUint32 CMsrpPayloadFormatRead::Read32( const TUint8* const aPointer )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::Read32");
+    return ( aPointer[3] +
+             ( static_cast<TUint32>( aPointer[2] ) << 8 ) +
+             ( static_cast<TUint32>( aPointer[1] ) << 16 ) +
+             ( static_cast<TUint32>( aPointer[0] ) << 24 ) );
+    } 
+    
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::Read8
+// Helper method that reads 8-bit unsigned integer from databuffer
+// -----------------------------------------------------------------------------
+TUint32 CMsrpPayloadFormatRead::Read8( const TUint8 *const aPointer )
+	{	
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::Read8");
+		
+    return static_cast<TUint32> ( aPointer[0] );
+	}
+	
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::Read24
+// Helper method that reads 24-bit unsigned integer from databuffer
+// -----------------------------------------------------------------------------
+TUint32 CMsrpPayloadFormatRead::Read24( const TUint8 *const aPointer )
+	{
+    DP_MSRP_WRITE("CMsrpPayloadFormatRead::Read24");
+    
+	return ( aPointer[2] + ( static_cast<TUint32>( aPointer[1] ) << 8 ) +
+	       ( static_cast<TUint32>( aPointer[0] ) << 16 ) );
+	}
+	
+	    
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/src/Msrppayloadformatwrite.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,1052 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+// INCLUDE FILES
+
+#include    <rtpheader.h> 
+#include 	<e32cmn.h>
+#include 	<utf.h> // charconv.lib
+ 
+#include    "msrppayloadformatwrite.h" 
+#include    "mccrtpdatasink.h"
+#include 	"Mccrtpinterface.h"
+
+#include    "mccmsrpformatlogs.h"
+#include    "mccuids.hrh"
+#include    "mccdef.h"
+#include    "mccrtpmediaclock.h"
+#include    "mccinternaldef.h"
+#include 	"msrppayloadformatdefs.h"
+#include    "mmccinterfacedef.h"
+#include    "mccmsrpsink.h"
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatRead::CMsrpPayloadFormatRead
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// 
+// iIdleMode is set to ETrue, because when starting we are in IdleMode
+// -----------------------------------------------------------------------------
+//
+CMsrpPayloadFormatWrite::CMsrpPayloadFormatWrite(): iIdleMode(ETrue)
+    {    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::ConstructL ( MDataSink* aSink )
+    {
+     
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::ConstructL");
+    
+    // Set default values
+    iFourCC = KMccFourCCIdMSRP ;
+    //iFourCC.Set( TFourCC( 'T','1','4','0' ) );
+
+	//we are going upstream, so our source is the datapath and
+	// sink is the clip. If we use RTP, which  we do, 
+	// our sink is of cource the RTPSink
+    iClip = aSink;    
+    iIsRtpSink = ( KMccRtpSinkUid  == aSink->DataSinkType() );
+    iIsMsrpSink = (KMccMsrpSinkUid == aSink->DataSinkType() );
+    
+    // two levels of redundancy is allways assumed, not necessarily used
+    // RFC4103 RECOMMENDED
+    iRedData = new(ELeave)CArrayFixFlat<TStringElement>(3);
+    
+    //userBuffer, handles all data put in by user
+    iUserBuffer = new(ELeave)CArrayFixFlat<TStringElement>(3);
+    
+    // init data to null
+    TStringElement one;
+    TStringElement two;
+    TStringElement three;
+    iRedData->AppendL(one);
+    iRedData->AppendL(two); 
+    iRedData->AppendL(three);
+     
+    // maxsize of the packet
+    iBuf = HBufC8::NewL( KRedHeaderSize + KDataSize );
+    iData = const_cast<TUint8*>( iBuf->Des().Ptr() );
+  	
+    if ( iIsRtpSink )
+        {
+        CMccRtpDataSink* tmp = static_cast<CMccRtpDataSink*>( aSink );
+        iRtpDataSink = static_cast<MMccRtpDataSink*>( tmp );
+        }
+    else if(iIsMsrpSink)
+        {
+        CMccMsrpSink *tmp = static_cast<CMccMsrpSink*>( aSink );
+        iMsrpDataSink = static_cast<CMccMsrpSink*>( tmp );
+        }
+    else
+        {
+    	DP_MSRP_WRITE("CMsrpPayloadFormatWrite::ConstructL Leaving: No RTPSink!");
+    	User::Leave(KErrNotSupported);	
+        }
+
+    // Initialize state machine
+    iStateMachine = CFormatEncodeStateMachine::NewL( this );
+    
+    //init state machine to idle state
+    iStateMachine->ChangeState( EEncodeIdle );
+    
+    // Construct Timer for redundant generations.
+    iTimer = CSendStateMachine::NewL( this ); 
+    
+    }
+
+    
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMsrpPayloadFormatWrite* CMsrpPayloadFormatWrite::NewL ( MDataSink* aSink )
+    {
+ 	
+ 	
+ 	DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::NewL" );
+    __ASSERT_ALWAYS( aSink, User::Leave( KErrArgument ) );
+    
+    CMsrpPayloadFormatWrite* self = new (ELeave) CMsrpPayloadFormatWrite;
+    CleanupStack::PushL( self );
+    self->ConstructL( aSink );
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// Destructor 
+CMsrpPayloadFormatWrite::~CMsrpPayloadFormatWrite ()
+    {
+    
+    if ( iStateMachine )
+        {
+        iStateMachine->Cancel();
+        delete iStateMachine;
+        }
+    
+    if(iTimer) 
+	    {
+	    	iTimer->Cancel();
+	    	delete iTimer;	
+	    }
+	   
+    
+    iRtpMediaClock = NULL;
+    iClip = NULL;
+    
+    delete iSourceBuffer;
+    delete iSinkBuffer;
+    delete iRedData;
+    delete iUserBuffer;
+    delete iBuf;
+   
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkThreadLogon
+// Passes the logon command to the sink clip
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatWrite::SinkThreadLogon(MAsyncEventHandler& aEventHandler)
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkThreadLogon");
+    iClip->SinkThreadLogon( aEventHandler );
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkThreadLogoff
+// Passes the logoff command to the sink clip
+// -----------------------------------------------------------------------------
+void CMsrpPayloadFormatWrite::SinkThreadLogoff()
+    {   
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkThreadLogoff");
+    iClip->SinkThreadLogoff();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::CreateSinkBufferL
+// Create a sink buffer
+// -----------------------------------------------------------------------------
+//
+CMMFBuffer* CMsrpPayloadFormatWrite::CreateSinkBufferL( TMediaId /*aMediaId*/,
+                                                        TBool &aReference )
+    { 
+    	
+   	DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::CreateSinkBufferL" );
+
+	/* TODO: Remove me when platform supports
+    if ( KUidMediaTypeText != aMediaId.iMediaType ) 
+    {
+    User::Leave( KErrNotSupported ); 
+    }
+    */    
+    aReference = ETrue;
+    return CreateSinkBufferOfSizeL( KMaxRTTChunkSize + KRedHeaderSize );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::CreateSinkBufferOfSizeL
+// Create a sink buffer of the given size.
+// -----------------------------------------------------------------------------
+//
+CMMFDataBuffer* CMsrpPayloadFormatWrite::CreateSinkBufferOfSizeL( TUint aSize )
+    {
+	
+	DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::CreateSinkBufferOfSizeL" );
+  
+    if ( !iSourceBuffer )
+	    {
+	    iSourceBuffer = CMMFDataBuffer::NewL( aSize );
+    	iSourceBuffer->Data().FillZ( aSize );
+    	iSourceBuffer->SetRequestSizeL( aSize );
+	    }
+	    
+    return iSourceBuffer;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::EmptyBufferL
+// Empty the given source buffer
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::EmptyBufferL( CMMFBuffer* aBuffer, 
+                                            MDataSource* aSupplier, 
+                                            TMediaId /*aMediaId*/ )
+    {
+    
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::EmptyBufferL");
+  
+    __ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS ( aBuffer == iSourceBuffer, User::Leave( KErrArgument ) );
+    __ASSERT_ALWAYS( aSupplier, User::Leave( KErrArgument ) );
+    
+   	// TODO: Remove me when platform supports
+	// __ASSERT_ALWAYS( KUidMediaTypeAudio == aMediaId.iMediaType,
+	// User::Leave( KErrNotSupported ) );
+    
+    // Cancel timer, so timer does not interrupt our current sending.
+    // Timer enables empty blocks to be appended when redundancy is on.
+    iTimer->Cancel();
+       
+    iDataPath = aSupplier;
+    iSourceBuffer = static_cast<CMMFDataBuffer*>( aBuffer );
+    
+    if ( !iSinkBuffer )
+        {        
+        iStateMachine->ChangeState( ESourceBufferEmptied );
+        return;
+        }
+        
+	if ( !iSinkBuffer->Data().Length() ) 
+	    {
+		//User::LeaveIfError( iRtpMediaClock->GetTimeStamp( iKey, iCurrentTimestamp ) );
+   		iSinkBuffer->SetTimeToPlay( TInt64( iCurrentTimestamp ) );
+   		iSinkBuffer->SetFrameNumber( aBuffer->FrameNumber() );	
+	    }
+       
+       
+      // We signal StateMachine to ChangeState() 
+      // this calls back EmptySourceBufferL 
+      iStateMachine->ChangeState( EEmptySourceBuffer );
+   
+    } 
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SetSinkDataTypeCode
+// Set the sink data type to the given four CC code for the given media
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatWrite::SetSinkDataTypeCode( TFourCC aSinkFourCC,
+                                                   TMediaId /*aMediaId*/ )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SetSinkDataTypeCode");
+	/* TODO: Remove me when platform supports
+    if ( KUidMediaTypeText != aMediaId.iMediaType )
+    {
+    User::Leave( KErrNotSupported );
+    }
+    */
+    iFourCC = aSinkFourCC;
+    return KErrNone;
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkDataTypeCode
+// Return the sink data type (four CC code) for the given media ID
+// -----------------------------------------------------------------------------
+//
+TFourCC CMsrpPayloadFormatWrite::SinkDataTypeCode( TMediaId /*aMediaId*/ )
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkDataTypeCode");
+  	/* TODO: Remove me when platform supports
+    if ( KUidMediaTypeText == aMediaId.iMediaType )
+        {
+        return iFourCC;
+        }
+    else
+        {
+        return TFourCC(); //defaults to 'NULL' fourCC
+        }
+        */
+	return iFourCC;
+        
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::BufferEmptiedL
+// Called after payload buffer is completely emptied by RtpDataSink.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::BufferEmptiedL( CMMFBuffer* /*aBuffer*/ )
+    {
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::BufferEmptiedL" );
+	// nothing to be done
+	
+	//NOTE: 14.12.2007 - LeaveScan causes warning, but this is a interface method
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::FrameTimeInterval
+// Return the frame time interval for the given media
+// Return allways 0
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds 
+    CMsrpPayloadFormatWrite::FrameTimeInterval( TMediaId /*aMediaId*/ ) const
+    {
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::FrameTimeInterval" );
+    return TTimeIntervalMicroSeconds( TInt64( 0 ) );
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::Duration
+// Return the frame time interval for the given media
+// NOT SUPPORTED
+// -----------------------------------------------------------------------------
+//
+TTimeIntervalMicroSeconds 
+    CMsrpPayloadFormatWrite::Duration( TMediaId /*aMediaType*/ ) const
+    {
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::Duration" );
+    return TTimeIntervalMicroSeconds( TInt64( 0 ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::EmptySourceBufferL
+// Empty the given sourcebuffer
+// Sourcebuffer is given in iSourceBuffer
+// Called by StateMachine
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::EmptySourceBufferL()
+	{
+				
+	  	DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::EmptySourceBufferL" );
+	 
+	  	const TDesC8& srcDes( iSourceBuffer->Data() );
+    	const TUint8* srcPtr = srcDes.Ptr();
+  		TInt length = iSourceBuffer->Data().Length();
+  		
+  		if ( iSourceBuffer->Data().Length() ) 
+	  		{
+	  		
+		  		if( KMaxRTTChunkSize < length )
+				  	{
+				  		DP_MSRP_WRITE( "ERR - RTT Payload Length exceeded MaxChunkSize" );
+				  		User::Leave(KErrArgument);
+				  	}
+			  	
+		  		TBuf16<KMaxRTTChunkSize> unicode;
+		    	User::LeaveIfError(
+		    			CnvUtfConverter::ConvertToUnicodeFromUtf8(unicode, TPtrC8(srcPtr)));			
+					
+				//buffer the user data
+				TStringElement buffer;
+				buffer.iData = unicode;
+				iUserBuffer->AppendL(buffer);
+				
+				FormUserDataL();
+				ForwardDataL();
+					
+			}
+}   
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::TimerExpiredL()
+// Sends Redundant data after buffer period, if no user data 
+// appeared before that.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::TimerExpiredL()
+{		
+	DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::TimerExpiredL" );
+	
+	// Because timer expired, we must send redundant data anyway
+	TStringElement nullData;
+	iUserBuffer->AppendL(nullData);
+	
+	FormUserDataL();
+	//TODO:Handle other Errors if any
+	TInt err = SendRedundantDataL();
+	if ( err != KErrNone )
+		{
+			GotoIdleL(); 
+		}
+}
+ 
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::ForwardDataL()
+// Sends Redundant data after buffer period, if no user data 
+// appeared before that.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::ForwardDataL()
+{
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::ForwardDataL" );
+    
+    // Just Send Data
+    TInt err = SendRedundantDataL();
+    
+    if ( err == KErrNone )
+        {
+            iStateMachine->ChangeState( ESourceBufferEmptied ); 
+        }
+} 
+
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SendRedundantDataL()
+// A Method that sends the redundant buffer to Sink
+// Calls CMsrpPayloadFormatWrite::DeliverPacketL
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatWrite::SendRedundantDataL()
+	{
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::SendRedundantDataL" );
+    
+	TStringElement zero = iRedData->At(0);
+	TStringElement one = iRedData->At(1);
+	TStringElement two = iRedData->At(2);
+ 	
+ 	DP_MSRP_WRITE( "******************");
+ 	DP_MSRP_WRITE2( "SendRedundantDataL - Zero Lenght: %d", zero.iData.Length() ); 
+ 	DP_MSRP_WRITE2( "SendRedundantDataL - R1 Lenght: %d", one.iData.Length() );
+ 	DP_MSRP_WRITE2( "SendRedundantDataL - R2 lenght: %d", two.iData.Length() );
+ 	
+	if ( zero.iData.Length() == 0 && one.iData.Length() == 0 && two.iData.Length() == 0 )
+	 {
+	 	DP_MSRP_WRITE( "ERR - SendRedundantDataL - All Data is 0 lenght returning, KErrArgument!"); 
+	 	return KErrArgument;
+	 }
+		 
+	TDes8& destDes( iSinkBuffer->Data() );
+	
+ 	// Assemble redundant data
+    AssembleRedPacket();
+    // Append current data to buffer
+    TPtr8 ptr = iBuf->Des();
+    destDes.Append(  ptr );
+    
+    DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite HeapData size: %d", ptr.Size() );
+    DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite HeapData Length: %d", ptr.Length() );
+    DP_MSRP_WRITE ("CMsrpPayloadFormatWrite::DeliverPacketL, Packet Assembled" );
+	DP_MSRP_WRITE( "******************");
+	
+    DeliverPacketL( *iSinkBuffer );	
+	return KErrNone;
+		
+	}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::FormUserDataL()
+//
+// A function that refreshes the RedundantData Buffer, so that
+// We just can send data that is there.
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatWrite::FormUserDataL()
+{
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::SendRedundantDataL" );
+	
+    TStringElement primary;
+
+    // if there is data
+    if ( iUserBuffer->Count() )
+        {
+            primary = iUserBuffer->At(0);
+        }
+        
+    //set timestamp to primary data, this is used to calculate offset
+    primary.iTimestamp = iSinkBuffer->TimeToPlay().Int64();
+    
+    // can now reset user buffer
+    iUserBuffer->Reset();
+    
+    // get current redundants
+    TStringElement zero = iRedData->At(0);
+    TStringElement one = iRedData->At(1); 
+    
+    // we can now reset old redundant also
+    iRedData->Reset();
+    
+    // re-order redundant data, this must be always present, 
+    // if redundancy changes on-fly from e.g 0 to 2
+    iRedData->AppendL(primary);
+    iRedData->AppendL(zero);
+    iRedData->AppendL(one);
+    
+    return KErrNone;
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::GoToIdleL()
+//
+// When there is no data to send, we must go to idle mode
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::GotoIdleL()
+	{
+	
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::GoToIdleL()");
+    //reset redundancy buffer
+    iRedData->Reset();
+    //add default data  
+    TStringElement empty;
+    iRedData->AppendL(empty);
+    iRedData->AppendL(empty);
+    iRedData->AppendL(empty);
+    iIdleMode = ETrue;
+    
+    //Set State that we are waiting for Data
+    iStateMachine->ChangeState( EWaitForSourceData );
+    
+    // Cancel the Timer also
+    iTimer->Cancel();
+		 	
+	}
+ 
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::AssembleRedPacket()
+//
+// In AssembleRedPacket we must assemble right kind of
+// payload. We switch between redundant and plain data.
+// If redundancy is used a redundant datapacket is generated!
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::AssembleRedPacket()
+	{
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::AssembleRedPacket" );
+    switch( iCodecInfo.iRedundancyCount )
+    {
+        case 0:
+            // just append the primary data and no headers
+            iBuf->Des().Append( iRedData->At(0).iData );
+        break;
+        
+        case 2:
+             TInt err = GenerateRedPacket(); 
+             //TODO: Handle Errors in Creating packet
+        break;
+        
+    }
+
+	}
+
+	
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::GenerateRedPacket() 
+//
+// In GenerateRedPacket we must assemble right kind of
+// payload according to RFC 4103. Level 2 redundancy is used.
+// -----------------------------------------------------------------------------
+//
+TInt CMsrpPayloadFormatWrite::GenerateRedPacket() 
+{
+		
+		DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::GenerateRedPacket()" );
+		
+		TStringElement primary = iRedData->At(0);
+		TStringElement r1 = iRedData->At(1);
+		TStringElement r2 = iRedData->At(2);
+
+		DP_MSRP_WRITE( "*******************************");
+		DP_MSRP_WRITE2("CMsrpPayloadFormatWrite::GenerateRedPacket PR Length: %d", primary.iData.Length() );
+		DP_MSRP_WRITE2("CMsrpPayloadFormatWrite::GenerateRedPacket R1 Length: %d", r1.iData.Length() );
+		DP_MSRP_WRITE2("CMsrpPayloadFormatWrite::GenerateRedPacket R2 Length: %d", r2.iData.Length() );
+
+		// pointer to data
+		TUint8* dataP = iData;
+		TInt count(0);
+		//Fill Data with binary zeroes and zero old
+		Mem::FillZ( dataP, KRedHeaderSize + KDataSize ); 
+		iBuf->Des().Zero();
+    
+    	
+		/*************
+		data[0] = 8 bit
+		1 bit - redundancy marker bit 1
+		7 bit - payloadtype
+		***************/
+		
+		iData[0] |= ( 1 << 7 );
+		iData[0] |= iCodecInfo.iRedundantPayload; 
+		//iData[0] |= 106; 
+		dataP += 1;
+		count ++;
+			
+			
+		/**************
+		data[1-3] = 24 bit
+		14 bit - timestamp offset of R2
+		10 bit - length of  R2
+		***************/
+		
+		TUint32 temp(0);
+		temp |= ( SetTimeOffset(primary.iTimestamp, r2.iTimestamp ) << 10  ); 
+		
+		TUint16 size(r2.iData.Length()); 
+		temp |= size; 
+			
+		Write24(dataP, temp); 
+		dataP += 3;
+		count += 3; 
+		
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[0]: %x", iData[0] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[1]: %x", iData[1] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[2]: %x", iData[2] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[3]: %x", iData[3] );
+		
+			
+		/**************
+		data[4] = 8 bit
+		1 bit - redundancy marker bit 1
+		7 bit - payloadtype
+		***************/
+		
+		iData[4] |= ( 1 << 7 );
+		iData[4] |= iCodecInfo.iRedundantPayload;
+		//iData[4] |= 106;
+		dataP += 1; 
+		count ++;
+	
+		/**************
+		data[5-7] = 24 bit
+		14 bit - timestamp offset of R1
+		10 bit - length of  R1
+		***************/			
+		
+		temp = 0;
+		temp |= ( SetTimeOffset(primary.iTimestamp, r1.iTimestamp ) << 10  );
+	
+		size = r1.iData.Length();  
+		temp |= size; 
+			
+		Write24(dataP, temp);
+		dataP += 3;
+		count += 3;
+				
+		/**************
+		data[8] = 8 bit
+		1 bit - normal marker bit 0
+		7 bit - payloadtype 
+		***************/
+		iData[8] |= ( 0 << 7 );
+		iData[8] |= iCodecInfo.iPayloadType;
+		//iData[8] |= 105;
+		dataP += 1;
+		count ++;
+	
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[4]: %x", iData[4] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[5]: %x", iData[5] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[6]: %x", iData[6] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[7]: %x", iData[7] );
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket DATA[8]: %x", iData[8] );
+		DP_MSRP_WRITE( "*******************************");
+		
+		//TODO: When IOP-Tests Are done, Write me properly using Append, or some other method
+		TInt forHere = count+r2.iData.Length();
+		TInt index(0);
+		if ( r2.iData.Length() )
+		{
+			for ( TInt i = count; i < forHere; i++ )
+			  	{
+				iData[i] = r2.iData[index];
+				index++,
+				RDebug::Print( _L("	X Writing R2 DATA[i]: %x"), iData[i] );
+				}
+			
+		dataP += r2.iData.Length();
+		count += r2.iData.Length();		
+		}
+			
+			
+		forHere = count+r1.iData.Length();
+		index = 0;
+		if ( r1.iData.Length() )
+		{
+			for ( TInt i = count; i < forHere; i++ )
+			  	{
+				iData[i] = r1.iData[index];
+				index++;
+				RDebug::Print( _L("	X Writing R1 DATA[i]: %x"), iData[i] );
+				}
+			
+		dataP += r1.iData.Length();		
+		count += r1.iData.Length();
+		}
+ 
+		
+		forHere = count+primary.iData.Length();
+		index = 0;
+		if ( primary.iData.Length() )
+		{
+			for ( TInt i = count; i < forHere; i++ )
+			  	{
+				iData[i] = primary.iData[index];
+				index++;
+				RDebug::Print( _L("	X Writing PRIMARY DATA[i]: %x"), iData[i] );
+				}
+			
+		dataP += primary.iData.Length();		
+		count += primary.iData.Length();
+		}
+				
+				
+		DP_MSRP_WRITE2( "CMsrpPayloadFormatWrite::GenerateRedPacket Writing Lenght: %d", count );
+		iBuf->Des().Append( iData, count );
+		return KErrNone;
+		
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::DeliverPacketL
+// Prepare the packet header and deliver the packet to the datasink.
+// -----------------------------------------------------------------------------
+void CMsrpPayloadFormatWrite::DeliverPacketL( CMMFDataBuffer& aPayload )
+    {
+    
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::DeliverPacketL"); 
+   
+    if ( !iClip )
+        {
+        User::Leave( KErrNotReady ); 
+        }
+    const TMediaId mediaId( KUidMediaTypeAudio );
+    const TInt dataSize( aPayload.Data().Size() );
+    DP_MSRP_WRITE2( "MSRP Payload SIZE : %d", dataSize );
+    
+    if ( dataSize )
+        {           
+        if (iIsMsrpSink)
+            {
+            iMsrpDataSink->EmptyBufferL( &aPayload, this, mediaId );
+            }
+        }       
+    aPayload.Data().Zero();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SourceBufferEmptiedL
+// Handle the event that sourcebuffer has been emptied.
+// Sourcebuffer is given in "iSourceBuffer".
+// Called by the statemachine.
+// -----------------------------------------------------------------------------
+void CMsrpPayloadFormatWrite::SourceBufferEmptiedL()
+    { 
+    
+    
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::SourceBufferEmptiedL" ); 
+    
+    //Empty all
+    iSourceBuffer->Data().FillZ();  
+	iSourceBuffer->Data().Zero();
+	iSinkBuffer->Data().FillZ();  
+	iSinkBuffer->Data().Zero();
+    iBuf->Des().FillZ();
+    iBuf->Des().Zero();
+    iDataPath->BufferEmptiedL( iSourceBuffer );
+
+	//Finally we set the timer if we are in red mode 	
+	switch( iCodecInfo.iRedundancyCount )
+	{
+		case 0:
+				// do nothing 
+		break;
+		
+		case 2:
+			if ( iIdleMode )
+				{
+				iTimer->Cancel();
+				iTimer->Start();	
+				}
+		break;
+	}
+	
+	// we are no more in idle,
+	iIdleMode = EFalse;
+	
+}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkPrimeL
+// Prime the sink
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::SinkPrimeL()
+    {
+	DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkPrimeL()");
+	iClip->SinkPrimeL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkPrimeL
+// Prime the sink
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::CancelUlRequest() 
+    {
+    
+	DP_MSRP_WRITE("CMsrpPayloadFormatWrite::CancelUlRequest()" );
+    iStateMachine->Cancel();
+    iStateMachine->ChangeState( EEncodeIdle );
+
+    // Reset the payload buffer
+    if ( iSinkBuffer )
+        {
+        TDes8& dataDes = static_cast<CMMFDataBuffer*>( iSinkBuffer )->Data();
+        dataDes.SetLength( 0 );
+        }
+        
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkPlayL
+// Start playing.
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::SinkPlayL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkPlayL" );
+    // Allocate buffer for data transfer between 
+    // FormatWrite - MDataSink
+    delete iSinkBuffer;
+    iSinkBuffer = NULL;
+    iSinkBuffer = CMMFDataBuffer::NewL( KRedHeaderSize + KDataSize );
+    
+    // Start state machine
+    iStateMachine->ChangeState( EWaitForSourceData );
+    
+    iFirstPacketFinished = EFalse;
+
+    // Start a new cycle of frame collecting
+    if ( iSinkBuffer )
+        {
+        iSinkBuffer->SetLastBuffer( EFalse );
+        }
+
+    iClip->SinkPlayL();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkPauseL
+// Pause sink
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::SinkPauseL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkPauseL" );
+	this->CancelUlRequest();
+    iClip->SinkPauseL();
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SinkStopL
+// Stop sink
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::SinkStopL()
+    {
+    DP_MSRP_WRITE("CMsrpPayloadFormatWrite::SinkPauseL" ); 
+    // Stop state machine
+   	this->CancelUlRequest();
+    iClip->SinkStopL(); 
+    }
+
+
+// ---------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::ConfigurePayloadFormatL
+// Configure payload encoding parameters
+// ---------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::ConfigurePayloadFormatL( const TDesC8& aConfigParams, 
+    CMccRtpMediaClock& /*aClock*/  )
+    {
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::ConfigurePayloadFormatL()" );
+   	
+   //Check that buffer is same size, so we can assume data is correct type
+    __ASSERT_ALWAYS( aConfigParams.Size() == sizeof( TMccCodecInfo ),
+        User::Leave( KErrArgument ) );
+     
+    //instantiate correct CodecInfo Structure
+    TMccCodecInfoBuffer infoBuffer;
+    infoBuffer.Copy( aConfigParams );
+    TMccCodecInfo codecInfo( infoBuffer() ); 
+    
+	if ( !codecInfo.iIsUpdate )
+		{
+
+		//iCodecInfo = codecInfo;
+		//iRtpMediaClock = &aClock;  
+		//iKey = iRtpMediaClock->RegisterMediaFormat( KDefaultSampleRate, iCodecInfo.iHwFrameTime );
+		}
+	else
+		{
+		UpdateConfigurationL( aConfigParams );
+		} 
+
+    }
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::UpdateConfigurationL
+// Update payload encoding parameters
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::UpdateConfigurationL( const TDesC8& aConfigParams )
+    { 
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::UpdateConfigurationL" );
+    __ASSERT_ALWAYS( aConfigParams.Size() == sizeof( TMccCodecInfo ),
+        User::Leave( KErrArgument ) );
+    
+    TMccCodecInfoBuffer infoBuffer;
+    infoBuffer.Copy( aConfigParams );
+    TMccCodecInfo codecInfo = infoBuffer();
+    
+    iCodecInfo = codecInfo;
+    //iCodecInfo.iPtime = codecInfo.iPtime;
+    //iCodecInfo.iRedundancyCount = 0;
+    
+    //iCodecInfo.iPayloadType = codecInfo.iPayloadType;
+    //iCodecInfo.iRedundancyCount = codecInfo.iRedundancyCount;
+    //iCodecInfo.iCodecMode = codecInfo.iCodecMode;
+    
+    //TODO: move me to right variable and update buffering time
+    //iTimer->Cancel();
+    //iTimer->SetTimeOut( iCodecInfo.iCodecMode * 1000);
+    
+    // Allocate buffer for data transfer between 
+    // FormatWrite - MDataSink
+    delete iSinkBuffer;
+    iSinkBuffer = NULL;
+    iSinkBuffer = CMMFDataBuffer::NewL( KRedHeaderSize + KDataSize );
+    
+    }
+
+
+
+// ==========================    HELPER FUNCTIONS    =========================
+// ========================== 						 =========================
+// ========================== 						 =========================
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::Write24
+// Simple helper function, that writes a 24-bit value to databuffer, 
+// using pointer
+// -----------------------------------------------------------------------------
+//
+void CMsrpPayloadFormatWrite::Write24( TUint8* const aPointer, TUint32 aValue )
+    {
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::Write24" );
+    aPointer[0] = static_cast<TUint8>( ( aValue & 0xFF0000 ) >> 16 );
+    aPointer[1] = static_cast<TUint8>( ( aValue & 0x00FF00 ) >> 8 );
+    aPointer[2] = static_cast<TUint8>( aValue & 0x0000FF );
+    }
+    
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::Write32
+// Simple helper function, that writes a 32-bit value to databuffer, 
+// using pointer
+// -----------------------------------------------------------------------------
+//    
+void CMsrpPayloadFormatWrite::Write32( TUint8* const aPointer, TUint32 aValue )
+	{
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::Write32" );
+	aPointer[0] = static_cast<TUint8>( ( aValue & 0xFF000000 ) >> 24 );
+	aPointer[1] = static_cast<TUint8>( ( aValue & 0x00FF0000 ) >> 16 );
+	aPointer[2] = static_cast<TUint8>( ( aValue & 0x0000FF00 ) >> 8 );
+	aPointer[3] = static_cast<TUint8>( aValue & 0x000000FF );
+	}
+
+
+// -----------------------------------------------------------------------------
+// CMsrpPayloadFormatWrite::SetTimeOffset
+// Calculates TimeOffset to RedundancyHeader according to 
+// RFC 4103. Actually RFC 4103 does not accurately state how ( and where )
+// timeoffset should be calculated. This calculation is based conversations
+// with authors of RFC 4103
+// -----------------------------------------------------------------------------
+//
+TUint16 CMsrpPayloadFormatWrite::SetTimeOffset( TInt64& aPrim, TInt64& aSecond  )
+{	
+    DP_MSRP_WRITE( "CMsrpPayloadFormatWrite::SetTimeOffset" );
+	TInt pOffset = aPrim - aSecond; 
+	TUint16 aRet = TUint16(pOffset) & KHighestTimeStampOffset;
+	if( aRet > KHighestTimeStampOffset )
+	{
+		aRet = KHighestTimeStampOffset;
+	}
+	return aRet; 
+}
+
+
+TStringElement::TStringElement()
+{
+}
+
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccMsrppayloadformat/src/SendStateMachine.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,156 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+// INCLUDE FILES
+#include <mmfformat.h>
+#include "sendstatemachine.h"
+#include "msrppayloadformatdefs.h"
+
+// MACROS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// RECOMMENDED default time out value
+const TInt KDefaultTimeoutValue = 300000;
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::CSendStateMachine
+// C++ default constructor can NOT contain any code, that
+// might leave
+// -----------------------------------------------------------------------------
+//
+CSendStateMachine::CSendStateMachine( MSendStateObserver* aClient ) :
+    iClient( aClient )
+    {
+    DP_MSRP_WRITE( "CSendStateMachine::CSendStateMachine" );
+    iTimeOutValue = KDefaultTimeoutValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::ConstructL()
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CSendStateMachine::ConstructL( )
+    {
+    DP_MSRP_WRITE( "CSendStateMachine::ConstructL" );
+    
+    // iTimer.CreateLocal();	
+    User::LeaveIfNull( iClient );
+    iPeriodic = CPeriodic::NewL(0);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::NewL
+// Static constructor.
+// -----------------------------------------------------------------------------
+//
+CSendStateMachine* CSendStateMachine::NewL( 
+       MSendStateObserver* aClient )
+    {
+    DP_MSRP_WRITE( "CSendStateMachine::NewL" );
+    
+    CSendStateMachine* self = 
+            new ( ELeave ) CSendStateMachine( aClient );
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// ------------------------------------------------------------------------------
+// CSendStateMachine::~CSendStateMachine
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CSendStateMachine::~CSendStateMachine( )
+    {
+    DP_MSRP_WRITE( "CSendStateMachine::~CSendStateMachine" );
+    
+      if (iPeriodic)
+      {	 
+         iPeriodic->Cancel (); 
+         delete iPeriodic;
+      }
+
+    iClient = NULL;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::SetTimeOut
+// SetTimeOut for periodic timer
+// -----------------------------------------------------------------------------
+//
+void CSendStateMachine::SetTimeOut(TTimeIntervalMicroSeconds32 aValue)
+{
+    DP_MSRP_WRITE( "CSendStateMachine::SetTimeOut" );
+	if (!iPeriodic->IsActive () )
+	{
+		iTimeOutValue = aValue;
+	}
+}
+     
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::Start
+// Starts the PeriodicTimer
+// -----------------------------------------------------------------------------
+//     
+void CSendStateMachine::Start () 
+{
+    DP_MSRP_WRITE( "CSendStateMachine::Start" );
+    if (!iPeriodic->IsActive () )
+        {
+        iPeriodic->Start(iTimeOutValue,iTimeOutValue,TCallBack(IdleCallBackL, this));
+        } 
+   
+}
+
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::Cancel
+// Cancels the PeriodicTimer
+// -----------------------------------------------------------------------------
+//
+void CSendStateMachine::Cancel ()
+{
+    DP_MSRP_WRITE( "CSendStateMachine::Cancel" );
+  iPeriodic->Cancel();	
+}
+
+
+// -----------------------------------------------------------------------------
+// CSendStateMachine::IdleCallBackL
+// IdleCallBackL is the callback function that actually calls
+// back clients TimerExpiredL function
+// -----------------------------------------------------------------------------
+//
+TInt CSendStateMachine::IdleCallBackL (TAny* aPtr)
+{
+    DP_MSRP_WRITE( "CSendStateMachine::IdleCallBackL" );
+    CSendStateMachine* me = ((CSendStateMachine*)aPtr);
+    me->iClient->TimerExpiredL();
+    return ETrue;
+}
+
+// End of line
+
--- a/multimediacommscontroller/mmccanysourcesink/group/anysourcesink.mmp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccanysourcesink/group/anysourcesink.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -30,6 +30,8 @@
 SOURCEPATH      ../src
 SOURCE          mccanysource.cpp
 SOURCE          mccanysink.cpp
+SOURCE          mccdatasender.cpp
+SOURCE          mccdatareceiver.cpp
 SOURCE			    mccanysourcesinkfactory.cpp
 
 SOURCEPATH      ../data
--- a/multimediacommscontroller/mmccanysourcesink/inc/mccanysink.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccanysourcesink/inc/mccanysink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -24,9 +24,11 @@
 #include <e32std.h>
 #include "mccdatasink.h"
 #include "mmccevents.h"
+#include "mccdatasender.h"
 
 // FORWARD DECLARATIONS
 
+class CMccDataSender;
 /**
 *  
 */
@@ -89,6 +91,8 @@
 	    MAsyncEventHandler* iAsyncEventHandler;
 	    TBool iPaused;
 	    TFourCC iFourCC;
+	    
+	    CMccDataSender* iDataSender;
 
 	#ifdef EUNIT_TEST
         friend class UT_CMccAnySink;
--- a/multimediacommscontroller/mmccanysourcesink/inc/mccanysource.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccanysourcesink/inc/mccanysource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -24,13 +24,15 @@
 #include <e32std.h>
 #include "mccdatasource.h"
 #include "mmccevents.h"
+#include "mccdatareceiver.h"
+#include "mccdatareceiverobserver.h"
 
 // FORWARD DECLARATIONS
 
 /**
 *  
 */
-class CMccAnySource: public CMccDataSource
+class CMccAnySource: public CMccDataSource, public MMccDataReceiverObserver
     {
 
     public: // Methods called internally or by the controller
@@ -208,6 +210,10 @@
         * From MDataSource
         */
         void NegotiateSourceL( MDataSink& aDataSink );	
+
+    public:
+    			
+		void DataReceivedL( const TDesC8& aData );
         
     private:
     	
@@ -222,6 +228,10 @@
 	    TBool iPaused;
 	    TFourCC iFourCC;
 
+	    CMccDataReceiver* iDataReceiver;
+    	CMMFBuffer* iBufferToBeFilled;
+        MDataSink* iConsumer;
+
 	#ifdef EUNIT_TEST
         friend class UT_CMccAnySource;
     #endif	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccanysourcesink/inc/mccdatareceiver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,66 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATARECEIVER_H
+#define MCCDATARECEIVER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+#include "mccdatareceiverobserver.h"
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccDataReceiver class declaration
+*/
+class CMccDataReceiver : public CActive
+	{
+    public:
+    
+	    static CMccDataReceiver* NewL( MMccDataReceiverObserver& aObserver );
+		
+	    ~CMccDataReceiver(); 
+		
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMccDataReceiver( MMccDataReceiverObserver& aObserver );
+	    void ConstructL(); // second construction phase
+	    TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+		RMsgQueue<TQueueBuffer> iMsgQueue;	
+		RMsgQueue<TQueueBuffer> iMsgQueue1;    
+		RMsgQueue<TQueueBuffer> iMsgQueue2;    
+		MMccDataReceiverObserver* iObserver;
+    };
+
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccanysourcesink/inc/mccdatareceiverobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,42 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATARECEIVEROBSERVER_H
+#define MCCDATARECEIVEROBSERVER_H
+
+#include <E32Base.h>
+
+// CLASS DECLARATION
+
+/**
+*  CMccDataReceiver class declaration
+*/
+class MMccDataReceiverObserver
+	{
+    public:
+    
+		virtual void DataReceivedL( const TDesC8& aData ) = 0;
+
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccanysourcesink/inc/mccdatasender.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,70 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+
+
+#ifndef MCCDATASENDER_H
+#define MCCDATASENDER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccPeriodicRunner class declaration
+*/
+class CMccDataSender : public CActive
+	{
+    public:
+    
+	    static CMccDataSender* NewL();
+		
+	    ~CMccDataSender(); 
+		
+	public:
+	 
+	 	void Send( const TDesC8& aData );
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMccDataSender();
+	    void ConstructL(); // second construction phase
+	    TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+		RMsgQueue<TQueueBuffer> iSendMsgQueue;
+		RMsgQueue<TQueueBuffer> iSendMsgQueue1;
+		RMsgQueue<TQueueBuffer> iSendMsgQueue2;
+		TQueueBuffer iBuffer;
+		TBool iReady;
+		 
+    };
+
+
+#endif
--- a/multimediacommscontroller/mmccanysourcesink/src/mccanysink.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccanysourcesink/src/mccanysink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -24,6 +24,7 @@
 #include "mccanysourcesinklogs.h"
 #include "mccinternalevents.h"
 #include "mccinternaldef.h"
+#include "mccdatasender.h"
 
 // CONSTANTS
 
@@ -49,6 +50,7 @@
 void CMccAnySink::ConstructSinkL( const TDesC8& /*aInitData*/ )
     {
     __ANYSOURCESINK_CONTROLL( "CMccAnySink::ConstructSinkL" )
+    iDataSender = CMccDataSender::NewL();
     }
     
 // -----------------------------------------------------------------------------
@@ -66,6 +68,7 @@
 CMccAnySink::~CMccAnySink()
     {
     __ANYSOURCESINK_CONTROLL( "CMccAnySink::~CMccAnySink" )
+    delete iDataSender;
     }
 
 // -----------------------------------------------------------------------------
@@ -216,13 +219,18 @@
 // CMccAnySink::EmptyBufferL
 // -----------------------------------------------------------------------------
 //
-void CMccAnySink::EmptyBufferL( CMMFBuffer* /*aBuffer*/,
-                  MDataSource* /*aProvider*/,
+void CMccAnySink::EmptyBufferL( CMMFBuffer* aBuffer,
+                  MDataSource* aProvider,
                   TMediaId /*aMediaId*/ )
 	{
 	__ANYSOURCESINK_CONTROLL( "CMccAnySink::EmptyBufferL" )
+    __ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) );
+	__ASSERT_ALWAYS( aProvider, User::Leave( KErrArgument ) );
 	
-	User::Leave( KErrNotSupported );
+    CMMFDataBuffer* dataBuffer = static_cast<CMMFDataBuffer*>( aBuffer );
+	const TDesC8& data = dataBuffer->Data();	
+    iDataSender->Send( data );
+    aProvider->BufferEmptiedL( aBuffer );
 	}	
 
 // -----------------------------------------------------------------------------
--- a/multimediacommscontroller/mmccanysourcesink/src/mccanysource.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccanysourcesink/src/mccanysource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -24,6 +24,7 @@
 #include "mccanysourcesinklogs.h"
 #include "mccinternalevents.h"
 #include "mccinternaldef.h"
+#include "mccdatareceiver.h"
 
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -48,6 +49,7 @@
 void CMccAnySource::ConstructSourceL( const TDesC8& /*aInitData*/ )
     {    	
     __ANYSOURCESINK_CONTROLL( "CMccAnySource::ConstructSourceL" )
+    iDataReceiver = CMccDataReceiver::NewL( *this );
     }
 	    
 // -----------------------------------------------------------------------------
@@ -65,6 +67,11 @@
 CMccAnySource::~CMccAnySource()
     {   
     __ANYSOURCESINK_CONTROLL( "CMccAnySource::~CMccAnySource" )
+    
+    iBufferToBeFilled = NULL;
+    iConsumer = NULL;
+    
+    delete iDataReceiver;
     }
 
 	
@@ -213,12 +220,13 @@
 // -----------------------------------------------------------------------------
 //
 void CMccAnySource::FillBufferL( 
-	CMMFBuffer* /*aBuffer*/,
-    MDataSink* /*aConsumer*/,
+	CMMFBuffer* aBuffer,
+    MDataSink* aConsumer,
     TMediaId /*aMediaId*/ )
 	{
 	__ANYSOURCESINK_CONTROLL( "CMccAnySource::FillBufferL" )
-	User::Leave( KErrNotSupported );
+	iBufferToBeFilled = aBuffer;
+	iConsumer = aConsumer;
 	}	
                   
 // -----------------------------------------------------------------------------
@@ -259,5 +267,27 @@
 	    }
 	}
 
+// -----------------------------------------------------------------------------
+// CMccAnySource::DataReceivedL
+// -----------------------------------------------------------------------------
+//	
+void CMccAnySource::DataReceivedL( const TDesC8& aData )
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccAnySource::DataReceivedL, Entry" )
+            
+    if ( iBufferToBeFilled && iConsumer )
+        {
+        CMMFDataBuffer* buffer = static_cast<CMMFDataBuffer*>(iBufferToBeFilled);
+
+        if (buffer->Data().MaxLength() >= aData.Length())
+            {            
+            buffer->Data().Copy( aData );
+            iConsumer->BufferFilledL( iBufferToBeFilled );
+        	iBufferToBeFilled = 0;
+        	iConsumer = 0;
+      		}      		
+        }
+    }
+
 // End of file
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccanysourcesink/src/mccdatareceiver.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    
+*
+*/
+
+
+
+        
+// INCLUDE FILES
+#include "mccanysourcesinklogs.h"
+#include "mccdatareceiver.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::CMccDataReceiver
+// -----------------------------------------------------------------------------
+//
+CMccDataReceiver::CMccDataReceiver( MMccDataReceiverObserver& aObserver )
+	: CActive( EPriorityStandard ), iObserver( &aObserver )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMccDataReceiver::ConstructL()
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::ConstructL" )
+            
+    TBuf16<30> aMessageBuffer(_L("RecvQueueForMCCMSRP"));
+    
+    TInt aNo = AssignNameToMessageQueueL(aMessageBuffer);
+    aMessageBuffer.AppendNum(aNo);
+    
+    User::LeaveIfError(iMsgQueue.CreateGlobal(aMessageBuffer, 5, EOwnerProcess ));
+    
+    iMsgQueue.NotifyDataAvailable( iStatus );
+    SetActive();
+
+    }
+
+TInt CMccDataReceiver::AssignNameToMessageQueueL(const TDes16 &aMessageBuffer)
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::AssignNameToMessageQueueL" )
+            
+        
+    for(TInt i =1; i<=10; i++)
+        {
+        TBuf16<30> tempMessage1 = aMessageBuffer;
+        tempMessage1.AppendNum(i);
+        TInt err1 = iMsgQueue1.CreateGlobal(tempMessage1, 5, EOwnerProcess );
+        
+        if(err1 == KErrNone)
+            {
+            TBuf16<30> tempMessage2 = aMessageBuffer;
+            tempMessage2.AppendNum(i+1);
+            TInt err2 = iMsgQueue2.CreateGlobal(tempMessage2, 5, EOwnerProcess );
+            
+            if(err2 == KErrNone)
+                {
+                iMsgQueue1.Close();
+                iMsgQueue2.Close();
+                __ANYSOURCESINK_CONTROLL_INT1( "CMccDataReceiver::AssignNameToMessageQueueL", i )
+                return i;
+                }
+            else
+                {
+                iMsgQueue1.Close();
+                }
+            }
+        }    
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::NewL
+// -----------------------------------------------------------------------------
+//
+CMccDataReceiver* CMccDataReceiver::NewL( MMccDataReceiverObserver& aObserver )
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::NewL" )
+    CMccDataReceiver* self = 
+    	new ( ELeave ) CMccDataReceiver( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+	
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::~CMccDataReceiver
+// -----------------------------------------------------------------------------
+//
+CMccDataReceiver::~CMccDataReceiver()
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::~CMccDataReceiver" )
+    Cancel();
+	iMsgQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMccDataReceiver::DoCancel()
+	{
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::DoCancel" )
+	iMsgQueue.CancelDataAvailable();	
+	}
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::RunL
+// -----------------------------------------------------------------------------
+//	
+void CMccDataReceiver::RunL()
+	{
+    __ANYSOURCESINK_CONTROLL( "CMccDataReceiver::RunL" )
+	TQueueBuffer buffer;
+	iMsgQueue.Receive( buffer );
+	iObserver->DataReceivedL( buffer );
+    iMsgQueue.NotifyDataAvailable( iStatus );
+    SetActive();
+	}
+
+// -----------------------------------------------------------------------------
+// CMccDataReceiver::RunError
+// -----------------------------------------------------------------------------
+//	
+TInt CMccDataReceiver::RunError(TInt /*aError*/)
+	{
+	return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccanysourcesink/src/mccdatasender.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,172 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    
+*
+*/
+
+
+
+        
+// INCLUDE FILES
+#include "mccanysourcesinklogs.h"
+#include "mccdatasender.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::CMccDataSender
+// -----------------------------------------------------------------------------
+//
+CMccDataSender::CMccDataSender( )
+	: CActive( EPriorityStandard ), iReady( EFalse )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMccDataSender::ConstructL()
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::ConstructL" )
+            
+    TBuf16<30> aMessageBuffer(_L("SendQueueForMCCMSRP"));
+    
+    TInt aNo = AssignNameToMessageQueueL(aMessageBuffer);
+    aMessageBuffer.AppendNum(aNo);
+       
+    
+    TInt err = iSendMsgQueue.CreateGlobal(aMessageBuffer, 5, EOwnerProcess );
+    if ( err )
+        {
+        User::LeaveIfError( iSendMsgQueue.OpenGlobal(aMessageBuffer));
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::NewL
+// -----------------------------------------------------------------------------
+//
+CMccDataSender* CMccDataSender::NewL( )
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::NewL" )
+    CMccDataSender* self = 
+    	new ( ELeave ) CMccDataSender();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+TInt CMccDataSender::AssignNameToMessageQueueL(const TDes16 &aMessageBuffer)
+    {
+        __ANYSOURCESINK_CONTROLL( "CMccDataSender::AssignNameToMessageQueueL, Entry" )
+    for(TInt i =1; i<=10; i++)
+        {
+        TBuf16<30> tempMessage1 = aMessageBuffer;
+        tempMessage1.AppendNum(i);
+        TInt err1 = iSendMsgQueue1.CreateGlobal(tempMessage1, 5, EOwnerProcess );
+        
+        if(err1 == KErrNone)
+            {
+            TBuf16<30> tempMessage2 = aMessageBuffer;
+            tempMessage2.AppendNum(i+1);
+            TInt err2 = iSendMsgQueue2.CreateGlobal(tempMessage2, 5, EOwnerProcess );
+            
+            if(err2 == KErrNone)
+                {
+                iSendMsgQueue1.Close();
+                iSendMsgQueue2.Close();
+                __ANYSOURCESINK_CONTROLL_INT1( "CMccDataSender::AssignNameToMessageQueueL", i )
+                return i;
+                }
+            else
+                {
+                iSendMsgQueue1.Close();
+                }
+            }
+        }    
+    return 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::Send
+// -----------------------------------------------------------------------------
+//
+void CMccDataSender::Send( const TDesC8& aData )
+	{
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::Send" )
+	TQueueBuffer buffer( aData );
+	
+    TInt err = iSendMsgQueue.Send( buffer );
+    
+    if ( err == KErrOverflow )
+        {
+        if ( !IsActive() )
+            {
+            iBuffer.Copy( aData );            
+            iSendMsgQueue.NotifySpaceAvailable( iStatus );    
+    	    SetActive();
+            }
+        else
+            {
+            // TODO
+            // BUFFER OR DROP
+            __ANYSOURCESINK_CONTROLL( "CMccDataSender::Send, Dropping Packet" )
+            }
+        }
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccDataSender::~CMccDataSender
+// -----------------------------------------------------------------------------
+//
+CMccDataSender::~CMccDataSender()
+    {
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::~CMccDataSender" )
+    Cancel();
+	iSendMsgQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMccDataSender::DoCancel()
+	{
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::DoCancel" )
+	iSendMsgQueue.CancelSpaceAvailable();	
+	}
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::RunL
+// -----------------------------------------------------------------------------
+//	
+void CMccDataSender::RunL()
+	{
+    __ANYSOURCESINK_CONTROLL( "CMccDataSender::RunL" )
+    iSendMsgQueue.Send( iBuffer );
+    iBuffer.Zero();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccDataSender::RunError
+// -----------------------------------------------------------------------------
+//	
+TInt CMccDataSender::RunError(TInt /*aError*/)
+	{
+	return KErrNone;
+	}
--- a/multimediacommscontroller/mmcccontroller/inc/mccasynclinkcreator.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/inc/mccasynclinkcreator.h	Mon Sep 06 17:32:13 2010 +0530
@@ -144,6 +144,9 @@
      * State of link creation.
      */
     TBool iLinkCreated;
+    
+    HBufC* iFileName;
+    HBufC8* iFileType;
 
     };
 
--- a/multimediacommscontroller/mmcccontroller/inc/mcccontroller.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/inc/mcccontroller.h	Mon Sep 06 17:32:13 2010 +0530
@@ -424,6 +424,15 @@
 		void SetRemoteRtcpAddrL( TMMFMessage& aMessage );
 		
         /**
+        * Sets remote msrp path for given session
+        * @since Series 60 3.0
+        * @param aMessage - [input] Message from clientside
+        * @leave System wide error code if unsuccessful
+        * @return None
+        */
+        void SetRemoteMsrpPathL( TMMFMessage& aMessage );
+		
+        /**
         * Finds given session from session array
         * @since Series 60 3.0
         * @param aSessionID - [input] RTP session ID
--- a/multimediacommscontroller/mmcccontroller/src/mccasynclinkcreator.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/src/mccasynclinkcreator.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -47,6 +47,8 @@
     iClientData( TMccCreateLinkPckg() ), iSession( aSession )
     {
     CActiveScheduler::Add( this );
+    iFileName = NULL;
+    iFileType = NULL;
     }
 
 // ---------------------------------------------------------------------------
@@ -85,6 +87,8 @@
 CMccAsyncLinkCreator::~CMccAsyncLinkCreator()
     {
     this->Cancel();
+    delete iFileName;
+    delete iFileType;
     }
 
 // ---------------------------------------------------------------------------
@@ -101,6 +105,12 @@
     
     if( KErrNone == iStatus.Int() )
         {
+        if (iClientData().iLinkType == KMccLinkMessage)
+            {
+            RDebug::Print( _L("CMccAsyncLinkCreator::RunL Link Type") );
+            
+            iLinkCreated = ETrue;
+            }
         if ( iLinkCreated == EFalse )
             {                                                           
             iSession->CreateRtpSessionL( iClientData().iLinkID,
@@ -208,10 +218,48 @@
     aMessage.ReadData1FromClientL( iClientData );
 
     iSession->CreateLinkL( iClientData().iLinkID, iClientData().iLinkType );
-    iSession->InitializeLinkL( iStatus,
+    
+    if(iClientData().iLinkType == KMccLinkMessage)
+        {
+        HBufC8* tmpMsrpPath = NULL;
+        iSession->InitializeLinkL( iStatus,
+                                       iClientData().iLinkID,
+                                       iClientData().iIapId,
+                                       tmpMsrpPath);
+        if (NULL != tmpMsrpPath )
+            {
+            iClientData().iLocalMsrpPath.Zero();
+            iClientData().iLocalMsrpPath.Copy(tmpMsrpPath->Des());
+            delete tmpMsrpPath;
+            tmpMsrpPath = NULL;
+            }
+        if ( iClientData().iFileShare )
+            {
+            if (iClientData().iFileName.Length() > 0)
+                {
+                if (NULL != iFileName )
+                    delete iFileName;
+                iFileName = iClientData().iFileName.Alloc();
+                }
+            if (iClientData().iFileType.Length() >0 )
+                {
+                if (NULL != iFileType )
+                    delete iFileType;
+                iFileType = iClientData().iFileType.Alloc();
+                }
+            iSession->SetFileShareAttrbs(iFileName, 
+                    iClientData().iFileSize, 
+                    iFileType,
+                    iClientData().iFTProgressNotification);
+            }
+        }
+    else
+        {
+        iSession->InitializeLinkL( iStatus,
                                iClientData().iLinkID,
                                iClientData().iIapId );
 
+        }
     this->SetActive();
     aMessage.WriteDataToClientL( iClientData );
     }
--- a/multimediacommscontroller/mmcccontroller/src/mcccontroller.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmcccontroller/src/mcccontroller.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -874,6 +874,9 @@
         case EMccSetRemoteRtcpAddr:
         	SetRemoteRtcpAddrL( aMessage );
         	break;
+        case EMccSetRemoteMsrpPath:
+            SetRemoteMsrpPathL( aMessage );
+            break;
         case EMccCloseSession:
             CloseSessionL( aMessage );
             break;
@@ -1080,6 +1083,8 @@
     AddCodec( KMccFourCCIdILBC, outCodecs, inCodecs, codecs, index++ );
     AddCodec( KMccFourCCIdG729, outCodecs, inCodecs, codecs, index++ );
     // Not in CMMFDevSound's list
+    //MSRP
+    codecs[ index++ ] = TFourCC( KMccFourCCIdMSRP );
     codecs[ index++ ] = TFourCC( KMccFourCCIdDTMF ); 
     codecs[ index++ ] = TFourCC( KMccFourCCIdRed );
     codecs[ index++ ] = TFourCC( KMccFourCCIdCN );
@@ -1270,6 +1275,24 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMccController::SetRemoteMsrpPathL
+// Sets remote address
+// -----------------------------------------------------------------------------
+//
+void CMccController::SetRemoteMsrpPathL( TMMFMessage& aMessage )
+    {
+    __CONTROLLER( "CMccController::SetRemoteMsrpPathL" )
+    TMccAddressPckg pckg;
+    aMessage.ReadData1FromClientL( pckg );
+
+    TInt session = FindSessionL( pckg().iSessionID );
+    
+    iSessionArray[session]->SetRemoteMsrpPathL( pckg().iRemoteMsrpPath,
+                                                pckg().iConnStatus, pckg().iLinkID );
+    __CONTROLLER( "CMccController::SetRemoteMsrpPathL, exit" )
+    }
+
+// -----------------------------------------------------------------------------
 // CMccController::SendMccEventToClient
 // Enqueues MccEvent to eventbuffer and sends it to client
 // -----------------------------------------------------------------------------
--- a/multimediacommscontroller/mmccinterface/BWINS/mmccinterfaceU.DEF	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccinterface/BWINS/mmccinterfaceU.DEF	Mon Sep 06 17:32:13 2010 +0530
@@ -1,50 +1,52 @@
-EXPORTS
-	?AddBundle@CMccInterface@@QAEHKAAVTMccStreamBundle@@AAK@Z @ 1 NONAME ; int CMccInterface::AddBundle(unsigned long, class TMccStreamBundle &, unsigned long &)
-	?AddDataSink@CMccInterface@@QAEHVTUid@@ABVTDesC8@@AAK@Z @ 2 NONAME ; int CMccInterface::AddDataSink(class TUid, class TDesC8 const &, unsigned long &)
-	?AddDataSource@CMccInterface@@QAEHVTUid@@ABVTDesC8@@AAK@Z @ 3 NONAME ; int CMccInterface::AddDataSource(class TUid, class TDesC8 const &, unsigned long &)
-	?CloseLink@CMccInterface@@QAEHKK@Z @ 4 NONAME ; int CMccInterface::CloseLink(unsigned long, unsigned long)
-	?CloseSession@CMccInterface@@QAEHK@Z @ 5 NONAME ; int CMccInterface::CloseSession(unsigned long)
-	?CodecL@CMccInterface@@QAEPAVCMccCodecInformation@@KKK@Z @ 6 NONAME ; class CMccCodecInformation * CMccInterface::CodecL(unsigned long, unsigned long, unsigned long)
-	?CreateCodecInformationL@CMccCodecInformationFactory@@QAEPAVCMccCodecInformation@@ABVTDesC8@@@Z @ 7 NONAME ; class CMccCodecInformation * CMccCodecInformationFactory::CreateCodecInformationL(class TDesC8 const &)
-	?CreateCodecInformationL@CMccCodecInformationFactory@@QAEPAVCMccCodecInformation@@VTFourCC@@@Z @ 8 NONAME ; class CMccCodecInformation * CMccCodecInformationFactory::CreateCodecInformationL(class TFourCC)
-	?CreateLink@CMccInterface@@QAEHKHAAKAAVTMccNetSettings@@@Z @ 9 NONAME ; int CMccInterface::CreateLink(unsigned long, int, unsigned long &, class TMccNetSettings &)
-	?CreateSession@CMccInterface@@QAEHAAK@Z @ 10 NONAME ; int CMccInterface::CreateSession(unsigned long &)
-	?CreateStream@CMccInterface@@QAEHKKAAKHAAVCMccCodecInformation@@@Z @ 11 NONAME ; int CMccInterface::CreateStream(unsigned long, unsigned long, unsigned long &, int, class CMccCodecInformation &)
-	?DeleteStream@CMccInterface@@QAEHKKK@Z @ 12 NONAME ; int CMccInterface::DeleteStream(unsigned long, unsigned long, unsigned long)
-	?GetBundles@CMccInterface@@QAEHKAAV?$RArray@VTMccStreamBundle@@@@@Z @ 13 NONAME ; int CMccInterface::GetBundles(unsigned long, class RArray<class TMccStreamBundle> &)
-	?GetCapabilities@CMccInterface@@QAEHVTUid@@HABVTDesC8@@AAV?$RPointerArray@VCMccCodecInformation@@@@@Z @ 14 NONAME ; int CMccInterface::GetCapabilities(class TUid, int, class TDesC8 const &, class RPointerArray<class CMccCodecInformation> &)
-	?GetCapabilities@CMccInterface@@QBEHAAV?$RPointerArray@VCMccCodecInformation@@@@@Z @ 15 NONAME ; int CMccInterface::GetCapabilities(class RPointerArray<class CMccCodecInformation> &) const
-	?GetParameter@CMccInterface@@QAEHKKKKKAAVTDes8@@@Z @ 16 NONAME ; int CMccInterface::GetParameter(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, class TDes8 &)
-	?GetSSRC@CMccInterface@@QAEHKKKKAAK@Z @ 17 NONAME ; int CMccInterface::GetSSRC(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long &)
-	?LinkExists@CMccInterface@@QAEHKAAKABVTMccNetSettings@@@Z @ 18 NONAME ; int CMccInterface::LinkExists(unsigned long, unsigned long &, class TMccNetSettings const &)
-	?NewL@CMccCodecInformationFactory@@SAPAV1@XZ @ 19 NONAME ; class CMccCodecInformationFactory * CMccCodecInformationFactory::NewL(void)
-	?NewL@CMccInterface@@SAPAV1@AAVMMccCtrlObserver@@@Z @ 20 NONAME ; class CMccInterface * CMccInterface::NewL(class MMccCtrlObserver &)
-	?PauseStream@CMccInterface@@QAEHKKKKH@Z @ 21 NONAME ; int CMccInterface::PauseStream(unsigned long, unsigned long, unsigned long, unsigned long, int)
-	?PrepareStream@CMccInterface@@QAEHKKKK@Z @ 22 NONAME ; int CMccInterface::PrepareStream(unsigned long, unsigned long, unsigned long, unsigned long)
-	?ReferenceCount@CMccInterface@@QAEHKKKKAAI@Z @ 23 NONAME ; int CMccInterface::ReferenceCount(unsigned long, unsigned long, unsigned long, unsigned long, unsigned int &)
-	?RemoveBundle@CMccInterface@@QAEHKK@Z @ 24 NONAME ; int CMccInterface::RemoveBundle(unsigned long, unsigned long)
-	?RemoveDataSink@CMccInterface@@QAEHKKKK@Z @ 25 NONAME ; int CMccInterface::RemoveDataSink(unsigned long, unsigned long, unsigned long, unsigned long)
-	?RemoveDataSource@CMccInterface@@QAEHKKKK@Z @ 26 NONAME ; int CMccInterface::RemoveDataSource(unsigned long, unsigned long, unsigned long, unsigned long)
-	?ResumeStream@CMccInterface@@QAEHKKKKH@Z @ 27 NONAME ; int CMccInterface::ResumeStream(unsigned long, unsigned long, unsigned long, unsigned long, int)
-	?Reuse@CMccInterface@@QAEHKKKK@Z @ 28 NONAME ; int CMccInterface::Reuse(unsigned long, unsigned long, unsigned long, unsigned long)
-	?SendMediaSignalL@CMccInterface@@QAEXABVTMccEvent@@@Z @ 29 NONAME ; void CMccInterface::SendMediaSignalL(class TMccEvent const &)
-	?SetCodec@CMccInterface@@QAEHKKKAAVCMccCodecInformation@@@Z @ 30 NONAME ; int CMccInterface::SetCodec(unsigned long, unsigned long, unsigned long, class CMccCodecInformation &)
-	?SetParameter@CMccInterface@@QAEHKKKKKABVTDesC8@@@Z @ 31 NONAME ; int CMccInterface::SetParameter(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
-	?SetRemoteAddress@CMccInterface@@QAEHKKABVTInetAddr@@I@Z @ 32 NONAME ; int CMccInterface::SetRemoteAddress(unsigned long, unsigned long, class TInetAddr const &, unsigned int)
-	?StartInactivityTimer@CMccInterface@@QAEHKKKKK@Z @ 33 NONAME ; int CMccInterface::StartInactivityTimer(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
-	?StartStream@CMccInterface@@QAEHKKKKHH@Z @ 34 NONAME ; int CMccInterface::StartStream(unsigned long, unsigned long, unsigned long, unsigned long, int, int)
-	?StopInactivityTimer@CMccInterface@@QAEHKKKK@Z @ 35 NONAME ; int CMccInterface::StopInactivityTimer(unsigned long, unsigned long, unsigned long, unsigned long)
-	?StopStream@CMccInterface@@QAEHKKKK@Z @ 36 NONAME ; int CMccInterface::StopStream(unsigned long, unsigned long, unsigned long, unsigned long)
-	?StreamsExists@CMccInterface@@QAEHKK@Z @ 37 NONAME ; int CMccInterface::StreamsExists(unsigned long, unsigned long)
-	?UpdateDataSink@CMccInterface@@QAEHKKKKABVTDesC8@@@Z @ 38 NONAME ; int CMccInterface::UpdateDataSink(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
-	?UpdateDataSource@CMccInterface@@QAEHKKKKABVTDesC8@@@Z @ 39 NONAME ; int CMccInterface::UpdateDataSource(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
-	?CancelTranscodeFile@CMccInterface@@QAEHK@Z @ 40 NONAME ; int CMccInterface::CancelTranscodeFile(unsigned long)
-	?TranscodeFile@CMccInterface@@QAEHABVTDesC8@@0KAAKPBVCMccCodecInformation@@2@Z @ 41 NONAME ; int CMccInterface::TranscodeFile(class TDesC8 const &, class TDesC8 const &, unsigned long, unsigned long &, class CMccCodecInformation const *, class CMccCodecInformation const *)
-	?CancelMediaQualityRequest@CMccInterface@@QAEHABVTMccMediaQualityConfig@@@Z @ 42 NONAME ; int CMccInterface::CancelMediaQualityRequest(class TMccMediaQualityConfig const &)
-	?MediaQualityRequest@CMccInterface@@QAEHABVTMccMediaQualityConfig@@@Z @ 43 NONAME ; int CMccInterface::MediaQualityRequest(class TMccMediaQualityConfig const &)
-	?Bind@CMccSecureInterface@@QAEHKKKKK@Z @ 44 NONAME ; int CMccSecureInterface::Bind(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
-	?CreateContext@CMccSecureInterface@@QAEHABVTDesC8@@0AAK0@Z @ 45 NONAME ; int CMccSecureInterface::CreateContext(class TDesC8 const &, class TDesC8 const &, unsigned long &, class TDesC8 const &)
-	?NewL@CMccSecureInterface@@SAPAV1@AAVCMccInterface@@@Z @ 46 NONAME ; class CMccSecureInterface * CMccSecureInterface::NewL(class CMccInterface &)
-	?RemoveContext@CMccSecureInterface@@QAEHK@Z @ 47 NONAME ; int CMccSecureInterface::RemoveContext(unsigned long)
-	?UpdateContext@CMccSecureInterface@@QAEHABVTDesC8@@0K0@Z @ 48 NONAME ; int CMccSecureInterface::UpdateContext(class TDesC8 const &, class TDesC8 const &, unsigned long, class TDesC8 const &)
-
+EXPORTS
+	?AddBundle@CMccInterface@@QAEHKAAVTMccStreamBundle@@AAK@Z @ 1 NONAME ; int CMccInterface::AddBundle(unsigned long, class TMccStreamBundle &, unsigned long &)
+	?AddDataSink@CMccInterface@@QAEHVTUid@@ABVTDesC8@@AAK@Z @ 2 NONAME ; int CMccInterface::AddDataSink(class TUid, class TDesC8 const &, unsigned long &)
+	?AddDataSource@CMccInterface@@QAEHVTUid@@ABVTDesC8@@AAK@Z @ 3 NONAME ; int CMccInterface::AddDataSource(class TUid, class TDesC8 const &, unsigned long &)
+	?CloseLink@CMccInterface@@QAEHKK@Z @ 4 NONAME ; int CMccInterface::CloseLink(unsigned long, unsigned long)
+	?CloseSession@CMccInterface@@QAEHK@Z @ 5 NONAME ; int CMccInterface::CloseSession(unsigned long)
+	?CodecL@CMccInterface@@QAEPAVCMccCodecInformation@@KKK@Z @ 6 NONAME ; class CMccCodecInformation * CMccInterface::CodecL(unsigned long, unsigned long, unsigned long)
+	?CreateCodecInformationL@CMccCodecInformationFactory@@QAEPAVCMccCodecInformation@@ABVTDesC8@@@Z @ 7 NONAME ; class CMccCodecInformation * CMccCodecInformationFactory::CreateCodecInformationL(class TDesC8 const &)
+	?CreateCodecInformationL@CMccCodecInformationFactory@@QAEPAVCMccCodecInformation@@VTFourCC@@@Z @ 8 NONAME ; class CMccCodecInformation * CMccCodecInformationFactory::CreateCodecInformationL(class TFourCC)
+	?CreateLink@CMccInterface@@QAEHKHAAKAAVTMccNetSettings@@@Z @ 9 NONAME ; int CMccInterface::CreateLink(unsigned long, int, unsigned long &, class TMccNetSettings &)
+	?CreateSession@CMccInterface@@QAEHAAK@Z @ 10 NONAME ; int CMccInterface::CreateSession(unsigned long &)
+	?CreateStream@CMccInterface@@QAEHKKAAKHAAVCMccCodecInformation@@@Z @ 11 NONAME ; int CMccInterface::CreateStream(unsigned long, unsigned long, unsigned long &, int, class CMccCodecInformation &)
+	?DeleteStream@CMccInterface@@QAEHKKK@Z @ 12 NONAME ; int CMccInterface::DeleteStream(unsigned long, unsigned long, unsigned long)
+	?GetBundles@CMccInterface@@QAEHKAAV?$RArray@VTMccStreamBundle@@@@@Z @ 13 NONAME ; int CMccInterface::GetBundles(unsigned long, class RArray<class TMccStreamBundle> &)
+	?GetCapabilities@CMccInterface@@QAEHVTUid@@HABVTDesC8@@AAV?$RPointerArray@VCMccCodecInformation@@@@@Z @ 14 NONAME ; int CMccInterface::GetCapabilities(class TUid, int, class TDesC8 const &, class RPointerArray<class CMccCodecInformation> &)
+	?GetCapabilities@CMccInterface@@QBEHAAV?$RPointerArray@VCMccCodecInformation@@@@@Z @ 15 NONAME ; int CMccInterface::GetCapabilities(class RPointerArray<class CMccCodecInformation> &) const
+	?GetParameter@CMccInterface@@QAEHKKKKKAAVTDes8@@@Z @ 16 NONAME ; int CMccInterface::GetParameter(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, class TDes8 &)
+	?GetSSRC@CMccInterface@@QAEHKKKKAAK@Z @ 17 NONAME ; int CMccInterface::GetSSRC(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long &)
+	?LinkExists@CMccInterface@@QAEHKAAKABVTMccNetSettings@@@Z @ 18 NONAME ; int CMccInterface::LinkExists(unsigned long, unsigned long &, class TMccNetSettings const &)
+	?NewL@CMccCodecInformationFactory@@SAPAV1@XZ @ 19 NONAME ; class CMccCodecInformationFactory * CMccCodecInformationFactory::NewL(void)
+	?NewL@CMccInterface@@SAPAV1@AAVMMccCtrlObserver@@@Z @ 20 NONAME ; class CMccInterface * CMccInterface::NewL(class MMccCtrlObserver &)
+	?PauseStream@CMccInterface@@QAEHKKKKH@Z @ 21 NONAME ; int CMccInterface::PauseStream(unsigned long, unsigned long, unsigned long, unsigned long, int)
+	?PrepareStream@CMccInterface@@QAEHKKKK@Z @ 22 NONAME ; int CMccInterface::PrepareStream(unsigned long, unsigned long, unsigned long, unsigned long)
+	?ReferenceCount@CMccInterface@@QAEHKKKKAAI@Z @ 23 NONAME ; int CMccInterface::ReferenceCount(unsigned long, unsigned long, unsigned long, unsigned long, unsigned int &)
+	?RemoveBundle@CMccInterface@@QAEHKK@Z @ 24 NONAME ; int CMccInterface::RemoveBundle(unsigned long, unsigned long)
+	?RemoveDataSink@CMccInterface@@QAEHKKKK@Z @ 25 NONAME ; int CMccInterface::RemoveDataSink(unsigned long, unsigned long, unsigned long, unsigned long)
+	?RemoveDataSource@CMccInterface@@QAEHKKKK@Z @ 26 NONAME ; int CMccInterface::RemoveDataSource(unsigned long, unsigned long, unsigned long, unsigned long)
+	?ResumeStream@CMccInterface@@QAEHKKKKH@Z @ 27 NONAME ; int CMccInterface::ResumeStream(unsigned long, unsigned long, unsigned long, unsigned long, int)
+	?Reuse@CMccInterface@@QAEHKKKK@Z @ 28 NONAME ; int CMccInterface::Reuse(unsigned long, unsigned long, unsigned long, unsigned long)
+	?SendMediaSignalL@CMccInterface@@QAEXABVTMccEvent@@@Z @ 29 NONAME ; void CMccInterface::SendMediaSignalL(class TMccEvent const &)
+	?SetCodec@CMccInterface@@QAEHKKKAAVCMccCodecInformation@@@Z @ 30 NONAME ; int CMccInterface::SetCodec(unsigned long, unsigned long, unsigned long, class CMccCodecInformation &)
+	?SetParameter@CMccInterface@@QAEHKKKKKABVTDesC8@@@Z @ 31 NONAME ; int CMccInterface::SetParameter(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
+	?SetRemoteAddress@CMccInterface@@QAEHKKABVTInetAddr@@I@Z @ 32 NONAME ; int CMccInterface::SetRemoteAddress(unsigned long, unsigned long, class TInetAddr const &, unsigned int)
+	?StartInactivityTimer@CMccInterface@@QAEHKKKKK@Z @ 33 NONAME ; int CMccInterface::StartInactivityTimer(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
+	?StartStream@CMccInterface@@QAEHKKKKHH@Z @ 34 NONAME ; int CMccInterface::StartStream(unsigned long, unsigned long, unsigned long, unsigned long, int, int)
+	?StopInactivityTimer@CMccInterface@@QAEHKKKK@Z @ 35 NONAME ; int CMccInterface::StopInactivityTimer(unsigned long, unsigned long, unsigned long, unsigned long)
+	?StopStream@CMccInterface@@QAEHKKKK@Z @ 36 NONAME ; int CMccInterface::StopStream(unsigned long, unsigned long, unsigned long, unsigned long)
+	?StreamsExists@CMccInterface@@QAEHKK@Z @ 37 NONAME ; int CMccInterface::StreamsExists(unsigned long, unsigned long)
+	?UpdateDataSink@CMccInterface@@QAEHKKKKABVTDesC8@@@Z @ 38 NONAME ; int CMccInterface::UpdateDataSink(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
+	?UpdateDataSource@CMccInterface@@QAEHKKKKABVTDesC8@@@Z @ 39 NONAME ; int CMccInterface::UpdateDataSource(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
+	?CancelTranscodeFile@CMccInterface@@QAEHK@Z @ 40 NONAME ; int CMccInterface::CancelTranscodeFile(unsigned long)
+	?TranscodeFile@CMccInterface@@QAEHABVTDesC8@@0KAAKPBVCMccCodecInformation@@2@Z @ 41 NONAME ; int CMccInterface::TranscodeFile(class TDesC8 const &, class TDesC8 const &, unsigned long, unsigned long &, class CMccCodecInformation const *, class CMccCodecInformation const *)
+	?CancelMediaQualityRequest@CMccInterface@@QAEHABVTMccMediaQualityConfig@@@Z @ 42 NONAME ; int CMccInterface::CancelMediaQualityRequest(class TMccMediaQualityConfig const &)
+	?MediaQualityRequest@CMccInterface@@QAEHABVTMccMediaQualityConfig@@@Z @ 43 NONAME ; int CMccInterface::MediaQualityRequest(class TMccMediaQualityConfig const &)
+	?Bind@CMccSecureInterface@@QAEHKKKKK@Z @ 44 NONAME ; int CMccSecureInterface::Bind(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)
+	?CreateContext@CMccSecureInterface@@QAEHABVTDesC8@@0AAK0@Z @ 45 NONAME ; int CMccSecureInterface::CreateContext(class TDesC8 const &, class TDesC8 const &, unsigned long &, class TDesC8 const &)
+	?NewL@CMccSecureInterface@@SAPAV1@AAVCMccInterface@@@Z @ 46 NONAME ; class CMccSecureInterface * CMccSecureInterface::NewL(class CMccInterface &)
+	?RemoveContext@CMccSecureInterface@@QAEHK@Z @ 47 NONAME ; int CMccSecureInterface::RemoveContext(unsigned long)
+	?UpdateContext@CMccSecureInterface@@QAEHABVTDesC8@@0K0@Z @ 48 NONAME ; int CMccSecureInterface::UpdateContext(class TDesC8 const &, class TDesC8 const &, unsigned long, class TDesC8 const &)
+	?CreateLink@CMccInterface@@QAEHKHAAKAAVTMccMsrpSettings@@@Z @ 49 NONAME ; int CMccInterface::CreateLink(unsigned long, int, unsigned long &, class TMccMsrpSettings &)
+	?SetRemoteMsrpPath@CMccInterface@@QAEHKKAAVTDes8@@0@Z @ 50 NONAME ; int CMccInterface::SetRemoteMsrpPath(unsigned long, unsigned long, class TDes8 &, class TDes8 &)
+
--- a/multimediacommscontroller/mmccinterface/group/interface.mmp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccinterface/group/interface.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -40,6 +40,7 @@
 SOURCE          mmcccodecred.cpp  
 SOURCE          mmcccodeccn.cpp               
 SOURCE          mmcccodech263.cpp                 
+SOURCE		mmcccodecmsrp.cpp                 
 SOURCE          mmcccodecavc.cpp 
 SOURCE          mmcccodecaac.cpp                
 SOURCE          mmccevent.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccinterface/inc/mmcccodecmsrp.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Class is used for configuring G729 codec.
+*
+*/
+
+
+
+
+
+#ifndef MMCCCODECMSRP_H
+#define MMCCCODECMSRP_H
+
+//  INCLUDES
+#include "mmcccodecinformation.h"
+
+// CONSTANTS
+const TUint8 KPayloadType = 999;
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  Container class for the codec information.
+*
+*/
+NONSHARABLE_CLASS( CMccCodecMsrp ) : public CMccCodecInformation
+    {
+    public:  // Constructors and destructor
+        
+        /**
+        * Two-phased constructor.
+        */
+        static CMccCodecMsrp* NewL();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CMccCodecMsrp();
+
+    public: // From CMccCodecInformation
+    
+        TBool RequireSignalling( const CMccCodecInformation& aCandidate ) const; 
+        /**
+        * From CMccCodecInformation
+        */
+        CMccCodecInformation* CloneDefaultsL();
+        
+        /**
+        * From CMccCodecInformation
+        */
+        CMccCodecInformation* CloneDetailedL();
+        
+       
+        TInt EnableVAD( TBool aEnableVAD );
+     
+        TInt SetBitrate( TUint aBitrate );
+        
+        
+        TInt SetSamplingFreq( TUint32 aSamplingFreq );
+
+        /**
+        * From CMccCodecInformation. Sets the packet rate.
+        * @since    Series 60 3.0
+        * @param    aPacketrate        New packetrate
+        * @return   KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+        */
+        TInt SetPTime( TUint aPTime );
+        
+        /**
+        * From CMccCodecInformation. Sets the packet rate.
+        * @since    Series 60 3.0
+        * @param    aPacketrate        New packetrate
+        * @return   KErrNotSupported if codec doesn't support packetrate value issued; otherwise KErrNone.
+        */
+        TInt SetMaxPTime( TUint aMaxPTime );
+
+        /**
+        * From CMccCodecInformation. Sets the sdp name.
+        * @since    Series 60 3.0
+        * @param aRtpId - [input] RTP session ID
+        * @return One of the standard system-wide error codes.
+        */
+        TInt SetSdpName( const TDesC8& aSdpName );
+        
+        /**
+        * From CMccCodecInformation. Sets the payload type.
+        * @since    Series 60 3.0
+        * @param    aRtpId - [input] RTP session ID
+        * @return   One of the standard system-wide error codes.
+        */
+        TInt SetPayloadType( TUint8 aPayloadType );
+
+        /**
+        * From CMccCodecInformation. Sets the codec mode.
+        * @since    Series 60 3.0
+        * @param    aMode    Codec mode ( e.g. ULAW/ALAW, Bandwidth efficient / octet aligned )
+        * @return   KErrNotSupported if codec doesnt' support codec mode value issued; otherwise KErrNone.
+        */
+        TInt SetCodecMode( TCodecMode aCodecMode );
+        
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CMccCodecMsrp();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL();
+
+    };
+
+#endif         
+            
+// End of File
--- a/multimediacommscontroller/mmccinterface/src/mmcccodecinformationfactory.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccinterface/src/mmcccodecinformationfactory.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -32,6 +32,7 @@
 #include "mmcccodecdtmf.h"
 #include "mmcccodeccn.h"
 #include "mmcccodecamrwb.h"
+#include "mmcccodecmsrp.h"
 
 
 // ============================= LOCAL FUNCTIONS ===============================
@@ -137,6 +138,11 @@
         codec = CMccCodecCn::NewL();
         CleanupStack::PushL( codec );
         }
+    else if( !aSdpName.CompareF( KMSRPSdpName ) )
+        {
+        codec = CMccCodecMsrp::NewL();
+        CleanupStack::PushL( codec );
+        }
     else
         {
         User::Leave( KErrNotSupported );
@@ -195,6 +201,11 @@
         {
         codec = CMccCodecCn::NewL();
         }
+    else if ( aFourCC == KMccFourCCIdMSRP )
+        {
+        codec =  CMccCodecMsrp::NewL();
+        }
+
     else
         {
         User::Leave( KErrNotSupported );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccinterface/src/mmcccodecmsrp.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,291 @@
+/*
+* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Factory class to create Codec information instances
+*
+*/
+
+
+
+
+
+// INCLUDE FILES
+#include "mmcccodecmsrp.h"
+#include "mccuids.hrh"
+#include "mmccinterfacelogs.h"
+
+
+// EXTERNAL DATA STRUCTURES
+
+// EXTERNAL FUNCTION PROTOTYPES  
+
+// CONSTANTS
+
+// MACROS
+
+// LOCAL CONSTANTS AND MACROS
+
+// MODULE DATA STRUCTURES
+
+// LOCAL FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::CMccCodecMsrp
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CMccCodecMsrp::CMccCodecMsrp() : CMccCodecInformation()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMccCodecMsrp::ConstructL()
+    {
+    iSdpName.Copy( KMSRPSdpName );
+	iType = KUidMediaTypeMessage;
+
+    iHwFrameTime = 20;
+    iFrameSize = 20;
+    SetSamplingFreq( 1000 );
+    SetBitrate( 64 );
+    EnableVAD( EFalse );
+    SetMaxPTime( 100 );
+    SetPTime( 20 );
+    iFourCC = KMccFourCCIdMSRP;
+    iPayloadFormatEncoder = KImplUidMsrpPayloadFormatEncode;
+    iPayloadFormatDecoder = KImplUidMsrpPayloadFormatDecode;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMccCodecMsrp* CMccCodecMsrp::NewL()
+    {
+    CMccCodecMsrp* self = new( ELeave ) CMccCodecMsrp;
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::~CMccCodecMsrp
+// 
+// -----------------------------------------------------------------------------
+//
+CMccCodecMsrp::~CMccCodecMsrp()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::RequireSignalling
+// -----------------------------------------------------------------------------
+//
+TBool CMccCodecMsrp::RequireSignalling(
+    const CMccCodecInformation& aCandidate ) const      
+    {
+    __INTERFACE( "CMccCodecMsrp::RequireSignalling" )
+    TBool ret = EFalse;
+              
+    if ( iPTime != aCandidate.PTime() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, PTime changed" )
+        ret = ETrue;
+        }
+        
+    if ( iMaxPTime != aCandidate.MaxPTime() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, MaxPTime changed" )
+        ret = ETrue;
+        }
+        
+    if ( iPayloadType != aCandidate.PayloadType() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, PayloadType changed" )
+        ret = ETrue;
+        }
+
+    if ( iBitrateMask != aCandidate.AllowedBitrates() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, BitrateMask changed" )
+        ret = ETrue;
+        }
+
+    if ( iCodecMode != aCandidate.CodecMode() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, CodecMode changed" )
+        ret = ETrue;
+        }
+        
+    if ( iSamplingFreq != aCandidate.SamplingFreq() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, SamplingFreq changed" )
+        ret = ETrue;
+        }     
+        
+    if ( iMaxBitrate != aCandidate.MaxBitrate() )
+        {
+        __INTERFACE( "CMccCodecMsrp::RequireSignalling, MaxBitrate changed" )
+        ret = ETrue;
+        }
+             
+    __INTERFACE_INT1( "CMccCodecMsrp::RequireSignalling, exit with", ret )
+    return ret;          
+    }
+ 
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetBitrate
+// Sets the bitrate used with AMR codec.
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetBitrate( TUint aBitrate )
+    {
+    
+    // Not supported
+    iBitrate = aBitrate;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetSamplingFreq
+// Sets the sampling frequency. 
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetSamplingFreq( TUint32 aSamplingFreq )
+    {
+    // Not supported
+    
+    iSamplingFreq = aSamplingFreq;
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetSdpName
+// Sets the SDP name
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetSdpName( const TDesC8& aSdpName )
+    {
+    // Not supported
+    iSdpName.Copy( aSdpName );
+    
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::PayloadType
+// Sets the payload type
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetPayloadType( TUint8 /*aPayloadType*/ )
+    {
+    // Not supported
+    TUint8 aPayloadType = KPayloadType; // dummy value for messgae codec payload type aPayloadType;
+    iPayloadType = aPayloadType;
+    
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetCodecMode
+// Sets the codec mode.
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetCodecMode( TCodecMode aCodecMode )
+    {
+    // Not supported
+    iCodecMode = aCodecMode;
+    return KErrNone;
+    }
+ 
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::EnableVAD
+// Enable / Disable VAD
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::EnableVAD( TBool /*aEnableVAD*/ ) 
+    {
+    // Not supported
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetPTime
+// Set PTime
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetPTime( TUint /*aPTime*/ )
+    {
+    // Not supported
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::SetMaxPTime
+// Set Max PTime
+// -----------------------------------------------------------------------------
+//
+TInt CMccCodecMsrp::SetMaxPTime( TUint /*aMaxPTime*/ )
+    {
+    // Not supported
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::CloneDefaultsL
+// Make a default setting clone from this codec
+// -----------------------------------------------------------------------------
+//
+CMccCodecInformation* CMccCodecMsrp::CloneDefaultsL()
+    {
+    return CMccCodecMsrp::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccCodecMsrp::CloneDetailedL
+// Make a detailed clone from this codec
+// -----------------------------------------------------------------------------
+//
+CMccCodecInformation* CMccCodecMsrp::CloneDetailedL()
+    {
+    CMccCodecMsrp* newCodec = CMccCodecMsrp::NewL();
+    CleanupStack::PushL( newCodec );       
+    newCodec->SetBitrate( this->Bitrate() );
+    newCodec->SetCodecMode( this->CodecMode() );
+    newCodec->SetMaxPTime( this->MaxPTime() );
+    newCodec->SetPayloadType( this->PayloadType() );
+    newCodec->SetPTime( this->PTime() );
+    newCodec->SetSamplingFreq( this->SamplingFreq() );
+    newCodec->SetSdpName( this->SdpName() );
+    CleanupStack::Pop( newCodec );   
+    return newCodec;
+    }
+        
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+//  End of File  
--- a/multimediacommscontroller/mmccinterface/src/mmccevent.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccinterface/src/mmccevent.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -158,6 +158,10 @@
             case KMccTranscodeInProgress:
             case KMccTranscodeCompleted:
             case KMccMasterKeyStaled:
+            case KMccFileSendCompleted:
+            case KMccFileSendProgressNotification:
+            case KMccFileReceiveCompleted:
+            case KMccFileReceiveProgressNotification:
                 HandleMccMediaEvent( event );
                 break;
             
--- a/multimediacommscontroller/mmccinterface/src/mmccinterface.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccinterface/src/mmccinterface.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -322,6 +322,36 @@
     return err;
     }
 
+
+// ---------------------------------------------------------------------------
+// CMccInterface::SetRemoteAddress
+// Set remote msrp path and port number for a given msrp session and connects with remote end point.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CMccInterface::SetRemoteMsrpPath( TUint32 aSessionId, 
+                                               TUint32 aLinkId,
+                                               TDes8 &aRemoteMsrpPath,
+                                               TDes8 &aConnStatus)
+    {
+    __INTERFACE( "MccInterface::SetRemoteMsrpPath" )
+    TInt err = KErrNone;
+    TMccAddress addr;
+    addr.iSessionID = aSessionId;
+    addr.iLinkID = aLinkId;
+    addr.iRemoteMsrpPath = aRemoteMsrpPath;
+    addr.iConnStatus = aConnStatus;
+    TMccAddressPckg package( addr );
+
+    err = iController.CustomCommandSync( iMessageDest,
+                                         EMccSetRemoteMsrpPath,
+                                         package,
+                                         KNullDesC8 );
+
+    
+    __INTERFACE_INT1( "MccInterface::SetRemoteMsrpPath, exit with ", err )
+    return err;
+    }
+
 // ---------------------------------------------------------------------------
 // CMccInterface::CreateSession
 // Creates a new RTP session with a remote participant.
@@ -384,6 +414,81 @@
     return result;
     }
 
+
+// ---------------------------------------------------------------------------
+// CMccInterface::CreateLink
+// Creates a new Mcc link with a remote participant.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CMccInterface::CreateLink( TUint32 aSessionId,
+        TInt aLinkType,
+        TUint32& aLinkId,
+        TMccMsrpSettings& aNetSettings)
+    {    
+    __INTERFACE( "MccInterface::CreateLink with msrpsettings")
+    
+    TMccCreateLink pktLink;
+    pktLink.iSessionID = aSessionId;
+    pktLink.iLinkType = aLinkType;
+    pktLink.iIapId = aNetSettings.iIapId;
+    pktLink.iRemoteAddress = aNetSettings.iRemoteAddress;
+    pktLink.iLocalAddress.SetPort( aNetSettings.iLocalAddress.Port() );
+    pktLink.iIpTOS = aNetSettings.iMediaQosValue;
+    TBool fileShare = EFalse;
+    if ( aNetSettings.iFileShare )
+        {
+        fileShare = ETrue;
+        if ( NULL != aNetSettings.iFileName )
+            {
+            pktLink.iFileName.Zero();
+            pktLink.iFileName.Copy( aNetSettings.iFileName->Des());
+            }
+        pktLink.iFileSize = aNetSettings.iFileSize;
+        if (NULL != aNetSettings.iFileType )
+            {
+            pktLink.iFileType.Zero();
+            pktLink.iFileType.Copy(aNetSettings.iFileType->Des());
+            }
+        pktLink.iFileShare = aNetSettings.iFileShare;
+        pktLink.iFTProgressNotification = aNetSettings.iFTProgressNotification;
+        }
+    //pktLink.iLocalMsrpPath = aNetSettings.iLocalMsrpPath;
+    pktLink.iLocalMsrpPath.Zero();
+    
+    TMccCreateLinkPckg package( pktLink );
+
+    TInt result = iController.CustomCommandSync( iMessageDest,
+                                                 EMccCreateLink,
+                                                 package,
+                                                 KNullDesC8,
+                                                 package );
+
+    if ( KErrNone == result )
+        {
+        aLinkId = package().iLinkID;
+        if (package().iLocalMsrpPath.Length() > 0 )
+            {
+            aNetSettings.iLocalMsrpPath = package().iLocalMsrpPath.Alloc();
+            }
+        }
+
+    __INTERFACE_INT1( "MccInterface::CreateLink, exit with ", result )
+    return result;
+    }
+
+/*
+EXPORT_C TInt CMccInterface::CreateLink( TUint32 aSessionId,
+                             TInt aLinkType,
+                             TUint32& aLinkId,
+                             TMccNetSettings& aNetSettings,
+                             TDes8 &aLocalMsrpPath)
+    {
+    // not required .. 
+    // need to be removed.
+    return 0;
+    }
+*/
+
 // ---------------------------------------------------------------------------
 // CMccInterface::CloseSession
 // Closes RTP session.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/group/bld.inf	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+PRJ_MMPFILES
+msrpsourcesink.mmp
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/group/msrpsourcesink.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+#include <platform_paths.hrh>
+
+TARGET          mmccmsrpsourcesink.dll
+
+CAPABILITY 		CAP_ECOM_PLUGIN
+VENDORID		VID_DEFAULT
+TARGETTYPE		PLUGIN
+
+UID             0x10009D8D 0xA000EBE2
+
+SOURCEPATH      ../src
+SOURCE          mccmsrpsource.cpp
+SOURCE          mccmsrpsink.cpp
+SOURCE          mccmsrpdatasender.cpp
+SOURCE			mccmsrpsourcesinkfactory.cpp
+
+SOURCEPATH      ../../mmccsubcontroller/src
+SOURCE          msrpcallbackmgrobserver.cpp
+
+SOURCEPATH      ../../mmccshared/src
+SOURCE          mcctimermanager.cpp
+
+SOURCEPATH      ..\Data
+START RESOURCE	A000EBE2.rss 
+TARGET      	mmccmsrpsourcesink.rsc
+END
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../mmccinterface/inc
+USERINCLUDE     ../../mmccshared/inc
+USERINCLUDE     ../../mmcccontroller/inc
+USERINCLUDE     ../../mmccsubcontroller/inc
+
+MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE   /epoc32/include/mmf/common
+SYSTEMINCLUDE   /epoc32/include/mmf/server
+SYSTEMINCLUDE   /epoc32/include/ecom
+
+LIBRARY         euser.lib 
+LIBRARY         ecom.lib
+LIBRARY         mmfcontrollerframework.lib
+LIBRARY         mmfserverbaseclasses.lib
+LIBRARY     	msrpclient.lib
+LIBRARY     	mmccsubcontroller.lib charconv.lib
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccdatareceiverobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+
+#ifndef MCCDATARECEIVEROBSERVER_H
+#define MCCDATARECEIVEROBSERVER_H
+
+#include <E32Base.h>
+
+// CLASS DECLARATION
+
+/**
+*  CMccMsrpDataReceiver class declaration
+*/
+class MMccDataReceiverObserver
+	{
+    public:
+    
+		virtual void DataReceivedL( const TDesC8& aData ) = 0;
+
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpdataobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MCCMSRPDATAOBSERVER_H
+#define MCCMSRPDATAOBSERVER_H
+
+#include <e32base.h>
+
+/**
+*  callback function for received msrp packets. 
+*
+*  @lib mccmsrpsourcesink.dll
+*/
+class MMsrpDataObserver
+{
+public :
+
+        /**
+         * A MSRP message has been received from the network.
+         * This function is called when the MSRP message was received from the network
+         * the ownership is transferred
+         * @param aMessage the received message
+         * @param aStatus, KErrNone with complete message, KErrCancel if terminated
+         */
+        virtual void IncomingMessage( HBufC8* aMessageContent, TInt aStatus ) = 0;
+
+        /**
+         * A MSRP REPORT message has been received from the network
+         * This function is called to indicate to the client that a recipient
+         * wishes to indicate a range of bytes as received. Alternative the
+         * recipient might use REPORT to indicate an error. In case of error the
+         * MSRP stops sending the message. However, it is client's responsibility
+         * how the handle the information
+         * @param aStatus status code from the REPORT message
+         * @param aRangeStart start of byte range received
+         * @param aRangeEnd end of byte range received
+         * @param aTotal Total number of bytes in the message
+         */
+        virtual void IncomingReport( TInt aStatus, TInt aRangeStart,
+            TInt aRangeEnd, TInt aTotal ) = 0;
+
+        /**
+         * The SendMessage status of the message sending
+         * The possible status code are defined by CMSRPConnection::TMSRPErrorCodes
+         * or system wide error codes
+         * @param aStatus status of the operation
+         * @param aMessageId message identifier of the sent message
+         */
+        virtual void SendResult( TInt aStatus, const TDesC8& aMessageid ) = 0;
+
+        /**
+         * If listen port request fails this is called
+         * @param aStatus error code of the operation
+         */
+        virtual void ListenPortFailure( TInt aStatus ) = 0;
+
+};
+
+#endif //MCCMSRPDATAOBSERVER.H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpdatasender.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+
+#ifndef MCCDATASENDER_H
+#define MCCDATASENDER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+#include "mccexpirationhandler.h"
+#include "mcctimermanager.h"
+
+#include <CMSRP.h>
+#include <CMSRPSession.h>
+
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccPeriodicRunner class declaration
+*/
+class CMccMsrpDataSender : public CActive, public MMccExpirationHandler
+	{
+    public:
+    
+	    static CMccMsrpDataSender* NewL();
+		
+	    ~CMccMsrpDataSender(); 
+		
+	public:
+	 
+	 	void SendL( const TDesC8& aData , CMSRPSession* aMsrpSession);
+	 	void SendPacketL(CMSRPSession* aMsrpSession);
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMccMsrpDataSender();
+	    void ConstructL(); // second construction phase
+	    
+    protected: // From MMccExpirationHandler
+        
+        void TimerExpiredL( TMccTimerId aTimerId, TAny* aTimerParam );
+
+    private:
+	    
+		RMsgQueue<TQueueBuffer> iMsgQueue;
+		TQueueBuffer iBuffer;
+		
+	    CMccTimerManager* iTimeoutTimer;
+	    TMccTimerId iTimerId;
+	    TUint32 iTimeoutTimeMilliseconds;
+		 
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpinterface.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MCCMSRPINTERFACE_H
+#define MCCMSRPINTERFACE_H
+
+//  INCLUDES
+#include <mmf/common/mmfutilities.h>
+#include "mccinternalcodecs.h"
+#include "mmccevents.h"
+#include "mccinternalevents.h"
+#include "mccexpirationhandler.h"
+#include "mccinternaldef.h"
+#include "msrpcallbackmgrobserver.h"
+
+#include <CMSRP.h>
+#include <CMSRPSession.h>
+
+
+// FORWARD DECLARATIONS
+
+class TMccEvent;
+
+
+// CLASS DECLARATION
+
+/**
+* Class to pass the session related parameters to the MSRP source/sink.
+* 
+* @lib Mccmsrpsourcesink.dll
+* @since Series 60 3.0
+*/
+class TMccMsrpSessionParams
+    {
+    public:
+        
+        inline TMccMsrpSessionParams() : iMsrp( NULL ), iMsrpSession( NULL ) 
+		{ 
+		}
+
+        inline TMccMsrpSessionParams( CMSRP* aMsrp, CMSRPSession* aMsrpSession ) :
+            iMsrp( aMsrp ),
+            iMsrpSession( aMsrpSession )
+            { }
+        
+        inline TMccMsrpSessionParams( CMSRP* aMsrp, CMSRPSession* aMsrpSession, CMsrpCallbackMgrObserver* aMsrpObserver ) :
+            iMsrp( aMsrp ),
+            iMsrpSession( aMsrpSession ),
+            iMsrpObserver (aMsrpObserver)
+            { }
+        
+        
+        virtual void SetSessionParamsL( const TMccMsrpSessionParams& /*aParams*/ )
+            {
+            }
+        
+
+    public: // data
+
+        CMSRP* iMsrp;
+		
+		CMSRPSession* iMsrpSession;
+		
+        CMsrpCallbackMgrObserver* iMsrpObserver;
+    };
+
+
+
+
+#endif      // MCCMSRPINTERFACE_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MCCMSRPSINK_H
+#define MCCMSRPSINK_H
+
+//  INCLUDES
+#include <e32std.h>
+#include "mccdatasink.h"
+#include "mmccevents.h"
+#include "mccmsrpdatasender.h"
+#include "mccmsrpinterface.h"
+
+class CMccMsrpDataSender;
+
+// FORWARD DECLARATIONS
+
+/**
+*  
+*/
+class CMccMsrpSink : public CMccDataSink, public TMccMsrpSessionParams
+    {
+    public: // Methods called internally or by the controller
+
+        /**
+        * Two-phased constructor.
+        */
+        static MDataSink* NewSinkL( TUid aImplementationUid, 
+                                        const TDesC8& aInitData );
+                                        
+		void ConstructSinkL ( const TDesC8& aInitData );
+
+		virtual ~CMccMsrpSink();
+
+    public: // From MDataSink
+
+        TFourCC SinkDataTypeCode( TMediaId /*aMediaId*/ );
+
+        TInt SetSinkDataTypeCode( TFourCC aCodec, 
+                                    TMediaId aMedia );
+
+        void BufferEmptiedL( CMMFBuffer* aBuffer );
+        
+        TBool CanCreateSinkBuffer();
+        
+        CMMFBuffer* CreateSinkBufferL( TMediaId, 
+                                         TBool& aReference );
+        
+        TInt SinkThreadLogon( MAsyncEventHandler& aEventHandler );
+        
+        void SinkThreadLogoff();
+
+        void SinkPrimeL();
+        
+        void SinkPlayL();
+        
+        void SinkPauseL();
+        
+        void SinkStopL();
+
+        void EmptyBufferL( CMMFBuffer* aBuffer,
+                          MDataSource* aProvider,
+                          TMediaId aMediaId );
+                          
+        void BufferFilledL( CMMFBuffer* aBuffer );
+        
+        void SetSessionParamsL( const TMccMsrpSessionParams& aParams );
+
+    private:
+    
+        CMccMsrpSink();
+    
+		void SendStreamEventToClient( const TMccEventType& aEventType, 
+		                              TInt aError = KErrNone );
+        
+
+    private:
+		
+	    MAsyncEventHandler* iAsyncEventHandler;
+	    TBool iPaused;
+	    TFourCC iFourCC;
+	    
+	    CMccMsrpDataSender* iDataSender;
+
+	#ifdef EUNIT_TEST
+        friend class UT_CMccMsrpSink;
+    #endif	
+        };
+
+
+#endif 
+
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,304 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+//  INCLUDES
+#ifndef MCCMSRPSOURCE_H
+#define MCCMSRPSOURCE_H
+
+#include <e32std.h>
+#include "mccdatasource.h"
+#include "mmccevents.h"
+
+#include "mccdatareceiverobserver.h"
+#include "mccmsrpinterface.h"
+#include "mccmsrpdataobserver.h"
+
+// FORWARD DECLARATIONS
+
+/**
+*  
+*/
+class CMccMsrpSource: public CMccDataSource,  public TMccMsrpSessionParams, public MMsrpDataObserver, public MMccDataReceiverObserver
+    {
+
+    public: // Methods called internally or by the controller
+
+        /**
+        * Two-phased constructor.
+        */
+        static MDataSource* NewSourceL( TUid aImplementationUid, 
+                                        const TDesC8& aInitData );
+                                        
+		void ConstructSourceL( const TDesC8& aInitData );
+		
+		~CMccMsrpSource();
+
+    public: // From MDataSource
+
+        /**
+        * From MDataSource. Returns the data type as a fourCC code of the data source.
+        *
+        * @since    Series 60 3.0
+        * @param    "aMediaId"
+        *           This identifies the type of media eg audio or video and the stream id.
+        *           Only KUidMediaTypeAudio -mediatype is supported.
+        * @return    The fourCC code identifying the source datatype for the specified aMediaId.
+        */
+        TFourCC SourceDataTypeCode( TMediaId /*aMediaId*/ );
+
+        /**
+        * From MDataSource. Sets the data type as a fourCC code for the data source
+        *
+        * @since    Series 60 3.0
+        * @param    "aSourceFourCC"
+        *            This specifies the data type as a fourCC code to set the source to.
+        *
+        * @param    "aMediaId"
+        *            This identifies the type of media eg audio or video and the stream id.
+        *           Only KUidMediaTypeAudio -mediatype is supported.
+        *
+        * @return    KErrNone if successful, KErrNotSupported if the source does not support having
+        *            it's data type set, otherwise a system wide error code.
+        */
+        TInt SetSourceDataTypeCode( TFourCC aCodec, 
+                                    TMediaId aMedia );
+
+        /**
+        * From MDataSource. Not used. Leaves with KErrNotSupported.
+        * 
+        * @since    Series 60 3.0
+        * @param    "aBuffer"
+        *            The buffer that has been emptied by a data sink and is now available for reuse
+        * @return   None
+        */
+        void BufferEmptiedL( CMMFBuffer* aBuffer );
+        
+        /**
+        * From MDataSource. Method to indicate whether the data source can create a buffer.
+        *
+        * @since    Series 60 3.0
+        * 
+        * @return    EFalse
+        */
+        TBool CanCreateSourceBuffer();
+        
+        /**
+        * From MDataSource. Not used. Leaves with KErrNotSupported.
+        *
+        * @since    Series 60 3.0
+        * @param    "aMediaId"
+        *           This identifies the type of media eg audio or video and the stream id.
+        *           This parameter is required in cases where the source can supply data
+        *           of more than one media type and/or multiple strams of data eg a multimedia file.
+        *
+        * @param    "aReference"
+        *           This must be written to by the method to indicate whether the created buffer is
+        *           a 'reference' buffer.  A 'reference' buffer is a buffer that is owned by the source
+        *           and should be used in preference to the sink buffer provided the sink buffer
+        *           is also not a reference buffer.
+        * .  
+        * @return   The created buffer
+        */
+        CMMFBuffer* CreateSourceBufferL( TMediaId, 
+                                         TBool& aReference );
+        
+        /**
+        * From MDataSource. Method to 'logon' the data source to the same thread that source will be supplying data in.
+        *
+        * Jitterbuffer for incoming packets and downlink timeout timer are created here.
+        * 
+        * @param    "aEventHandler"
+        *           This is an MAsyncEventHandler to handle asynchronous events that occur during the
+        *           transfer of multimedia data.  The event handler must be in the same thread as the data transfer
+        *           thread - hence the reason it is passed in the SourceThreadLogon as opposed to say the constructor.
+        *
+        *
+        * @return   KErrNone if successful, otherwise a system wide error code.
+        */
+        TInt SourceThreadLogon( MAsyncEventHandler& aEventHandler );
+        
+        /**
+        * From MDataSource. Method to 'logoff' the data source from the same thread that source supplies data in.
+        *
+        * Jitterbuffer for incoming packets and downlink timeout timer are deleted. Datasource deletes the 
+        * stream(s) and unregisters itself as an observer for the RTP session for incoming RTP and RTCP packets.
+        *
+        * @return None
+        */
+        void SourceThreadLogoff();
+
+        /**
+        * From MDataSource. Method to 'prime' the data source.
+        *
+        * Datasource is set to primed state.
+        *
+        * @since    Series 60 3.0
+        * @return   None
+        */
+        void SourcePrimeL();
+        
+        /**
+        * From MDataSource. Method to 'play' the data source.
+        *
+        * Downlink timeout timer is started and datasource is set to playing state.
+        *
+        * @since    Series 60 3.0
+        * @return   None
+        */
+        void SourcePlayL();
+        
+        /**
+        * From MDataSource. Method to 'pause' the data source.
+        *
+        * Downlink timeout timer is stopped and datasource is set to paused state.
+        *
+        * @since    Series 60 3.0
+        * @return   None
+        */
+        void SourcePauseL();
+        
+        /**
+        * From MDataSource. Method to 'stop' the data source.
+        *
+        * Downlink timeout timer is stopped and datasource is set to stopped state.
+        *
+        * @since    Series 60 3.0
+        * @return   None
+        */
+        void SourceStopL();
+
+        /**
+        * From MDataSource. Method called by a MDataSink to request the data source to fill aBuffer with data.
+        *
+        * Datasource gets packet from jitterbuffer and forwards it to the payloadformatdecoder
+        * for further processing. Datasource works synchronously; consumers BufferFilledL
+        * is called when RTP packet is got succesfully from jitterbuffer.
+        * 
+        * @since    Series 60 3.0
+        * @param    "aBuffer"
+        *           The buffer that needs filling with data
+        *
+        * @param    "aConsumer" 
+        *           The data sink that consumes the data. The data source needs this to make the BufferFilledL
+        *           callback on aConsumer when the data source has completed filling the aBuffer.
+        *
+        * @param    "aMediaId"
+        *           This identifies the type of media eg audio or video and the stream id.
+        *           This parameter is required in cases where the source can supply data
+        *           of more than one media type and/or multiple strams of data eg a multimedia file.
+        * @return   None
+        */
+        void FillBufferL( CMMFBuffer* aBuffer,
+                          MDataSink* aConsumer,
+                          TMediaId aMediaId );
+                          
+        /**
+        * From MDataSource
+        */
+        void NegotiateSourceL( MDataSink& aDataSink );	
+        
+    public:
+        
+        /**
+         * A MSRP message has been received from the network.
+         * This function is called when the MSRP message was received from the network
+         * the ownership is transferred
+         * @param aMessage the received message
+         * @param aStatus, KErrNone with complete message, KErrCancel if terminated
+         */
+        void IncomingMessage( HBufC8* aMessageContent, TInt aStatus );
+
+        /**
+         * A MSRP REPORT message has been received from the network
+         * This function is called to indicate to the client that a recipient
+         * wishes to indicate a range of bytes as received. Alternative the
+         * recipient might use REPORT to indicate an error. In case of error the
+         * MSRP stops sending the message. However, it is client's responsibility
+         * how the handle the information
+         * @param aStatus status code from the REPORT message
+         * @param aRangeStart start of byte range received
+         * @param aRangeEnd end of byte range received
+         * @param aTotal Total number of bytes in the message
+         */
+        void IncomingReport( TInt aStatus, TInt aRangeStart,
+            TInt aRangeEnd, TInt aTotal );
+
+        /**
+         * The SendMessage status of the message sending
+         * The possible status code are defined by CMSRPConnection::TMSRPErrorCodes
+         * or system wide error codes
+         * @param aStatus status of the operation
+         * @param aMessageId message identifier of the sent message
+         */
+        void SendResult( TInt aStatus, const TDesC8& aMessageid );
+
+        /**
+         * If listen port request fails this is called
+         * @param aStatus error code of the operation
+         */
+        void ListenPortFailure( TInt aStatus );
+
+        
+        //Connection Status
+        TInt iConnectStatus;
+
+    public:
+    			
+		void DataReceivedL( const TDesC8& aData );
+		
+        void SetSessionParamsL( const TMccMsrpSessionParams& aParams );
+        
+        /**
+         * @since   Series 60 3.0
+         *
+         * @param   aMessageContent     MSRP Payload
+         * @return  void
+         */
+        void PlayoutMsrpPacketL( HBufC8* aMessageContent );
+        
+    private:
+    	
+		CMccMsrpSource();
+		
+		void SendStreamEventToClient( TMccEventType aEventType, 
+		                              TInt aError = KErrNone );
+
+    private:
+
+        // The client who requested "FillBuffer"
+        MDataSink* iFillBufferRequester;
+    
+        MAsyncEventHandler* iAsyncEventHandler;
+	    TBool iPaused;
+	    TFourCC iFourCC;
+
+
+    	CMMFDataBuffer* iBufferToBeFilled;
+        MDataSink* iConsumer;
+
+	#ifdef EUNIT_TEST
+        friend class UT_CMccMsrpSource;
+    #endif	
+	
+	};
+
+
+#endif 
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/inc/mccmsrpsourcesinklogs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#ifndef MCCMSRPSOURCESINKLOGS_H
+#define MCCMSRPSOURCESINKLOGS_H
+
+#include "mcclogs.h"
+
+_LIT(KMsrpSourceSink, "Mcc/MsrpSourceSink:");
+
+#ifdef _DEBUG
+	#define __MCC_MSRPSOURCESINK_CONTROLL
+#endif // end of _DEBUG
+
+#ifdef __MCC_MSRPSOURCESINK_CONTROLL
+	#define __MSRPSOURCESINK_CONTROLL( a ) \
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpSourceSink, KStr ); }
+	#define __MSRPSOURCESINK_CONTROLL_INT1( a, b ) \
+		{  _LIT( KStr, a ); TMccLog::Print( KMsrpSourceSink, KStr, b ); }
+#else
+	#define __MSRPSOURCESINK_CONTROLL( a )
+	#define __MSRPSOURCESINK_CONTROLL_INT1( a, b )
+#endif // end of ifdef __MCC_MSRPSOURCESINK_CONTROLL
+
+#endif // End of define MCCMSRPSOURCESINKLOGS_H
+
+// end of file 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpdatasender.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+        
+// INCLUDE FILES
+#include "mccmsrpdatasender.h"
+#include "mccmsrpsourcesinklogs.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::CMccMsrpDataSender
+// -----------------------------------------------------------------------------
+//
+CMccMsrpDataSender::CMccMsrpDataSender( )
+	: CActive( EPriorityStandard )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpDataSender::ConstructL()
+    {
+    iTimeoutTimer = CMccTimerManager::NewL();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::NewL
+// -----------------------------------------------------------------------------
+//
+CMccMsrpDataSender* CMccMsrpDataSender::NewL( )
+    {
+    CMccMsrpDataSender* self = 
+    	new ( ELeave ) CMccMsrpDataSender();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::Send
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpDataSender::SendL( const TDesC8& aData, CMSRPSession* aMsrpSession )
+	{	
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpDataSender::Send, Entry" )
+    __ASSERT_ALWAYS( aMsrpSession, User::Leave( KErrArgument ) );
+	
+    if ( !IsActive() )
+        {
+        iBuffer.Copy( aData );
+        SendPacketL(aMsrpSession);
+        __MSRPSOURCESINK_CONTROLL( "CMccMsrpDataSender::Send, Exit" )
+        }
+	}
+
+
+// -----------------------------------------------------------------------------
+// CMccRtpSender::SendPacketL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpDataSender::SendPacketL( CMSRPSession* aMsrpSession )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpDataSender::SendPacketL, entry" )
+    __ASSERT_ALWAYS( aMsrpSession, User::Leave( KErrArgument ) );
+    
+    if ( iBuffer.Size() )
+        {
+        __MSRPSOURCESINK_CONTROLL( "CMccMsrpDataSender::SendBuffer, entry" )
+        HBufC8* messageID = aMsrpSession->SendBuffer(iBuffer, _L8("text/plain"));
+        // message Id might be useful for the file sharing use case
+        delete messageID;
+        }
+        
+        iTimeoutTimer->Stop( iTimerId );
+        iTimerId = iTimeoutTimer->StartL( this, iTimeoutTimeMilliseconds );
+        
+    }
+
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::~CMccMsrpDataSender
+// -----------------------------------------------------------------------------
+//
+CMccMsrpDataSender::~CMccMsrpDataSender()
+    {
+    Cancel();
+    
+    delete iTimeoutTimer;
+	iMsgQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpDataSender::DoCancel()
+	{
+	iMsgQueue.CancelSpaceAvailable();	
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::RunL
+// -----------------------------------------------------------------------------
+//	
+void CMccMsrpDataSender::RunL()
+	{
+    iMsgQueue.Send( iBuffer );
+    iBuffer.Zero();
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpDataSender::RunError
+// -----------------------------------------------------------------------------
+//	
+TInt CMccMsrpDataSender::RunError(TInt /*aError*/)
+	{
+	return KErrNone;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CMccRtpSender::InactivityTimeout
+// -----------------------------------------------------------------------------
+//    
+void CMccMsrpDataSender::TimerExpiredL( 
+    TMccTimerId /*aTimerId*/, TAny* /*aTimerParam*/ )
+    {
+    
+/*    if ( iTimeoutTimeMilliseconds > KMccRtpSendTimeoutLongMillisecs )
+        {
+        // Timeout value is so long that if sending of one rtp packet really
+        // took so long, receiver will have big problems and it's better
+        // to drop all frames queued in order to avoid delay increase 
+        // at receiver side.
+        Clear();
+        }
+    else
+        {
+        // Sending timeout, cancel send and discard that packet
+        Cancel();
+        
+        // Do also cleanup of related packets as those are useless as this 
+        // packet is removed because of timeout
+        RemovePacket( ETrue ); 
+        
+        // Send next packet anyway
+        TRAPD( err, SendPacketL() )
+        if ( err )
+            {
+            ErrorReport( err );
+            }
+        } */
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,292 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+        
+// INCLUDE FILES
+#include "mccmsrpsink.h"
+#include "mmccinterfacedef.h"
+#include "mccmsrpsourcesinklogs.h"
+#include "mccinternalevents.h"
+#include "mccinternaldef.h"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::NewSinkL
+// -----------------------------------------------------------------------------
+//
+MDataSink* CMccMsrpSink::NewSinkL( TUid /*aImplementationUid*/, 
+                                   const TDesC8& /*aInitData*/ )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::NewSinkL" )
+    
+    CMccMsrpSink* self = new ( ELeave ) CMccMsrpSink();
+    return static_cast<MDataSink*>( self );
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::ConstructSinkL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::ConstructSinkL( const TDesC8& /*aInitData*/ )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::ConstructSinkL" )
+    iDataSender = CMccMsrpDataSender::NewL();
+    }
+    
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::CMccMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMccMsrpSink::CMccMsrpSink() : CMccDataSink( KMccMsrpSinkUid )
+    {
+    }
+        
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::~CMccMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMccMsrpSink::~CMccMsrpSink()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::~CMccMsrpSink" )
+    delete iDataSender;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkPrimeL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SinkPrimeL()
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkPrimeL" )
+
+	SendStreamEventToClient( KMccStreamPrepared );		
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkPlayL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SinkPlayL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkPlayL" )  
+    
+	if ( iPaused )
+        {
+        SendStreamEventToClient( KMccStreamResumed );
+        }
+    else
+        {
+    	SendStreamEventToClient( KMccStreamStarted );	
+        }
+		
+    iPaused = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkPauseL()
+// 
+// Pauses streaming by cancelling timers
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SinkPauseL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkPauseL" )
+    
+    iPaused = ETrue;
+	
+	SendStreamEventToClient( KMccStreamPaused );	
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkStopL()
+// 
+// Stops streaming
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SinkStopL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkStopL" )
+
+	SendStreamEventToClient( KMccStreamStopped );		
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkDataTypeCode
+// -----------------------------------------------------------------------------
+//
+TFourCC CMccMsrpSink::SinkDataTypeCode( TMediaId /*aMediaId*/ )
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkDataTypeCode" )
+
+    return iFourCC;
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SetSinkDataTypeCode
+// -----------------------------------------------------------------------------
+//
+TInt CMccMsrpSink::SetSinkDataTypeCode( TFourCC aCodec, 
+                            TMediaId /*aMediaId*/ )
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SetSinkDataTypeCode" )
+
+    iFourCC = aCodec;
+
+	return KErrNone;
+	}	
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::BufferEmptiedL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::BufferEmptiedL( CMMFBuffer* /*aBuffer*/ )
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::BufferEmptiedL" )
+    
+    User::Leave( KErrNotSupported );
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::CanCreateSinkBuffer
+// -----------------------------------------------------------------------------
+//
+TBool CMccMsrpSink::CanCreateSinkBuffer()
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::CanCreateSinkBuffer" )
+    
+	return EFalse;
+	}	
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::CreateSinkBufferL
+// -----------------------------------------------------------------------------
+//
+CMMFBuffer* CMccMsrpSink::CreateSinkBufferL( 
+	TMediaId /*aMediaId*/, 
+    TBool& /*aReference*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::CreateSinkBufferL" )
+	
+	User::Leave( KErrNotSupported );
+		
+	return NULL;	
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkThreadLogon
+// -----------------------------------------------------------------------------
+//
+TInt CMccMsrpSink::SinkThreadLogon( MAsyncEventHandler& aEventHandler )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkThreadLogon" )
+
+	iAsyncEventHandler = &aEventHandler;
+
+	return KErrNone;	
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SinkThreadLogoff
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SinkThreadLogoff()
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SinkThreadLogoff" )
+    iAsyncEventHandler = NULL;		
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::EmptyBufferL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::EmptyBufferL( CMMFBuffer* aBuffer,
+                  MDataSource* aProvider,
+                  TMediaId /*aMediaId*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::EmptyBufferL" )
+    __ASSERT_ALWAYS( aBuffer, User::Leave( KErrArgument ) );
+	__ASSERT_ALWAYS( aProvider, User::Leave( KErrArgument ) );
+	
+    CMMFDataBuffer* dataBuffer = static_cast<CMMFDataBuffer*>( aBuffer );
+	const TDesC8& data = dataBuffer->Data();	
+    iDataSender->SendL( data, iMsrpSession );
+    aProvider->BufferEmptiedL( aBuffer ); 
+	}	
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::BufferFilledL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::BufferFilledL( CMMFBuffer* /*aBuffer*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::BufferFilledL" )
+	
+	User::Leave( KErrNotSupported );
+	}	
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::BufferFilledL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSink::SetSessionParamsL( const TMccMsrpSessionParams& aParams )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SetSessionParamsL IN" )
+    
+    User::LeaveIfNull( aParams.iMsrp );
+    User::LeaveIfNull( aParams.iMsrpSession );
+    
+    iMsrp = aParams.iMsrp;
+    iMsrpSession = aParams.iMsrpSession;
+    
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SetSessionParamsL OUT" )
+    }
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::SendStreamEventToClient
+// -----------------------------------------------------------------------------
+//	
+void CMccMsrpSink::SendStreamEventToClient( 
+    const TMccEventType& aEventType, 
+    TInt aError )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SendStreamEventToClient" )
+	
+	if ( iAsyncEventHandler )
+	    {
+        TMccEvent event( 0, 
+                         0, 
+                         0, 
+                         MCC_ENDPOINT_ID( static_cast<MDataSink*>( this ) ), 
+                         KMccEventCategoryStream, 
+                         aEventType, 
+                         aError, 
+                         KNullDesC8 );
+                     
+        TMccInternalEvent internalEvent( KMccMsrpSinkUid, 
+		                                 EMccInternalEventNone,
+		                                 event );
+		                         
+		iAsyncEventHandler->SendEventToClient( internalEvent );
+	    }
+	}
+
+// End of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,373 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+        
+// INCLUDE FILES
+#include "mccmsrpsource.h"
+#include "mmccinterfacedef.h"
+#include "mccmsrpsourcesinklogs.h"
+#include "mccinternalevents.h"
+#include "mccinternaldef.h"
+#include "rtpheader.h"
+#include "formatstatemachine.h"
+
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+void CMccMsrpSource::IncomingMessage( HBufC8* aMessageContent, TInt aStatus )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::IncomingMessage" )
+    __MSRPSOURCESINK_CONTROLL_INT1( "Status : %d    ----- ", aStatus)
+    
+	TRAP_IGNORE(PlayoutMsrpPacketL(aMessageContent));
+    }
+    
+void CMccMsrpSource::IncomingReport( TInt aStatus, TInt aRangeStart,
+                                           TInt aRangeEnd, TInt aTotal )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::IncomingReport" )
+    __MSRPSOURCESINK_CONTROLL("\nReport has been received!\n");
+    __MSRPSOURCESINK_CONTROLL_INT1("Status      :", aStatus);
+    __MSRPSOURCESINK_CONTROLL_INT1("Range start :", aRangeStart);
+    __MSRPSOURCESINK_CONTROLL_INT1("Range end   :", aRangeEnd);
+    __MSRPSOURCESINK_CONTROLL_INT1("Total       :", aTotal);
+    }
+    
+void CMccMsrpSource::SendResult( TInt aStatus, const TDesC8& aMessageid )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SendResult" )
+    __MSRPSOURCESINK_CONTROLL("\nResult of send... ");
+    __MSRPSOURCESINK_CONTROLL_INT1("Status :", aStatus);
+    
+    __MSRPSOURCESINK_CONTROLL_INT1("Message ID :", aMessageid);
+    }
+    
+void CMccMsrpSource::ListenPortFailure( TInt aStatus )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::ListenPortFailure" )
+    __MSRPSOURCESINK_CONTROLL("\nListen port failure. ");
+    __MSRPSOURCESINK_CONTROLL_INT1("Status :", aStatus);
+    //CActiveScheduler::Stop();
+    }
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::NewSourceL
+// -----------------------------------------------------------------------------
+//
+MDataSource* CMccMsrpSource::NewSourceL( TUid /*aImplementationUid*/, 
+                                         const TDesC8& /*aInitData*/ )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::NewSourceL" )
+    
+    CMccMsrpSource* self = new ( ELeave ) CMccMsrpSource();
+    return static_cast<MDataSource*>( self );
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::ConstructSourceL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::ConstructSourceL( const TDesC8& /*aInitData*/ )
+    {    	
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::ConstructSourceL" )
+    }
+	    
+// -----------------------------------------------------------------------------
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CMccMsrpSource::CMccMsrpSource() : CMccDataSource( KMccMsrpSourceUid )
+    {
+    }
+        
+// -----------------------------------------------------------------------------
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CMccMsrpSource::~CMccMsrpSource()
+    {   
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::~CMccMsrpSource" )
+    
+    iFillBufferRequester = NULL;
+
+    iBufferToBeFilled = NULL;
+    iConsumer = NULL;
+    }
+
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SourcePrimeL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SourcePrimeL()
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourcePrimeL" )
+    
+    SendStreamEventToClient( KMccStreamPrepared );
+	}
+	    
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::PlayL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SourcePlayL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourcePlayL" )
+    
+    if ( iPaused )
+        {
+        SendStreamEventToClient( KMccStreamResumed );
+        }
+    else
+        {
+    	SendStreamEventToClient( KMccStreamStarted );	
+        }
+		
+    iPaused = EFalse;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::PauseL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SourcePauseL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourcePauseL" )
+    
+    iPaused = ETrue;
+    
+    SendStreamEventToClient( KMccStreamPaused );
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::StopL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SourceStopL()
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourceStopL" )
+    
+    SendStreamEventToClient( KMccStreamStopped );
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SourceDataTypeCode()
+// -----------------------------------------------------------------------------
+//
+TFourCC CMccMsrpSource::SourceDataTypeCode( TMediaId /*aMediaId*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourceDataTypeCode" )
+	
+	return iFourCC;
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SetSourceDataTypeCode()
+// -----------------------------------------------------------------------------
+//
+TInt CMccMsrpSource::SetSourceDataTypeCode( TFourCC aCodec, 
+                            TMediaId /*aMediaId*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SetSourceDataTypeCode" )
+	
+	iFourCC = aCodec;
+	return KErrNone;
+	}	
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::BufferEmptiedL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::BufferEmptiedL( CMMFBuffer* /*aBuffer*/ )
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::BufferEmptiedL" )
+    
+   	User::Leave( KErrNotSupported );
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::CanCreateSourceBuffer()
+// -----------------------------------------------------------------------------
+//
+TBool CMccMsrpSource::CanCreateSourceBuffer()
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::CanCreateSourceBuffer" )
+
+    return EFalse;
+	}	
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::CreateSourceBufferL()
+// -----------------------------------------------------------------------------
+//
+CMMFBuffer* CMccMsrpSource::CreateSourceBufferL( 
+	TMediaId /*aMediaId*/, 
+    TBool& /*aReference*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::CreateSourceBufferL" )
+
+   	User::Leave( KErrNotSupported );
+	
+	return NULL;	
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SourceThreadLogon()
+// -----------------------------------------------------------------------------
+//
+TInt CMccMsrpSource::SourceThreadLogon( MAsyncEventHandler& aEventHandler )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourceThreadLogon" )
+	
+	iAsyncEventHandler = &aEventHandler;
+	
+    return KErrNone;
+	}
+	
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SourceThreadLogoff()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SourceThreadLogoff()
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SourceThreadLogoff" )
+    
+    iAsyncEventHandler = NULL;
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::FillBufferL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::FillBufferL( 
+	CMMFBuffer* aBuffer,
+    MDataSink* aConsumer,
+    TMediaId /*aMediaId*/ )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::FillBufferL" )
+	iBufferToBeFilled = static_cast<CMMFDataBuffer*>( aBuffer );
+	iConsumer = aConsumer;
+	}	
+                  
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::NegotiateSourceL()
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::NegotiateSourceL( MDataSink& aDataSink )
+	{
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::NegotiateSourceL" )
+	iFillBufferRequester = &aDataSink;
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::SendStreamEventToClient
+// -----------------------------------------------------------------------------
+//	
+void CMccMsrpSource::SendStreamEventToClient( 
+    TMccEventType aEventType, 
+    TInt aError )
+	{
+	__MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::SendStreamEventToClient" )
+	
+	if ( iAsyncEventHandler )
+	    {
+        TMccEvent event( 0, 
+                         0, 
+                         0, 
+                         MCC_ENDPOINT_ID( static_cast<MDataSource*>( this ) ), 
+                         KMccEventCategoryStream, 
+                         aEventType, 
+                         aError, 
+                         KNullDesC8 );
+                     
+        TMccInternalEvent internalEvent( KMccMsrpSourceUid, 
+		                                 EMccInternalEventNone,
+		                                 event );
+		                         
+		iAsyncEventHandler->SendEventToClient( internalEvent );
+	    }
+	}
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSource::DataReceivedL
+// -----------------------------------------------------------------------------
+//	
+void CMccMsrpSource::DataReceivedL( const TDesC8& aData )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSource::DataReceivedL" )
+    if ( iBufferToBeFilled && iConsumer )
+        {
+        CMMFDataBuffer* buffer = static_cast<CMMFDataBuffer*>(iBufferToBeFilled);
+
+        if (buffer->Data().MaxLength() >= aData.Length())
+            {            
+            buffer->Data().Copy( aData );
+            iConsumer->BufferFilledL( iBufferToBeFilled );
+        	iBufferToBeFilled = 0;
+        	iConsumer = 0;
+      		}      		
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpSink::BufferFilledL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::SetSessionParamsL( const TMccMsrpSessionParams& aParams )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SetSessionParamsL IN" )
+    
+    User::LeaveIfNull( aParams.iMsrp );
+    User::LeaveIfNull( aParams.iMsrpSession );
+    
+    iMsrp = aParams.iMsrp;
+    iMsrpSession = aParams.iMsrpSession;
+//    iMsrpObserver = aParams.iMsrpObserver;
+    
+//    iMsrpObserver->RegisterDataObserver(*this);  
+    
+    __MSRPSOURCESINK_CONTROLL( "CMccMsrpSink::SetSessionParamsL OUT" )
+    }
+
+// End of file
+
+// -----------------------------------------------------------------------------
+// CMccRtpDataSource::PlayoutRtpPacketL
+// Pass filled buffer to the data sink of RTP data source.
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpSource::PlayoutMsrpPacketL( HBufC8* aMessageContent )
+    {
+    __MSRPSOURCESINK_CONTROLL( "CMccRtpDataSource::PlayoutRtpPacketL" )
+    __ASSERT_ALWAYS( iBufferToBeFilled, User::Leave( KErrNotReady ) );
+    __ASSERT_ALWAYS( iFillBufferRequester, User::Leave( KErrNotReady ) );
+    
+    iBufferToBeFilled->Data().Copy( *aMessageContent );
+    
+    CPayloadFormatRead* sink = static_cast<CPayloadFormatRead*>( iFillBufferRequester );
+    User::LeaveIfNull( sink );
+    
+    TRtpRecvHeader aHeaderInfo;
+    sink->DataBufferFilledL( iBufferToBeFilled, aHeaderInfo );
+    
+    delete aMessageContent;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccmsrpsourcesink/src/mccmsrpsourcesinkfactory.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides a comfort noise generator class
+*
+*/
+
+
+#include <e32base.h>
+#include <ImplementationProxy.h>
+#include "mccuids.hrh"
+#include "mccmsrpsource.h"
+#include "mccmsrpsink.h"
+
+const TImplementationProxy ImplementationTable[] = 
+    {
+        IMPLEMENTATION_PROXY_ENTRY( KImplUidMccMsrpSource, CMccMsrpSource::NewSourceL ),
+        IMPLEMENTATION_PROXY_ENTRY( KImplUidMccMsrpSink, CMccMsrpSink::NewSinkL )
+    };
+
+// -----------------------------------------------------------------------------
+// ImplementationGroupProxy()
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
+    return ImplementationTable;
+    }
+
--- a/multimediacommscontroller/mmccshared/inc/formatstatemachine.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccshared/inc/formatstatemachine.h	Mon Sep 06 17:32:13 2010 +0530
@@ -31,16 +31,18 @@
 enum TFormatEncodeState
     {
     EEncodeIdle             = 0,
-    EEmptySourceBuffer      = 1,
-    ESourceBufferEmptied    = 2
+    EWaitForSourceData      = 1,
+    EEmptySourceBuffer      = 2,
+    ESourceBufferEmptied    = 3
     };
 
 // Payload format decoding states
 enum TFormatDecodeState
     {
     EDecodeIdle         = 0,
-    ESourceDataReady    = 1,
-    EEmptyDataToSink    = 2
+    EWaitSourceData     = 1,
+    ESourceDataReady    = 2,
+    EEmptyDataToSink    = 3
     };
 
 // CLASS DECLARATION
@@ -59,6 +61,12 @@
     public:
         
         /**
+        * Fill sourcebuffer state chage
+        * @since    Series 60 3.0
+        */
+        virtual void FillSourceBufferL() = 0;
+        
+        /**
         * Fill sinkbuffer state change
         * @since    Series 60 3.0
         */
--- a/multimediacommscontroller/mmccshared/inc/mccinternaldef.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccshared/inc/mccinternaldef.h	Mon Sep 06 17:32:13 2010 +0530
@@ -62,7 +62,7 @@
 // Used to define exitence of codec which is not supported by mcc
 const TUint32 KMccFourCCUnsupported = 0x4EEEEEEE;
 
-const TInt KMccFourCCArraySize = 10;
+const TInt KMccFourCCArraySize = 15;
 
 // Use TPckgBuf<TInt> as a parameter value. Should not overlap with values from API.
 const TUint32 KMccPrerollTime = 60;
@@ -105,6 +105,7 @@
 #define IS_MCC_EVENT(a)\
 ( a.iEventType == KUidMediaTypeAudio ||\
 a.iEventType == KUidMediaTypeVideo ||\
+a.iEventType == KUidMediaTypeMessage ||\
 a.iEventType == KMccFileSinkUid ||\
 a.iEventType == KMccFileSourceUid ||\
 a.iEventType == KMccRtpSourceUid ||\
@@ -116,6 +117,8 @@
 a.iEventType == KMccMultiplexerUid ||\
 a.iEventType == KMccDtmfFormatterUid ||\
 a.iEventType == KMccAnySourceUid ||\
+a.iEventType == KMccMsrpSourceUid ||\
+a.iEventType == KMccMsrpSinkUid ||\
 a.iEventType == KMccAnySinkUid )
 
 #define MCC_STREAM_STATE_CHANGE_EVENT( aEvent )\
@@ -134,6 +137,8 @@
   aEndpointUid == KImplUidRtpDataSink ||\
   aEndpointUid == KImplUidMccVideoSource ||\
   aEndpointUid == KImplUidMccVideoSink ||\
+  aEndpointUid == KImplUidMccMsrpSink ||\
+  aEndpointUid == KImplUidMccMsrpSource ||\
   aEndpointUid == KImplUidMccAnySource ||\
   aEndpointUid == KImplUidMccAnySink )
 
@@ -216,7 +221,8 @@
     EMccTranscodeFile,
     EMccCancelTranscodeFile,
     EMccBindContextIntoStream,
-    EMccRemoveContext
+    EMccRemoveContext,
+    EMccSetRemoteMsrpPath
     };
     
 
@@ -281,7 +287,14 @@
     	    iLocalRtcpAddress( KInetAddrAny ),
             iIapId( 0 ),
             iIpTOS( 0 ),
-            iMediaSignaling( 0 )
+            iConnStatus(KNullDesC8),
+            iMediaSignaling( 0 ),
+            iLocalMsrpPath(NULL),
+            iFileName(NULL),
+            iFileSize(0),
+            iFileType(NULL),
+            iFileShare(EFalse),
+            iFTProgressNotification(EFalse)
             {}
 
         TUint32 iSessionID;
@@ -292,7 +305,14 @@
         TInetAddr iLocalRtcpAddress;
         TInt iIapId;
         TInt iIpTOS;
+        TBuf8<10>  iConnStatus;
         TInt iMediaSignaling;
+        TBuf8<150> iLocalMsrpPath;
+        TFileName iFileName;
+        TInt iFileSize;
+        TBuf8<70>  iFileType;
+        TBool iFileShare;
+        TBool iFTProgressNotification;
     };
 
 typedef TPckgBuf<TMccCreateLink> TMccCreateLinkPckg;
@@ -451,6 +471,8 @@
         TUint32 iLinkID;
         TUint32 iStreamID;
         TInetAddr iAddress;
+        TBuf8<256> iRemoteMsrpPath;
+        TBuf8<10> iConnStatus;
     };
 
 typedef TPckgBuf<TMccAddress> TMccAddressPckg;
--- a/multimediacommscontroller/mmccshared/inc/mccuids.hrh	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccshared/inc/mccuids.hrh	Mon Sep 06 17:32:13 2010 +0530
@@ -196,5 +196,22 @@
 // Plugin Interface UID 
 #define KMmfUidPluginInterfaceTranscoder  0x10282898
 
+
+// -----------------------------------------------------------------------------
+// MSRP\Message SourceSink
+// -----------------------------------------------------------------------------
+// Plugin DLL UID
+#define KDllUidMccMsrpSourceSink         0xA000EBE2
+
+// Interface Implementation UIDs
+#define KImplUidMccMsrpSource            0xA000EBE3      // MMF MDataSource interface
+#define KImplUidMccMsrpSink              0xA000EBE4      // MMF MDataSink interface
+
+#define KDllUidMsrpPayloadFormat            0x10299988
+#define KImplUidMsrpPayloadFormatDecode     0x10288888
+#define KImplUidMsrpPayloadFormatEncode     0x10289999
+
+
+
 #endif /* MCCUIDS_HRH */
 
--- a/multimediacommscontroller/mmccsubcontroller/BWINS/mmccsubcontrollerU.DEF	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/BWINS/mmccsubcontrollerU.DEF	Mon Sep 06 17:32:13 2010 +0530
@@ -1,50 +1,52 @@
-EXPORTS
-	??1CMccUlDlClient@@UAE@XZ @ 1 NONAME ; CMccUlDlClient::~CMccUlDlClient(void)
-	?BindContextIntoStreamL@CMccUlDlClient@@QAEXKKKABVTMccCryptoContext@@@Z @ 2 NONAME ; void CMccUlDlClient::BindContextIntoStreamL(unsigned long, unsigned long, unsigned long, class TMccCryptoContext const &)
-	?CloseL@CMccUlDlClient@@QAEXKK@Z @ 3 NONAME ; void CMccUlDlClient::CloseL(unsigned long, unsigned long)
-	?CloseLinkL@CMccUlDlClient@@QAEHK@Z @ 4 NONAME ; int CMccUlDlClient::CloseLinkL(unsigned long)
-	?CreateLinkL@CMccUlDlClient@@QAEXAAKH@Z @ 5 NONAME ; void CMccUlDlClient::CreateLinkL(unsigned long &, int)
-	?CreateRtpSessionL@CMccUlDlClient@@QAEXKIHH@Z @ 6 NONAME ; void CMccUlDlClient::CreateRtpSessionL(unsigned long, unsigned int, int, int)
-	?GenerateStreamId@CMccUlDlClient@@QAEKXZ @ 7 NONAME ; unsigned long CMccUlDlClient::GenerateStreamId(void)
-	?GetAudioRouteL@CMccUlDlClient@@QAEXKKAAK@Z @ 8 NONAME ; void CMccUlDlClient::GetAudioRouteL(unsigned long, unsigned long, unsigned long &)
-	?GetCodecDefaultsL@CMccUlDlClient@@SAXVTUid@@AAVTDes8@@AAVTMccCodecInfo@@@Z @ 9 NONAME ; void CMccUlDlClient::GetCodecDefaultsL(class TUid, class TDes8 &, class TMccCodecInfo &)
-	?GetCodecL@CMccUlDlClient@@QAEXKKAAVTMccCodecInfo@@@Z @ 10 NONAME ; void CMccUlDlClient::GetCodecL(unsigned long, unsigned long, class TMccCodecInfo &)
-	?GetFmtpAttrL@CMccUlDlClient@@QAEXKKAAVTDes8@@@Z @ 11 NONAME ; void CMccUlDlClient::GetFmtpAttrL(unsigned long, unsigned long, class TDes8 &)
-	?GetGainL@CMccUlDlClient@@QAEHKKAAH@Z @ 12 NONAME ; int CMccUlDlClient::GetGainL(unsigned long, unsigned long, int &)
-	?GetLocalIpAddressesL@CMccUlDlClient@@QAEXAAVTMccCreateLink@@@Z @ 13 NONAME ; void CMccUlDlClient::GetLocalIpAddressesL(class TMccCreateLink &)
-	?GetPlayBalanceL@CMccUlDlClient@@QAEHKKAAH0@Z @ 14 NONAME ; int CMccUlDlClient::GetPlayBalanceL(unsigned long, unsigned long, int &, int &)
-	?GetRecordBalanceL@CMccUlDlClient@@QAEHKKAAH0@Z @ 15 NONAME ; int CMccUlDlClient::GetRecordBalanceL(unsigned long, unsigned long, int &, int &)
-	?GetSSRCL@CMccUlDlClient@@QAEXKKAAK@Z @ 16 NONAME ; void CMccUlDlClient::GetSSRCL(unsigned long, unsigned long, unsigned long &)
-	?GetSessionId@CMccUlDlClient@@QAEKXZ @ 17 NONAME ; unsigned long CMccUlDlClient::GetSessionId(void)
-	?GetSupportedBitratesL@CMccUlDlClient@@QAEXKKAAV?$RArray@I@@@Z @ 18 NONAME ; void CMccUlDlClient::GetSupportedBitratesL(unsigned long, unsigned long, class RArray<unsigned int> &)
-	?InitializeLinkL@CMccUlDlClient@@QAEXAAVTRequestStatus@@KH@Z @ 19 NONAME ; void CMccUlDlClient::InitializeLinkL(class TRequestStatus &, unsigned long, int)
-	?MaxGainL@CMccUlDlClient@@QAEXKKAAH@Z @ 20 NONAME ; void CMccUlDlClient::MaxGainL(unsigned long, unsigned long, int &)
-	?MaxVolumeL@CMccUlDlClient@@QAEXKKAAH@Z @ 21 NONAME ; void CMccUlDlClient::MaxVolumeL(unsigned long, unsigned long, int &)
-	?NewL@CMccUlDlClient@@SAPAV1@PAVMMccEventHandler@@PAVMMccResources@@K@Z @ 22 NONAME ; class CMccUlDlClient * CMccUlDlClient::NewL(class MMccEventHandler *, class MMccResources *, unsigned long)
-	?OpenL@CMccUlDlClient@@QAEXKKHVTFourCC@@PAVMDataSource@@PAVMDataSink@@VTMMFPrioritySettings@@@Z @ 23 NONAME ; void CMccUlDlClient::OpenL(unsigned long, unsigned long, int, class TFourCC, class MDataSource *, class MDataSink *, class TMMFPrioritySettings)
-	?PauseL@CMccUlDlClient@@QAEXKKKH@Z @ 24 NONAME ; void CMccUlDlClient::PauseL(unsigned long, unsigned long, unsigned long, int)
-	?PlayL@CMccUlDlClient@@QAEXKKKHH@Z @ 25 NONAME ; void CMccUlDlClient::PlayL(unsigned long, unsigned long, unsigned long, int, int)
-	?PrepareL@CMccUlDlClient@@QAEXKKK@Z @ 26 NONAME ; void CMccUlDlClient::PrepareL(unsigned long, unsigned long, unsigned long)
-	?RemoveContextL@CMccUlDlClient@@QAEXKKK@Z @ 27 NONAME ; void CMccUlDlClient::RemoveContextL(unsigned long, unsigned long, unsigned long)
-	?ResumeL@CMccUlDlClient@@QAEXKKKH@Z @ 28 NONAME ; void CMccUlDlClient::ResumeL(unsigned long, unsigned long, unsigned long, int)
-	?SendMediaSignalL@CMccUlDlClient@@QAEXABVTMccEvent@@@Z @ 29 NONAME ; void CMccUlDlClient::SendMediaSignalL(class TMccEvent const &)
-	?SendRTCPDataL@CMccUlDlClient@@QAEXKKABVTDesC8@@@Z @ 30 NONAME ; void CMccUlDlClient::SendRTCPDataL(unsigned long, unsigned long, class TDesC8 const &)
-	?SendRTCPReceiverReportL@CMccUlDlClient@@QAEXKK@Z @ 31 NONAME ; void CMccUlDlClient::SendRTCPReceiverReportL(unsigned long, unsigned long)
-	?SendRTCPSenderReportL@CMccUlDlClient@@QAEXKK@Z @ 32 NONAME ; void CMccUlDlClient::SendRTCPSenderReportL(unsigned long, unsigned long)
-	?SetAudioRouteL@CMccUlDlClient@@QAEXKKK@Z @ 33 NONAME ; void CMccUlDlClient::SetAudioRouteL(unsigned long, unsigned long, unsigned long)
-	?SetCodecInformationL@CMccUlDlClient@@QAEXKKABVTMccCodecInfo@@ABVTDesC8@@@Z @ 34 NONAME ; void CMccUlDlClient::SetCodecInformationL(unsigned long, unsigned long, class TMccCodecInfo const &, class TDesC8 const &)
-	?SetGainL@CMccUlDlClient@@QAEHH@Z @ 35 NONAME ; int CMccUlDlClient::SetGainL(int)
-	?SetPlayBalanceL@CMccUlDlClient@@QAEXKKHH@Z @ 36 NONAME ; void CMccUlDlClient::SetPlayBalanceL(unsigned long, unsigned long, int, int)
-	?SetPriorityL@CMccUlDlClient@@QAEHKKVTMMFPrioritySettings@@@Z @ 37 NONAME ; int CMccUlDlClient::SetPriorityL(unsigned long, unsigned long, class TMMFPrioritySettings)
-	?SetRecordBalanceL@CMccUlDlClient@@QAEXKKHH@Z @ 38 NONAME ; void CMccUlDlClient::SetRecordBalanceL(unsigned long, unsigned long, int, int)
-	?SetRemoteAddressL@CMccUlDlClient@@QAEXVTInetAddr@@K@Z @ 39 NONAME ; void CMccUlDlClient::SetRemoteAddressL(class TInetAddr, unsigned long)
-	?SetVolumeL@CMccUlDlClient@@QAEHH@Z @ 40 NONAME ; int CMccUlDlClient::SetVolumeL(int)
-	?StartInactivityTimerL@CMccUlDlClient@@QAEXKKK@Z @ 41 NONAME ; void CMccUlDlClient::StartInactivityTimerL(unsigned long, unsigned long, unsigned long)
-	?StopInactivityTimerL@CMccUlDlClient@@QAEXKK@Z @ 42 NONAME ; void CMccUlDlClient::StopInactivityTimerL(unsigned long, unsigned long)
-	?StopL@CMccUlDlClient@@QAEXKKK@Z @ 43 NONAME ; void CMccUlDlClient::StopL(unsigned long, unsigned long, unsigned long)
-	?StreamsExistsL@CMccUlDlClient@@QAEHK@Z @ 44 NONAME ; int CMccUlDlClient::StreamsExistsL(unsigned long)
-	?UnuseL@CMccUlDlClient@@QAEXKK@Z @ 45 NONAME ; void CMccUlDlClient::UnuseL(unsigned long, unsigned long)
-	?GetParameterL@@YAXKKKKAAVTDesC8@@@Z @ 46 NONAME ; void GetParameterL(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 &)
-	?SetParameterL@CMccUlDlClient@@QAEXKKKKABVTDesC8@@@Z @ 47 NONAME ; void CMccUlDlClient::SetParameterL(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
-	?SetRemoteRtcpAddrL@CMccUlDlClient@@QAEXVTInetAddr@@K@Z @ 48 NONAME ; void CMccUlDlClient::SetRemoteRtcpAddrL(class TInetAddr, unsigned long)
-
+EXPORTS
+	??1CMccUlDlClient@@UAE@XZ @ 1 NONAME ; CMccUlDlClient::~CMccUlDlClient(void)
+	?BindContextIntoStreamL@CMccUlDlClient@@QAEXKKKABVTMccCryptoContext@@@Z @ 2 NONAME ; void CMccUlDlClient::BindContextIntoStreamL(unsigned long, unsigned long, unsigned long, class TMccCryptoContext const &)
+	?CloseL@CMccUlDlClient@@QAEXKK@Z @ 3 NONAME ; void CMccUlDlClient::CloseL(unsigned long, unsigned long)
+	?CloseLinkL@CMccUlDlClient@@QAEHK@Z @ 4 NONAME ; int CMccUlDlClient::CloseLinkL(unsigned long)
+	?CreateLinkL@CMccUlDlClient@@QAEXAAKH@Z @ 5 NONAME ; void CMccUlDlClient::CreateLinkL(unsigned long &, int)
+	?CreateRtpSessionL@CMccUlDlClient@@QAEXKIHH@Z @ 6 NONAME ; void CMccUlDlClient::CreateRtpSessionL(unsigned long, unsigned int, int, int)
+	?GenerateStreamId@CMccUlDlClient@@QAEKXZ @ 7 NONAME ; unsigned long CMccUlDlClient::GenerateStreamId(void)
+	?GetAudioRouteL@CMccUlDlClient@@QAEXKKAAK@Z @ 8 NONAME ; void CMccUlDlClient::GetAudioRouteL(unsigned long, unsigned long, unsigned long &)
+	?GetCodecDefaultsL@CMccUlDlClient@@SAXVTUid@@AAVTDes8@@AAVTMccCodecInfo@@@Z @ 9 NONAME ; void CMccUlDlClient::GetCodecDefaultsL(class TUid, class TDes8 &, class TMccCodecInfo &)
+	?GetCodecL@CMccUlDlClient@@QAEXKKAAVTMccCodecInfo@@@Z @ 10 NONAME ; void CMccUlDlClient::GetCodecL(unsigned long, unsigned long, class TMccCodecInfo &)
+	?GetFmtpAttrL@CMccUlDlClient@@QAEXKKAAVTDes8@@@Z @ 11 NONAME ; void CMccUlDlClient::GetFmtpAttrL(unsigned long, unsigned long, class TDes8 &)
+	?GetGainL@CMccUlDlClient@@QAEHKKAAH@Z @ 12 NONAME ; int CMccUlDlClient::GetGainL(unsigned long, unsigned long, int &)
+	?GetLocalIpAddressesL@CMccUlDlClient@@QAEXAAVTMccCreateLink@@@Z @ 13 NONAME ; void CMccUlDlClient::GetLocalIpAddressesL(class TMccCreateLink &)
+	?GetPlayBalanceL@CMccUlDlClient@@QAEHKKAAH0@Z @ 14 NONAME ; int CMccUlDlClient::GetPlayBalanceL(unsigned long, unsigned long, int &, int &)
+	?GetRecordBalanceL@CMccUlDlClient@@QAEHKKAAH0@Z @ 15 NONAME ; int CMccUlDlClient::GetRecordBalanceL(unsigned long, unsigned long, int &, int &)
+	?GetSSRCL@CMccUlDlClient@@QAEXKKAAK@Z @ 16 NONAME ; void CMccUlDlClient::GetSSRCL(unsigned long, unsigned long, unsigned long &)
+	?GetSessionId@CMccUlDlClient@@QAEKXZ @ 17 NONAME ; unsigned long CMccUlDlClient::GetSessionId(void)
+	?GetSupportedBitratesL@CMccUlDlClient@@QAEXKKAAV?$RArray@I@@@Z @ 18 NONAME ; void CMccUlDlClient::GetSupportedBitratesL(unsigned long, unsigned long, class RArray<unsigned int> &)
+	?InitializeLinkL@CMccUlDlClient@@QAEXAAVTRequestStatus@@KH@Z @ 19 NONAME ; void CMccUlDlClient::InitializeLinkL(class TRequestStatus &, unsigned long, int)
+	?MaxGainL@CMccUlDlClient@@QAEXKKAAH@Z @ 20 NONAME ; void CMccUlDlClient::MaxGainL(unsigned long, unsigned long, int &)
+	?MaxVolumeL@CMccUlDlClient@@QAEXKKAAH@Z @ 21 NONAME ; void CMccUlDlClient::MaxVolumeL(unsigned long, unsigned long, int &)
+	?NewL@CMccUlDlClient@@SAPAV1@PAVMMccEventHandler@@PAVMMccResources@@K@Z @ 22 NONAME ; class CMccUlDlClient * CMccUlDlClient::NewL(class MMccEventHandler *, class MMccResources *, unsigned long)
+	?OpenL@CMccUlDlClient@@QAEXKKHVTFourCC@@PAVMDataSource@@PAVMDataSink@@VTMMFPrioritySettings@@@Z @ 23 NONAME ; void CMccUlDlClient::OpenL(unsigned long, unsigned long, int, class TFourCC, class MDataSource *, class MDataSink *, class TMMFPrioritySettings)
+	?PauseL@CMccUlDlClient@@QAEXKKKH@Z @ 24 NONAME ; void CMccUlDlClient::PauseL(unsigned long, unsigned long, unsigned long, int)
+	?PlayL@CMccUlDlClient@@QAEXKKKHH@Z @ 25 NONAME ; void CMccUlDlClient::PlayL(unsigned long, unsigned long, unsigned long, int, int)
+	?PrepareL@CMccUlDlClient@@QAEXKKK@Z @ 26 NONAME ; void CMccUlDlClient::PrepareL(unsigned long, unsigned long, unsigned long)
+	?RemoveContextL@CMccUlDlClient@@QAEXKKK@Z @ 27 NONAME ; void CMccUlDlClient::RemoveContextL(unsigned long, unsigned long, unsigned long)
+	?ResumeL@CMccUlDlClient@@QAEXKKKH@Z @ 28 NONAME ; void CMccUlDlClient::ResumeL(unsigned long, unsigned long, unsigned long, int)
+	?SendMediaSignalL@CMccUlDlClient@@QAEXABVTMccEvent@@@Z @ 29 NONAME ; void CMccUlDlClient::SendMediaSignalL(class TMccEvent const &)
+	?SendRTCPDataL@CMccUlDlClient@@QAEXKKABVTDesC8@@@Z @ 30 NONAME ; void CMccUlDlClient::SendRTCPDataL(unsigned long, unsigned long, class TDesC8 const &)
+	?SendRTCPReceiverReportL@CMccUlDlClient@@QAEXKK@Z @ 31 NONAME ; void CMccUlDlClient::SendRTCPReceiverReportL(unsigned long, unsigned long)
+	?SendRTCPSenderReportL@CMccUlDlClient@@QAEXKK@Z @ 32 NONAME ; void CMccUlDlClient::SendRTCPSenderReportL(unsigned long, unsigned long)
+	?SetAudioRouteL@CMccUlDlClient@@QAEXKKK@Z @ 33 NONAME ; void CMccUlDlClient::SetAudioRouteL(unsigned long, unsigned long, unsigned long)
+	?SetCodecInformationL@CMccUlDlClient@@QAEXKKABVTMccCodecInfo@@ABVTDesC8@@@Z @ 34 NONAME ; void CMccUlDlClient::SetCodecInformationL(unsigned long, unsigned long, class TMccCodecInfo const &, class TDesC8 const &)
+	?SetGainL@CMccUlDlClient@@QAEHH@Z @ 35 NONAME ; int CMccUlDlClient::SetGainL(int)
+	?SetPlayBalanceL@CMccUlDlClient@@QAEXKKHH@Z @ 36 NONAME ; void CMccUlDlClient::SetPlayBalanceL(unsigned long, unsigned long, int, int)
+	?SetPriorityL@CMccUlDlClient@@QAEHKKVTMMFPrioritySettings@@@Z @ 37 NONAME ; int CMccUlDlClient::SetPriorityL(unsigned long, unsigned long, class TMMFPrioritySettings)
+	?SetRecordBalanceL@CMccUlDlClient@@QAEXKKHH@Z @ 38 NONAME ; void CMccUlDlClient::SetRecordBalanceL(unsigned long, unsigned long, int, int)
+	?SetRemoteAddressL@CMccUlDlClient@@QAEXVTInetAddr@@K@Z @ 39 NONAME ; void CMccUlDlClient::SetRemoteAddressL(class TInetAddr, unsigned long)
+	?SetVolumeL@CMccUlDlClient@@QAEHH@Z @ 40 NONAME ; int CMccUlDlClient::SetVolumeL(int)
+	?StartInactivityTimerL@CMccUlDlClient@@QAEXKKK@Z @ 41 NONAME ; void CMccUlDlClient::StartInactivityTimerL(unsigned long, unsigned long, unsigned long)
+	?StopInactivityTimerL@CMccUlDlClient@@QAEXKK@Z @ 42 NONAME ; void CMccUlDlClient::StopInactivityTimerL(unsigned long, unsigned long)
+	?StopL@CMccUlDlClient@@QAEXKKK@Z @ 43 NONAME ; void CMccUlDlClient::StopL(unsigned long, unsigned long, unsigned long)
+	?StreamsExistsL@CMccUlDlClient@@QAEHK@Z @ 44 NONAME ; int CMccUlDlClient::StreamsExistsL(unsigned long)
+	?UnuseL@CMccUlDlClient@@QAEXKK@Z @ 45 NONAME ; void CMccUlDlClient::UnuseL(unsigned long, unsigned long)
+	?GetParameterL@@YAXKKKKAAVTDesC8@@@Z @ 46 NONAME ; void GetParameterL(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 &)
+	?SetParameterL@CMccUlDlClient@@QAEXKKKKABVTDesC8@@@Z @ 47 NONAME ; void CMccUlDlClient::SetParameterL(unsigned long, unsigned long, unsigned long, unsigned long, class TDesC8 const &)
+	?SetRemoteRtcpAddrL@CMccUlDlClient@@QAEXVTInetAddr@@K@Z @ 48 NONAME ; void CMccUlDlClient::SetRemoteRtcpAddrL(class TInetAddr, unsigned long)
+	?InitializeLinkL@CMccUlDlClient@@QAEXAAVTRequestStatus@@KHAAPAVHBufC8@@@Z @ 49 NONAME ; void CMccUlDlClient::InitializeLinkL(class TRequestStatus &, unsigned long, int, class HBufC8 * &)
+	?SetRemoteMsrpPathL@CMccUlDlClient@@QAEXAAVTDes8@@0K@Z @ 50 NONAME ; void CMccUlDlClient::SetRemoteMsrpPathL(class TDes8 &, class TDes8 &, unsigned long)
+
--- a/multimediacommscontroller/mmccsubcontroller/group/subcontroller.mmp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/group/subcontroller.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -38,6 +38,7 @@
 SOURCE          mccqoshandler.cpp
 SOURCE          mccqossockethandler.cpp
 SOURCE          mccqoseventmonitor.cpp
+SOURCE          mccmsrpmanager.cpp
 SOURCE          mccrtpmanager.cpp
 SOURCE          mccsymstreambase.cpp
 SOURCE          mccsymdlstream.cpp
@@ -51,6 +52,7 @@
 SOURCE          mccrtpmediaclock.cpp
 SOURCE          mccdtmfdlstream.cpp
 SOURCE          mccdtmfulstream.cpp
+SOURCE			msrpcallbackmgrobserver.cpp
 
 USERINCLUDE     ../inc
 USERINCLUDE     ../../mmccshared/inc
@@ -65,12 +67,14 @@
 USERINCLUDE     ../../mmccinterface/inc
 USERINCLUDE     ../../mmcccontroller/inc
 USERINCLUDE     ../../mmccrtpsourcesink/inc
+USERINCLUDE     ../../mmccmsrpsourcesink/inc
 USERINCLUDE     ../../mmccvideosourcesink/inc
 USERINCLUDE     ../../mmccfilesourcesink/inc
 USERINCLUDE     ../../mmccmultiplexer/inc
 USERINCLUDE     ../../mmccredpayloadformat/inc
 
 MW_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE	epoc32/include/platform/mw
 
 LIBRARY     euser.lib
 LIBRARY     mmfcontrollerframework.lib
@@ -92,9 +96,11 @@
 LIBRARY     IlbcDecoderIntfc.lib
 LIBRARY     IlbcEncoderIntfc.lib
 LIBRARY     srtp.lib
+LIBRARY     msrpclient.lib
 // Other MCC libraries
 LIBRARY     mmccjitterbuffer.lib
 LIBRARY     mmccmultiplexer.lib
+LIBRARY     inetprotutil.lib
 
 PAGED
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccinternalcodecs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,636 @@
+/*
+* 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:    Provides DTMF support
+*
+*/
+
+
+#ifndef MCCINTERNALCODECS_H
+#define MCCINTERNALCODECS_H
+
+//  INCLUDES
+#include <mmf\common\mmfutilities.h>
+#include <mmf\common\mmffourcc.h>
+#include <mmf\common\mmfbase.h>
+#include <in_sock.h>
+#include "mmcccodecinformation.h"
+#include "mmccnetworksettings.h"
+
+// CONSTANTS
+
+// Internal value for Mcc codec information in order to catch undefined values
+const TUint KMccCodecParamUndefined = 0;
+// Internal value for undefined payload type as max payload type is 127 (7-bit value)
+// and values 0-127 are used for different payload types. Naturally then value 128 is
+// then a good value for payload type.
+const TUint8 KMccPayloadTypeMax = 128;
+
+// Default ports for RTP & RTCP
+//const TUint KMDefaultRtpPort = 5000;
+//const TUint KDefaultRtcpPort = 5001;
+
+// Default jitter buffer size in milliseconds
+const TUint KDefautJitterBufferSize = 200;
+
+// Number of AMR bitrates supported
+const TUint KAmrBitratesSupported = 8;
+
+// Number of G.711 bitrates supported
+const TUint KG711BitratesSupported = 1;
+
+// Number of iLBC bitrates supported
+const TUint KIlbcBitratesSupported = 2;
+
+// Number of G.729 bitrates supported
+const TUint KG729BitratesSupported = 1;
+
+// AMR BITRATES
+const TUint KAmrBitrates[KAmrBitratesSupported] = 
+    { 
+    4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200  
+    };
+
+// G.711 BITRATES
+const TUint KG711Bitrates[KG711BitratesSupported] = 
+    { 
+    64000 
+    };
+
+// iLBC BITRATES (Can also tell the codec mode for iLBC (20ms, 30ms)
+const TUint KIlbcBitrates[KIlbcBitratesSupported] = 
+    { 
+    13330, 15200 
+    };
+    
+// G.729 BITRATES
+const TUint KG729Bitrates[KG729BitratesSupported] = 
+    {
+    8000
+    };
+
+// Generic nothing mode
+const TUint KMccCodecModeNone = 1;
+
+// G.711 Codec modes as it uses one FourCC
+const TUint KG711ModeaLawEnc = 2;
+const TUint KG711ModeuLawEnc = 3;
+
+// AMR Codec modes
+const TUint KAmrCodecModeBandwidthEfficient = 4;
+const TUint KAmrCodecModeOctetAlign = 5;
+
+// DTMF Modes
+const TUint KDtmfModeEvent = 6;
+const TUint KDtmfModeTone = 7;
+const TUint KDtmfModeRedEvents = 8;
+
+// iLBC codec modes
+const TUint KIlbcMode20msFrame = 9;
+const TUint KIlbcMode30msFrame = 10;
+
+// NALU constants
+const TInt KMccNaluStartCodeLen = 3;
+const TInt KMccNaluEndCodeLen = 2;
+
+// MACROS
+
+// DATA TYPES
+
+// FUNCTION PROTOTYPES
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+*  Mcc Codec information for Mcc internal use
+*
+*  @lib N/A
+*  @since Series 60 3.0
+*/
+
+class TMccCodecInfo
+    {
+    public: // Constructors
+        
+        /**
+        * Default constructor
+        */
+        inline TMccCodecInfo() : 
+        				iType(TUid()),
+                        iFourCC( TFourCC() ),
+                        iPayloadFormatEncoder( 0 ),
+                        iPayloadFormatDecoder( 0 ),                         
+                        iBitrate( KMccCodecParamUndefined ),
+                        iSamplingFreq( 0 ), 
+                        iEnableDTX( EFalse ),
+                        iCodecMode( KMccCodecParamUndefined ), 
+                        iAlgoUsed( ENoAlgoUsed ),
+                        iPtime( KMccCodecParamUndefined ), 
+                        iMaxPtime( KMccCodecParamUndefined ),
+                        iPayloadType( KMccPayloadTypeMax ), 
+                        iRedundantPayload( KMccPayloadTypeMax ),
+                        iRedundancyCount( static_cast<TUint8>( KMccCodecParamUndefined ) ),
+                        iHwFrameTime( 0 ), 
+                        iFrameSize( 0 ), 
+                        iCNFrameSize( 0 ),
+                        iFmtpLength( 0 ),
+                        iJitterSize( 0 ),
+                        iNeighbor( EFalse ),
+                        iModeChangePeriod( 1 ),
+                        iJitterBufInactivityTimeOut( 0 ),
+                        iJitterBufPlayToneTimeout( 0 ),
+                        iJitterBufPlayToneFrequency( 0 ),
+                        iJitterBufPlayToneDuration( 0 ),
+                        iJitterBufThreshold( 0 ),
+                        iJitterBufBufferLength( 0 ),
+                        iComfortNoiseGenerationPt( KPayloadTypeUndefined ),
+                        iBitrateMask( 0 ),
+						iAverageBitrate( 0 ),
+						iMaxBitrate( 0 ),
+						iFramerate( 0 ),
+					    iVideoWidth( 0 ),
+					    iVideoHeight( 0 ),
+					    iMTUSize( 1400 ),
+                        iSessionID( 0 ),
+                        iLinkID( 0 ),
+                        iStreamID( 0 ),
+                        iKeepaliveInterval( 0 ),
+                        iKeepalivePT( 0 ),
+                        iKeepaliveData( KNullDesC8 ),
+                        iIsUpdate(0),
+                        iMaxRed( -1 ),
+                        iSourceDefinedTimeStamps( EFalse ),
+                        iConfigKey( KNullDesC8 ),
+                        iEncodingDecodingDevice( KNullUid )
+            {   };
+
+        /**
+        * Copy constructor
+        */
+        inline TMccCodecInfo( const TMccCodecInfo& aCodec ) : 
+                    iType( aCodec.iType ),         
+                    iSdpName( aCodec.iSdpName ),         
+                    iFourCC( aCodec.iFourCC ), 
+                    iPayloadFormatEncoder( aCodec.iPayloadFormatEncoder ),
+                    iPayloadFormatDecoder( aCodec.iPayloadFormatDecoder ),                         
+                    iBitrate( aCodec.iBitrate ),
+                    iSamplingFreq( aCodec.iSamplingFreq ), 
+                    iEnableDTX( aCodec.iEnableDTX ), 
+                    iCodecMode( aCodec.iCodecMode ),
+                    iAlgoUsed( aCodec.iAlgoUsed ), 
+                    iPtime( aCodec.iPtime ),
+                    iMaxPtime( aCodec.iMaxPtime ), 
+                    iPayloadType( aCodec.iPayloadType ),
+                    iRedundantPayload( aCodec.iRedundantPayload ), 
+                    iRedundancyCount( aCodec.iRedundancyCount ),
+                    iHwFrameTime( aCodec.iHwFrameTime ),
+                    iFrameSize( aCodec.iFrameSize ), 
+                    iCNFrameSize( aCodec.iCNFrameSize ),
+                    iFmtpLength( aCodec.iFmtpLength ),
+                    iJitterSize( aCodec.iJitterSize ),
+                    iNeighbor( aCodec.iNeighbor ),
+                    iModeChangePeriod( aCodec.iModeChangePeriod ),
+                    iJitterBufInactivityTimeOut( aCodec.iJitterBufInactivityTimeOut ),
+                    iJitterBufPlayToneTimeout( aCodec.iJitterBufPlayToneTimeout ),
+                    iJitterBufPlayToneFrequency( aCodec.iJitterBufPlayToneFrequency ),
+                    iJitterBufPlayToneDuration( aCodec.iJitterBufPlayToneDuration ),
+                    iJitterBufThreshold( aCodec.iJitterBufThreshold ),
+                    iJitterBufBufferLength( aCodec.iJitterBufBufferLength ),
+                    iComfortNoiseGenerationPt( aCodec.iComfortNoiseGenerationPt ),
+                    iBitrateMask( aCodec.iBitrateMask ),
+					iAverageBitrate( aCodec.iAverageBitrate ),
+					iMaxBitrate( aCodec.iMaxBitrate ),
+					iFramerate( aCodec.iFramerate ),
+					iVideoWidth( aCodec.iVideoWidth ),
+					iVideoHeight( aCodec.iVideoHeight ),
+					iMTUSize( aCodec.iMTUSize ),
+                    iSessionID( aCodec.iSessionID ),
+                    iLinkID( aCodec.iLinkID ),
+                    iStreamID( aCodec.iStreamID ),
+                    iPriority( aCodec.iPriority ),
+                    iKeepaliveInterval( aCodec.iKeepaliveInterval ),
+                    iKeepalivePT( aCodec.iKeepalivePT ),
+                    iKeepaliveData( aCodec.iKeepaliveData ),
+                    iIsUpdate( aCodec.iIsUpdate ),
+                    iMaxRed( aCodec.iMaxRed ),
+                    iSourceDefinedTimeStamps( aCodec.iSourceDefinedTimeStamps ),
+                    iConfigKey( aCodec.iConfigKey ),
+                    iEncodingDecodingDevice( aCodec.iEncodingDecodingDevice )
+                    
+            {   };
+
+    public: // Functions
+    
+        /**
+        * Helper method for checking the codecinfo parameters
+        * @since Series 60 3.0
+        * @param aCodec Codec which to check
+        * @return KErrNotReady or KErrNone
+        */
+        static inline TInt CheckCodecInfo( const TMccCodecInfo& /*aCodec*/ )
+            {
+            // And different codec bitrate/mode combinations should be checked also
+            /*
+            if(  aCodec.iFourCC == KMMFFourCCCodeNULL)
+                {
+                return KErrNotReady;
+                }
+            else if( KMccCodecParamUndefined == aCodec.iBitrate )
+                {
+                return KErrNotReady-1;
+                }
+            else if( KMccCodecParamUndefined == aCodec.iPtime )
+                {
+                return KErrNotReady-2;
+                }
+            else if( KMccCodecParamUndefined == aCodec.iMaxPtime )
+                {
+                return KErrNotReady-3;
+                }
+            else if( KMccPayloadTypeMax <= aCodec.iPayloadType )
+                {
+                return KErrNotReady-4;
+                }
+            else
+                {
+                return KErrNone;
+                }
+            */
+            // Need to reimplement this as this is not a good function
+            return KErrNone;
+            };
+            
+        /**
+        * Function for comparing two codec info objects
+        * @since Series 60 3.0
+        * @param aCodec1 Codecinfo 1 to compare
+        * @param aCodec2 Codecinfo 2 to compare
+        * @return TBool ETrue if aCodec1 and aCodec2 match
+        */
+        static inline TBool Compare( const TMccCodecInfo& aCodec1, 
+                const TMccCodecInfo& aCodec2 )
+            {
+            if( aCodec1.iFourCC == aCodec2.iFourCC &&
+                aCodec1.iBitrate == aCodec2.iBitrate && 
+                aCodec1.iSamplingFreq == aCodec2.iSamplingFreq &&
+                aCodec1.iVideoHeight == aCodec2.iVideoHeight &&
+                aCodec1.iVideoWidth == aCodec2.iVideoWidth &&
+                aCodec1.iFramerate == aCodec2.iFramerate &&
+                aCodec1.iEnableDTX == aCodec2.iEnableDTX && 
+                aCodec1.iCodecMode == aCodec2.iCodecMode && 
+                aCodec1.iAlgoUsed == aCodec2.iAlgoUsed && 
+                aCodec1.iPtime == aCodec2.iPtime && 
+                aCodec1.iMaxPtime == aCodec2.iMaxPtime && 
+                aCodec1.iPayloadType == aCodec2.iPayloadType && 
+                aCodec1.iRedundantPayload == aCodec2.iRedundantPayload && 
+                aCodec1.iRedundancyCount == aCodec2.iRedundancyCount && 
+                aCodec1.iHwFrameTime == aCodec2.iHwFrameTime && 
+                aCodec1.iFrameSize == aCodec2.iFrameSize && 
+                aCodec1.iCNFrameSize == aCodec2.iCNFrameSize && 
+                aCodec1.iJitterSize == aCodec2.iJitterSize &&
+                aCodec1.iPriority.iPriority == aCodec2.iPriority.iPriority &&
+                aCodec1.iPriority.iPref == aCodec2.iPriority.iPref &&
+                aCodec1.iKeepaliveInterval == aCodec2.iKeepaliveInterval &&
+                aCodec1.iKeepalivePT == aCodec2.iKeepalivePT &&
+                aCodec1.iKeepaliveData == aCodec2.iKeepaliveData &&
+                aCodec1.iSourceDefinedTimeStamps == aCodec2.iSourceDefinedTimeStamps &&
+                aCodec1.iConfigKey == aCodec2.iConfigKey &&
+                aCodec1.iEncodingDecodingDevice == aCodec2.iEncodingDecodingDevice )
+                {
+                return ETrue;
+                }
+            else
+                {
+                return EFalse;
+                }
+            };
+            
+        static TBool IsAvcPpsOrSpsData( const TDesC8& aBuffer, TBool aIgnoreStartCode = EFalse )
+            {
+            TBool isPpsOrSps( EFalse );
+            const TUint8 KMccAvcTypeMask = 0x1F;
+            const TUint8 KMccAvcTypePps = 0x7;
+            const TUint8 KMccAvcTypeSps = 0x8;
+            
+            TInt bufferIndex( 0 );
+            TInt index( KErrNotFound );
+            if ( aIgnoreStartCode )
+                {
+                index = aBuffer.Length() > 0 ? 0 : KErrNotFound;
+                }
+            else
+                {
+                index = FindAvcNaluStart( bufferIndex, aBuffer );
+                }
+            
+            if ( index != KErrNotFound )
+                {
+                TUint8 typeInfo = aBuffer[ index ];
+                isPpsOrSps = ( ( typeInfo & KMccAvcTypeMask ) == KMccAvcTypePps ||
+                               ( typeInfo & KMccAvcTypeMask ) == KMccAvcTypeSps );
+                }
+            return isPpsOrSps;
+            };
+        
+        /**
+        * This function finds a NALU's starting byte by detecting unique start code
+        * occurring in the buffer, as specified in sec B.2 of H264 specs.
+        * NOTE: 4-byte start code 0x00000001 is a special case of 3-byte code, 
+        * automatically catered in the logic
+        *
+        * @param aBufferIndex, search start index, on return contains information
+        * of how for buffer was searched
+        * @param aBuffer
+        * @return KErrNotFound if nalu start code is not found, otherwise index
+        *         to beginning of end code.
+        */     
+        static TInt FindAvcNaluStart( TInt& aBufferIndex, const TDesC8& aBuffer )
+            {
+        	TUint8 a1, a2, a3;
+	
+        	if ( aBufferIndex < 0 )
+        	    {
+        		return KErrNotFound;
+        	    }
+        	
+        	const TUint8 *origDataPtr = aBuffer.Ptr();
+        	const TUint8 *dataPtr = origDataPtr;
+        	TInt size( aBuffer.Size() );
+        	while ( aBufferIndex+KMccNaluStartCodeLen < size )	// at least one byte after start code
+        	    {
+        	    dataPtr = ( origDataPtr + aBufferIndex );
+        		a1 = *dataPtr;
+        		dataPtr++;
+        		a2 = *dataPtr;
+        		dataPtr++;
+        		a3 = *dataPtr;
+        		
+        		if ( a1 == 0x00 && a2 == 0x00 && a3 == 0x01 )
+        		    {
+        			aBufferIndex += KMccNaluStartCodeLen;
+        			return aBufferIndex;
+        		    }
+        		
+        		aBufferIndex++;
+        	    }
+        	
+        	return KErrNotFound;
+            };
+        
+        /**
+        * This function returns location of first byte at the end of  NALU
+        * by detecting unique end pattern, as specified in sec B.2 of H264 specs.
+        *
+        * @param aBufferIndex, search start index, on return contains information
+        * of how for buffer was searched
+        * @param aBuffer
+        * @return index to end beginning of end code or last index of aBuffer if
+        *         end code is not found
+        */    
+        static TInt FindAvcNaluEnd( TInt& aBufferIndex, const TDesC8& aBuffer )
+            {
+        	TUint8 a1, a2, a3;
+        	
+        	if ( ( aBufferIndex < 0 ) || ( aBufferIndex >= aBuffer.Size() ) )
+        	    {
+        		return KErrNotFound;
+        	    }
+        	
+        	const TUint8 *origDataPtr = aBuffer.Ptr();
+        	const TUint8 *dataPtr = origDataPtr;
+        	TInt size( aBuffer.Size() );	
+        	while ( aBufferIndex < size )
+            	{
+        		if ( aBufferIndex+KMccNaluEndCodeLen < size )
+        		    {
+        		    dataPtr = ( origDataPtr + aBufferIndex );
+        			a1 = *dataPtr;
+        			dataPtr++;
+            		a2 = *dataPtr;
+            		dataPtr++;
+            		a3 = *dataPtr;
+        			
+        			if( ( a1 == 0x00 && a2 == 0x00 && a3 == 0x01 ) ||
+        				( a1 == 0x00 && a2 == 0x00 && a3 == 0x00 ) )
+        			    {
+        				return aBufferIndex;
+        		    	}
+        	    	}
+        		aBufferIndex++;
+        	    }
+        	
+        	return aBufferIndex;
+            };
+        
+    public: // Data
+    
+    	TUid iType;
+    	
+        /**
+        * Sdp name used in SDP messages
+        */
+        TBuf8<KMaxSdpNameLength> iSdpName;        
+    	
+        // MMF FourCC code of the codec
+        TFourCC iFourCC;
+
+        // MMF format encoder for the codec
+        TUint32 iPayloadFormatEncoder;
+
+        // MMF format decoder for the codec
+        TUint32 iPayloadFormatDecoder;
+        
+        // Codec bitrate
+        TUint iBitrate;
+        
+        // sampling rate
+        TUint32 iSamplingFreq;
+        
+        // Should DTX/VAD/CNG be enabled
+        TBool iEnableDTX;
+        
+        // Codec mode
+        TUint iCodecMode;
+        
+        // Algorithm used
+        TUint iAlgoUsed;
+        
+        // Minimum packet time for codec
+        TUint iPtime;
+        
+        // Maximum packet time for codec
+        TUint iMaxPtime;
+        
+        // RTP Payload type for the codec
+        TUint8 iPayloadType;
+        
+        // RTP payload type for redundant audio
+        TUint8 iRedundantPayload;
+        
+        // Number of redundant frames if enabled
+        TUint8 iRedundancyCount;
+        
+        // Frametime
+        TUint8 iHwFrameTime;
+        
+        // Frame size
+        TUint iFrameSize;
+        
+        // CN Frame size
+        TUint8 iCNFrameSize;
+        
+        //Fmtp size
+        TInt iFmtpLength;
+        
+        // Jitter buffer size
+        TUint iJitterSize;
+
+        // Mode change neighbor
+        TBool iNeighbor;
+        
+        // Mode change period
+        TUint iModeChangePeriod;
+        
+        //JitterBuffer InactivityTimeOut
+        TUint iJitterBufInactivityTimeOut;
+
+        //JitterBuffer tone TimeOut
+        TUint iJitterBufPlayToneTimeout; 
+        
+        //JitterBuffer tone frequecy
+        TUint iJitterBufPlayToneFrequency; 
+        
+        //JitterBuffer tone duration
+        TUint iJitterBufPlayToneDuration;
+        
+        //JitterBuffer threshold
+        TUint iJitterBufThreshold;
+        
+        //JitterBuffer buffer length
+        TUint iJitterBufBufferLength;
+        
+        /**
+         * Comfort noise generation payload type .
+         * Disabled if KPayloadTypeUndefined.
+         */
+        TUint8 iComfortNoiseGenerationPt;
+    
+        //Bitrates used in codec
+        TUint iBitrateMask;
+    
+        //Average bitrate used in codec
+		TUint iAverageBitrate;
+				
+        //Max bitrate used in codec
+		TUint iMaxBitrate;
+		
+        //Frame rate for video
+		TReal iFramerate;
+
+	    // Horizontal resolution of video
+	    TUint iVideoWidth;
+
+	    // Vertical resolution of video
+	    TUint iVideoHeight;
+	    
+	    // Network MTU size (in order to determine outgoing packet's maximum size, if needed) default: 1400
+	    TUint iMTUSize;
+    
+        // Session ID
+        TUint32 iSessionID;
+        
+        // Link ID
+        TUint32 iLinkID;
+
+        // Stream ID
+        TUint32 iStreamID;
+        
+        // MMF Priority settings
+        TMMFPrioritySettings iPriority;       
+        
+        // Rtp keepalive interval (secs)
+        TUint8 iKeepaliveInterval;
+    
+        // Rtp keepalive payload type
+        TUint8 iKeepalivePT;
+    
+        // Rtp keepalive data
+        TBuf8<KMaxKeepAliveDataLen> iKeepaliveData;
+        
+        // Indicates if update param set
+        TBool iIsUpdate;
+        
+        /**
+         * Maximum redundancy in milliseconds
+         */ 
+        TInt iMaxRed;
+
+        // Trust timestamps provided by datasource
+        TBool iSourceDefinedTimeStamps;
+        
+        // Rtp keepalive data
+        TBuf8<KMaxConfigKeyLen> iConfigKey;
+        
+        TUid iEncodingDecodingDevice;
+    };
+
+typedef TPckgBuf<TMccCodecInfo> TMccCodecInfoBuffer;
+
+/**
+* Mcc Stream settings for Mcc internal use
+* 
+* @lib N/A
+* @since Series 60 3.0
+*/
+class TMccStreamSettings
+    {
+    public: // Constructors
+        
+        /**
+        * Default constructor
+        */
+        inline TMccStreamSettings() : iRemoteAddress( KInetAddrAny ), 
+            iLocalRtpPort( KDefaultRtpPort ), iLocalRtcpPort( KDefaultRtcpPort ),
+            iPriority( TMMFPrioritySettings() ), iIapId( 0 ), iRtcpEnabled( EFalse ),
+            iIpTos( 0 )
+            {   };
+            
+    public: // Data
+        
+        // Remote address
+        TInetAddr iRemoteAddress;
+        
+        // Local RTP port
+        TUint iLocalRtpPort;
+        
+        // Local RTCP port
+        TUint iLocalRtcpPort;
+        
+        // MMF Priority settings
+        TMMFPrioritySettings iPriority;
+        
+        // IAP ID
+        TInt iIapId;
+        
+        // RTCP enabled
+        TBool iRtcpEnabled;
+        
+        // TOS setting
+        TInt iIpTos;
+    };
+    
+#endif      // MCCINTERNALCODECS_H  
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccmsrpconnobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,63 @@
+/*
+* 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:    Provides DTMF support
+*
+*/
+
+#ifndef MMSRPCONNECTIONOBSERVER_H
+#define MMSRPCONNECTIONOBSERVER_H
+
+#include <e32base.h>
+
+/**
+*  callback function for received msrp packets. 
+*
+*  @lib mccmsrpsourcesink.dll
+*/
+class MMsrpConnectionObserver
+{
+public :
+
+        /**
+         * When ConnectL function is used to establish a connection to remote
+         * user, this is used to return the connection status. After ConnectL
+         * the client must wait for this callback before sending or listening
+         * messages. This is called also if the SendMessageL method is called
+         * directly before establishing a connection
+         * @param aStatus system-wide error code
+         */
+        virtual void ConnectStatus( TInt aStatus ) = 0;
+        
+        /* Notifies that the entire file has been sent successfully */
+        virtual void SendFileNotification(TBool aStatus) = 0 ;
+                
+        /* Notifies that the entire file has been received successfully */
+        virtual void ReceiveFileNotification(TBool status) = 0;
+        /**
+        * File data transfer progress. returns the progress of data transfer
+        * @param aTransferred number of bytes transferred
+        * @param aTotal Total amount of bytes to be transferred
+        */
+       // virtual void FileSendProgress( TInt aTransferred, TInt aTotal ) = 0 ;
+
+        /**
+        * File receive progress, number of bytes received from incoming data
+        * @param aReceived number of bytes received
+        * @param aTotal Total amount of bytes to be received
+        */
+       // virtual void FileReceiveProgress( TInt aReceived, TInt aTotal ) = 0;
+
+};
+
+#endif MMSRPCONNECTIONOBSERVER.H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccmsrpmanager.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,219 @@
+/*
+* 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:    Provides DTMF support
+*
+*/
+
+#ifndef MCCMSRPMANAGER_H
+#define MCCMSRPMANAGER_H
+
+//  INCLUDES
+//MSRP Headers
+#include <CMSRP.h>
+#include <CMSRPSession.h>
+#include <MsrpCommon.h>
+#include <MMSRPSessionObserver.h>
+#include "msrpcallbackmgrobserver.h"
+#include "mccqoseventobserver.h"
+#include "mccmsrpconnobserver.h"
+
+// FORWARD DECLARATIONS
+class MAsyncEventHandler;
+class MDataSink;
+class MDataSource;
+class TMccCodecInfo;
+class MMccResources;
+class TMccCreateLink;
+
+
+// CLASS DECLARATION
+
+/**
+*  Mcc MSRP Manager implements Mcc MSRP API handling.
+*
+*  @since Series 60 3.0
+*/
+NONSHARABLE_CLASS( CMccMsrpManager ) : public CBase, public MMsrpConnectionObserver
+	{
+	public:	// Constructors and destructor
+
+		/**
+        * Two-phased constructor.
+        */
+        static CMccMsrpManager* NewL( MAsyncEventHandler& aHandler, 
+                MMccResources& aMccResources, TUid aUID);
+
+		/**
+        * Destructor.
+        */
+        virtual ~CMccMsrpManager();
+        
+        /**
+        * Sets id of the link where the msrp manager belongs.
+        */
+        void SetLinkId( TUint32 aLinkId );
+        
+	public: // functions from MMSRPSessionObserver
+	    
+        /**
+         * When ConnectL function is used to establish a connection to remote
+         * user, this is used to return the connection status. After ConnectL
+         * the client must wait for this callback before sending or listening
+         * messages. This is called also if the SendMessageL method is called
+         * directly before establishing a connection
+         * @param aStatus system-wide error code
+         */
+        void ConnectStatus( TInt aStatus );
+        
+        /* Notifies that the entire file has been sent successfully */
+        void SendFileNotification(TBool aStatus);
+                        
+                /* Notifies that the entire file has been received successfully */
+        void ReceiveFileNotification(TBool status);
+	    
+	    //Connection Status
+	    TInt iConnectStatus;
+  
+
+	public:	// functions from CMSRPSession.h
+	    
+	     
+	    // Returns the local MSRP path that is used in the "a" line
+	    // during SDP negotiation.
+	    TDes8& GetLocalMSRPPath();
+	    
+	    void SetLocalMSRPPath(TDesC8& aMsrpPath );
+	    
+	    
+	    // Set the various parameters related to an MSRP session
+	    // eg: The Success and Failure report headers sent in messages
+	    TInt SetSessionParams( CMSRPSessionParams& aSessionParams );
+	    
+	    // === Post SDP Negotiation; Connection Setup.
+	        
+	    TInt Connect( const TDesC8& aRemoteMsrpPath );
+	    
+	    TInt Listen ( const TDesC8& aRemoteMsrpPath );
+	    
+
+	public : // New functions from CMSRP
+        
+        CMSRPSession* CreateMSRPSessionL( MMSRPSessionObserver& aObserver, 
+                                                       const TUint aIapId ); 
+        
+        /**
+        * Establishes MSRP connection with remote end
+        * @since Series 60 3.0
+        * @param aRemoteMsrpPath - [input] Remote Msrp Path
+        */
+        TInt SetRemoteMsrpPathL( const TDes8& aRemoteMsrpPath, const TDes8& aConnStatus );
+        
+        
+        /**
+        * Creates a new transmit stream
+        * @since Series 60 3.0
+        * @param aSink MSRP Datasink
+        * @param aCodecInfo Codec information
+        * @return void
+        */
+        TUint32 CreateTransmitStreamL( MDataSink& aSink, 
+            const TMccCodecInfo& aCodecInfo );
+        
+        /**
+        * Creates a new receive stream
+        * @since Series 60 3.0
+        * @param MDataSource MSRP datasource
+        * @param aCodecInfo Codec information
+        * @retun void
+        */ 
+        TUint32 CreateReceiveStreamL( MDataSource& aSource, 
+                const TMccCodecInfo& aCodecInfo );
+        
+    public:
+        
+
+        /**
+         * Extracts local IP address and ports from MSRP LocalPath.
+         * @param aClientData Client data
+         * @return void
+         */
+        void GetLocalIpAddressesL( TMccCreateLink& aClientData );
+        
+        
+        /**
+         * Pointer to MSRP session
+         * Own.
+         */
+        CMSRPSession* iMsrpSession;
+        
+        /**
+         * Pointer to Msrp call back manager
+         * Own.
+         */
+        CMsrpCallbackMgrObserver* iMsrpObserver;
+        
+        void SetFileShareAttrbs(HBufC16* aFileName, TInt aFileSize, HBufC8* aFileType,
+                TBool aFTProgressNotification);
+        
+        CMSRPSession* GetMsrpSession();
+        
+        /*
+         * Sets CMSRP Object. The ownership is not transferred
+         */
+        void SetMsrpObject(CMSRP* aMsrpObject);
+        
+    private:
+
+        /**
+        * C++ default constructor.
+        */
+        CMccMsrpManager( MAsyncEventHandler& aHandler,
+                MMccResources& aMccResources );
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL(TUid aUID);
+
+    private:    // Data
+
+        // Not owned. Owned by CMccUIDLLink
+        CMSRP* iMsrp;
+        
+        TUint32 iLinkId;
+        
+        TBool ifirstTime;
+        
+        
+        // Eventhandler for errors
+        MAsyncEventHandler& iEventHandler;
+        
+        MMccResources& iMccResources;
+        MMSRPSessionObserver* iMsrpSessionOb;
+        
+        TBuf8<150> iLocalMsrpPath;
+        HBufC16*   iFileName;
+        TInt    iFileSize; 
+        HBufC8*  iFileType;
+        TBool   iFileShare;
+        TBool iFileSendRequested;
+        TBool iFileReceiveRequested;
+        TBool iIsRegisteredForConnOb;
+        TBool iFTProgressNotification;
+        TInt  iRefCountForMSRPSession;
+	};
+
+#endif	// MCCMSRPMANAGER_H
+
+// End of File
--- a/multimediacommscontroller/mmccsubcontroller/inc/mccsubthreadclientbase.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccsubthreadclientbase.h	Mon Sep 06 17:32:13 2010 +0530
@@ -24,6 +24,7 @@
 //  INCLUDES
 #include <e32base.h>
 #include "mccinternalcodecs.h"
+#include <CMSRP.h>
 
 // CONSTANTS
 
@@ -33,6 +34,7 @@
 class MMccEventHandler;
 class TMccEvent;
 class CMccRtpManager;
+class CMccMsrpManager;
 class MMccResources;
 class CMccRtpMediaClock;
 class TMccCreateLink;
@@ -449,6 +451,44 @@
          */	
         virtual void RemoveContextL( TUint32 aStreamId, 
                                      TUint32 aEndpointId ) = 0;
+        
+        
+        /**
+        * 1st step to create link asynchronously - MSRP
+        * @since Series 60 3.0
+        * @param [input/output] aStatus
+        * @param [input] aIapId
+        * @return void
+        */
+        virtual void InitializeLinkL( TRequestStatus& aStatus,
+                                      TInt aIapId,
+                                      HBufC8* &aLocalMsrpPath);
+
+
+        /**
+        * Gets the codec info of the subthread client
+        * @since Series 60 3.0
+        * @param [output] aCodec The codec info reference where to write
+        * @return void
+        */
+        virtual void GetCodecL( const TUint32 aStreamId, TMccCodecInfo& aCodec );
+        
+        /**
+        * Sets the remote msrp path                    
+        * @since Series 60 3.0
+        * @param [input] aRemMsrpPath Contains the remote msrp path
+        * @return void
+        */
+        virtual void SetRemoteMsrpPathL( TDes8& aRemMsrpPath, TDes8& aConnStatus );
+        
+        virtual void SetFileSharingAttrbs(HBufC16* aFileName, TInt aFileSize, 
+                HBufC8* aFileType, TBool aFTProgressNotification) =0;
+        
+        void SetMsrpObject(CMSRP* aMsrpObject);
+        
+        CMccMsrpManager* iMsrpmanager;
+        
+        TInt GetLinkType();
                                                         
     protected:  // Constructor
 
@@ -496,6 +536,9 @@
         // Priority settings
         TMMFPrioritySettings iPrioritySettings;
         
+        // Codec information struct
+        TMccCodecInfo iCodecInfo;
+        
         // Flag for session creation
         TBool iSessionCreated;
         
@@ -510,6 +553,9 @@
         // Id of this link
         TUint32 iLinkId;
         
+        // Local MSRP Path
+        TBuf8<256> iLocalMsrpPath;
+        
         // Streams owned by the link
         RPointerArray<CMccSymStreamBase> iStreams;
 
--- a/multimediacommscontroller/mmccsubcontroller/inc/mccsymsimpledlstream.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccsymsimpledlstream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -24,6 +24,7 @@
 #include "mccsymstreambase.h"
 #include "mccrtpdatasource.h"
 #include "mccjitterbufferobserver.h"
+#include "mccmsrpmanager.h"
 
 // FORWARD DECLARATIONS
 class CMMFFormatDecode;
@@ -51,7 +52,16 @@
                                              TFourCC aFourCC, 
                                              TInt aStreamType,
                                              CMccRtpMediaClock& aClock );
-        
+        /**
+        * Static constructor
+        */
+        static CMccSymSimpleDlStream* NewLC( TUint32 aMccStreamId, 
+                                             MAsyncEventHandler* aEventhandler,  
+                                             MMccResources* aMccResources,
+                                             CMccMsrpManager* aManager, 
+                                             TFourCC aFourCC, 
+                                             TInt aStreamType,
+											 CMccRtpMediaClock& aClock );   
         /**
         * Destructor.
         */
@@ -189,6 +199,13 @@
                                TFourCC aFourCC, 
                                TInt aStreamType,
                                CMccRtpMediaClock& aClock );
+CMccSymSimpleDlStream( TUint32 aMccStreamId, 
+                               MAsyncEventHandler* aEventhandler, 
+                               MMccResources* aMccResources,
+                               CMccMsrpManager* aManager, 
+                               TFourCC aFourCC, 
+                               TInt aStreamType ,
+                               CMccRtpMediaClock& aClock );
         
         /**
         * 2nd phase constructor
--- a/multimediacommscontroller/mmccsubcontroller/inc/mccsymstreambase.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccsymstreambase.h	Mon Sep 06 17:32:13 2010 +0530
@@ -33,6 +33,7 @@
 class MDataSink;
 class MDataSource;
 class CMccRtpManager;
+class CMccMsrpManager;
 class CMMFDevSound;
 class MMccResources;
 class CMccMultiplexer;
@@ -483,6 +484,12 @@
                 CMccRtpManager* aManager, 
                 TInt aStreamType );
         
+        CMccSymStreamBase( TUint32 aMccStreamId, 
+                MAsyncEventHandler* aEventhandler, 
+                MMccResources* aMccResources,
+                CMccMsrpManager* aManager, 
+                TInt aStreamType );
+        
     private:    // Consturctor
         
         /**
@@ -494,6 +501,12 @@
             iSoundDevice( NULL ), iMccStreamId( (TUint) KErrNotFound ), 
             iState ( EStateNone )
             {   };
+            
+    public:
+        
+        
+        // MSRP Manager instance needs to set this from cmccsubthreadclientbase class
+        CMccMsrpManager* iMsrpmanager;
 
     protected:  // Data
     
--- a/multimediacommscontroller/mmccsubcontroller/inc/mccsymsubthreadclient.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccsymsubthreadclient.h	Mon Sep 06 17:32:13 2010 +0530
@@ -27,6 +27,7 @@
 #include <mmf/server/mmfdatasource.h>
 #include "mccsubthreadclientbase.h"
 #include "mccinternaldef.h"
+#include <CMSRP.h>
 
 
 // FORWARD DECLARATIONS
@@ -194,6 +195,8 @@
 		
 		void SetRemoteRtcpAddrL( TInetAddr aRemAddr );
 		
+	    void SetRemoteMsrpPathL( TDes8& aRemMsrpPath, TDes8& aConnStatus );
+		
 		/**
         * 2nd step to create link
         * @since Series 60 3.0
@@ -203,6 +206,15 @@
         */
 		void InitializeLinkL( TRequestStatus& aStatus, TInt aIapId );
 		
+	    /** MSRP Link
+        * 2nd step to create link
+        * @since Series 60 3.0
+        * @param [input/output] aStatus
+        * @param [input] aIapId
+        * @return void
+        */
+        void InitializeLinkL( TRequestStatus& aStatus, TInt aIapId, HBufC8*& aLocalMsrpPath );
+		
 		/**
         * 3rd step to create link. Creates a RTP session in the subthread
         * @since Series 60 3.0
@@ -290,6 +302,11 @@
 		TInt HandleAmrEvent( const TMMFEvent& aEvent,
 		                     const TMccEvent& aMccEvent );
 		
+		void SetFileSharingAttrbs(HBufC16* aFileName, 
+                                  TInt aFileSize, 
+                                  HBufC8* aFileType,
+                                  TBool aFTProgressNotification);
+		
     private:    // Data
         		        
         // Priority settings
@@ -299,6 +316,11 @@
 
         // Rtp media clock instance
         CMccRtpMediaClock* iRtpMediaClock;
+        HBufC16*  iFileName;
+        TInt       iFileSize; 
+        HBufC8* iFileType;
+        TBool  iFileShare;
+        TBool iFTProgressNotification;
                         
         #ifdef TEST_EUNIT
         friend class UT_CMccSymSubthreadClient;
--- a/multimediacommscontroller/mmccsubcontroller/inc/mccsymulstream.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mccsymulstream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -62,6 +62,14 @@
                                        TInt aStreamType,
                                        CMccRtpMediaClock& aClock );
         
+        static CMccSymUlStream* NewLC( TUint32 aMccStreamId, 
+                                       MAsyncEventHandler* aEventhandler, 
+                                       MMccResources* aMccResources,
+                                       CMccMsrpManager* aManager, 
+                                       TFourCC aFourCC,
+                                       TInt aStreamType,
+                                       CMccRtpMediaClock& aClock );
+        
         /**
         * Destructor.
         */
@@ -181,6 +189,14 @@
                          TInt aStreamType,
                          CMccRtpMediaClock& aClock );
         
+        CMccSymUlStream( TUint32 aMccStreamId, 
+                         MAsyncEventHandler* aEventhandler,
+                         MMccResources* aMccResources,
+                         CMccMsrpManager* aManager, 
+                         TFourCC aFourCC,
+                         TInt aStreamType,
+                         CMccRtpMediaClock& aClock );
+        
         /**
         * 2nd phase constructor
         */
--- a/multimediacommscontroller/mmccsubcontroller/inc/mcculdlclient.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/inc/mcculdlclient.h	Mon Sep 06 17:32:13 2010 +0530
@@ -29,6 +29,8 @@
 #include "mmccinterfacedef.h"
 #include "mccinternaldef.h"
 
+#include <CMSRP.h>
+
 // CONSTANTS
 
 // MACROS
@@ -610,6 +612,32 @@
                                      TUint32 aStreamId,
                                      TUint32 aEndpointId,
                                      TDesC8& aVal );
+        
+        
+        /**
+        * Initializes link
+        * @since Series 60 3.0
+        * @param [input/output] aStatus Status of the request
+        * @param [input] aLinkId ID of the link
+        * @param [input] aIapId IAP ID
+        * @return void
+        */
+        IMPORT_C void InitializeLinkL( TRequestStatus& aStatus,
+                                       TUint32 aLinkId,
+                                       TInt aIapId,
+                                       HBufC8* &aLocalMsrpPath);    
+        
+        /**
+        * Sets the remote msrp path for aStream
+        * @since Series 60 3.0
+        * @param [input] aRemAddr Denotes the remote msrp path address
+        * @param [input] aLinkId Link location in the array
+        * @leave System wide error code if unsuccessful
+        * @return None
+        */
+        IMPORT_C void SetRemoteMsrpPathL( TDes8& aRemMsrpPath, TDes8& aConnStatus, 
+                                           TUint32 aLinkId ); 
+        
                                                                   
     public: // From MMccEventHandler
         
@@ -622,6 +650,8 @@
 	                               TUint32 aLinkId,
 	                               TUint32 aStreamId, 
 	                               TUint32 aEndpointId );
+	    virtual void SetFileShareAttrbs(HBufC16* aFileName, TInt aFileSize, 
+	            HBufC8* aFileType, TBool aFTProgressNotification);
 
     protected:  // New functions
        
@@ -668,7 +698,11 @@
     
         // array for storing ul & dl client pointers to streams 
         RPointerArray<CMccSubThreadClientBase> iClientArray;
-
+        
+        TBool iIsMsrpSessionCreated;
+        
+        TInt iLinkCount;
+        
         // member variable for storing session id
         TUint32 iSessionId;
 
@@ -689,6 +723,12 @@
         
         // Rtp media clock
         CMccRtpMediaClock* iRtpMediaClock;
+        HBufC16*   iFileName;
+        TInt iFileSize;
+        HBufC8*   iFileType;
+        TBool        iFileShare;
+        TBool iFTProgressNotification;
+        CMSRP*       iMSRP;
                 
     public:     // Friend classes
        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/inc/msrpcallbackmgrobserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides interface for UL/DL subthread clients
+*
+*/
+
+
+
+
+#ifndef CMSRPCALLBACKMGROBSERVER_H
+#define CMSRPCALLBACKMGROBSERVER_H
+
+#include "mccmsrpconnobserver.h"
+#include "mccmsrpdataobserver.h"
+#include "MMSRPSessionObserver.h"
+//#include "mmfcontrollerframework.h"
+#include <mmf/common/mmfcontrollerframework.h>
+#include <mmccevents.h>
+
+/**
+*  callback function for received msrp packets. 
+*
+*  @lib mccmsrpsourcesink.dll
+*/
+class CMsrpCallbackMgrObserver : public CBase, public MMSRPSessionObserver
+    {
+	
+	public:
+		static CMsrpCallbackMgrObserver* NewL(MAsyncEventHandler& aEventHandler);
+		
+    public:
+        
+        /**
+         * A MSRP message has been received from the network.
+         * This function is called when the MSRP message was received from the network
+         * the ownership is transferred
+         * @param aMessage the received message
+         * @param aStatus, KErrNone with complete message, KErrCancel if terminated
+         */
+        virtual void IncomingMessage( HBufC8* aMessageContent, TInt aStatus );
+
+        /**
+         * A MSRP REPORT message has been received from the network
+         * This function is called to indicate to the client that a recipient
+         * wishes to indicate a range of bytes as received. Alternative the
+         * recipient might use REPORT to indicate an error. In case of error the
+         * MSRP stops sending the message. However, it is client's responsibility
+         * how the handle the information
+         * @param aStatus status code from the REPORT message
+         * @param aRangeStart start of byte range received
+         * @param aRangeEnd end of byte range received
+         * @param aTotal Total number of bytes in the message
+         */
+        virtual void IncomingReport( TInt aStatus, TInt aRangeStart,
+            TInt aRangeEnd, TInt aTotal );
+
+        /**
+         * The SendMessage status of the message sending
+         * The possible status code are defined by CMSRPConnection::TMSRPErrorCodes
+         * or system wide error codes
+         * @param aStatus status of the operation
+         * @param aMessageId message identifier of the sent message
+         */
+        virtual void SendResult( TInt aStatus, const TDesC8& aMessageid );
+
+        /**
+         * If listen port request fails this is called
+         * @param aStatus error code of the operation
+         */
+        virtual void ListenPortFailure( TInt aStatus );
+
+        /**
+         * When ConnectL function is used to establish a connection to remote
+         * user, this is used to return the connection status. After ConnectL
+         * the client must wait for this callback before sending or listening
+         * messages. This is called also if the SendMessageL method is called
+         * directly before establishing a connection
+         * @param aStatus system-wide error code
+         */
+        virtual void ConnectStatus( TInt aStatus );
+        
+        /* Notifies that the entire file has been sent successfully */
+        void SendFileNotification(TBool aStatus) ;
+        
+        /* Notifies that the entire file has been received successfully */
+        void ReceiveFileNotification(TBool status) ;
+        /**
+        * File data transfer progress. returns the progress of data transfer
+        * @param aTransferred number of bytes transferred
+        * @param aTotal Total amount of bytes to be transferred
+        */
+        void FileSendProgress( TInt aTransferred, TInt aTotal ) ;
+
+        /**
+        * File receive progress, number of bytes received from incoming data
+        * @param aReceived number of bytes received
+        * @param aTotal Total amount of bytes to be received
+        */
+       void FileReceiveProgress( TInt aReceived, TInt aTotal );
+		
+		public:
+		
+		MMsrpConnectionObserver *iConnObserver;
+		MMsrpDataObserver *iDataObserver;
+		
+		void RegisterConnectionObserver (MMsrpConnectionObserver& aObserver);
+		void RegisterDataObserver (MMsrpDataObserver& aObserver);
+		
+		void ConstructL();
+		
+		private:
+		
+		CMsrpCallbackMgrObserver (MAsyncEventHandler& aEventHandler);
+		TMccEvent  iMccEvent;
+		
+        // Eventhandler for errors
+        MAsyncEventHandler& iEventHandler;
+    };
+	
+#endif // End of MMSRPCALLBACKMGROBSERVER.H
--- a/multimediacommscontroller/mmccsubcontroller/src/mcccodecconfigurator.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mcccodecconfigurator.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -192,6 +192,22 @@
             User::Leave( KErrArgument );
             }
         }
+    else if( KMccAnySourceUid == aDatasource.DataSourceType() )
+        {
+        __SUBCONTROLLER( "CMccCodecConfigurator::ConfigureCodecL, KMccAnySourceUid" )
+        
+        CPayloadFormatWrite& formatEnc = static_cast<CPayloadFormatWrite&>( aDatasink );
+        const TMccCodecInfoBuffer buffer( aCodec );
+        formatEnc.ConfigurePayloadFormatL( buffer, aClock );
+        }
+    else if( KMccAnySinkUid == aDatasink.DataSinkType() && KMccMsrpSourceUid != aDatasource.DataSourceType())
+        {
+        __SUBCONTROLLER( "CMccCodecConfigurator::ConfigureCodecL, KMccAnySinkUid" )
+        
+        CPayloadFormatRead& formatDec = static_cast<CPayloadFormatRead&>( aDatasource );
+        const TMccCodecInfoBuffer buffer( aCodec );
+        formatDec.ConfigurePayloadFormatL( buffer );
+        }
     else
         {
 		__SUBCONTROLLER( "MccCodecConfigurator::ConfigureCodecL, KErrArgument" )
--- a/multimediacommscontroller/mmccsubcontroller/src/mccdldatapath.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccdldatapath.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -118,7 +118,7 @@
         TBool bufferReference;
         iSourceBuffer = 
             iDataSource->CreateSourceBufferL( iMediaId, bufferReference );
-        __ASSERT_ALWAYS( iSourceBuffer, User::Leave( KErrGeneral ) );
+        //__ASSERT_ALWAYS( iSourceBuffer, User::Leave( KErrGeneral ) ); 
         __ASSERT_ALWAYS( bufferReference, User::Leave( KErrGeneral ) );
         }
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccmsrpmanager.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,429 @@
+/*
+* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Provides MSRP support
+*
+*/
+
+
+
+
+// INCLUDE FILES
+#include "mccmsrpmanager.h"
+#include "mccinternalcodecs.h"
+#include "mmccevents.h"
+#include "mccsubcontrollerlogs.h"
+#include "mccresources.h"
+#include "mccqoshandler.h"
+#include "mccinternaldef.h"
+#include <CommDbConnPref.h> 
+#include "mccmsrpinterface.h"
+#include "mccmsrpsink.h"
+#include "mccmsrpsource.h"
+#include <CMSRP.h>
+#include <CMSRPSession.h>
+#include <MsrpCommon.h>
+#include <MMSRPSessionObserver.h>
+#include <uri8.h>
+
+// LOCAL CONSTANTS AND MACROS
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+    
+void CMccMsrpManager::ConnectStatus( TInt aStatus )
+    {
+    __SUBCONTROLLER_INT1("CMccMsrpManager::ConnectStatus : status is", aStatus )
+    iConnectStatus = aStatus;
+    __ASSERT_ALWAYS(iMsrpSession, User::Leave(KErrNotReady));
+    if ( aStatus == KErrNone)
+        {
+        // Send file is requested
+        if (iFileSendRequested )
+            {
+            __SUBCONTROLLER( "CMccMsrpManager::ConnectStatus: SendFileL is issued" )
+                    
+            iMsrpSession->NotifyProgress(iFTProgressNotification);
+            TFileName fileName;
+            fileName.Copy(iFileName->Des());
+            TInt error = iMsrpSession->SendFile(fileName, iFileType->Des());
+            if (error != KErrNone && iMsrpSessionOb !=NULL )
+                iMsrpSessionOb->SendFileNotification(error);
+                }
+        else if (iFileReceiveRequested)
+            { // receive file is requested
+            __SUBCONTROLLER( "CMccMsrpManager::ConnectStatus: ReceiveFile is issued" )
+            
+            iMsrpSession->NotifyProgress(iFTProgressNotification);
+            TFileName fileName;
+            fileName.Copy(iFileName->Des());
+            TInt error = iMsrpSession->ReceiveFile(fileName, iFileSize, iFileType->Des());
+            if (error != KErrNone && iMsrpSessionOb !=NULL)
+                {
+                iMsrpSessionOb->ReceiveFileNotification(error);
+                }
+            }
+        }
+    else
+        {
+        if (iFileSendRequested )
+            {
+            if (iMsrpSessionOb !=NULL )
+                iMsrpSessionOb->SendFileNotification(aStatus);
+            }
+        else
+            {
+            if (iMsrpSessionOb !=NULL )
+                iMsrpSessionOb->ReceiveFileNotification(aStatus);
+            }
+        }
+        //CActiveScheduler::Stop();
+        __SUBCONTROLLER( "CMccMsrpManager::ConnectStatus:exit" )
+        }
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::CMccMsrpManager
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CMccMsrpManager::CMccMsrpManager(
+        MAsyncEventHandler& aHandler, 
+        MMccResources& aMccResources) : 
+    iEventHandler( aHandler ),
+    iMccResources( aMccResources )
+    {
+    ifirstTime = ETrue;
+    iFileSendRequested = EFalse;
+    iFileReceiveRequested = EFalse;
+    iIsRegisteredForConnOb = EFalse;
+    iRefCountForMSRPSession = 0;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::ConstructL(TUid /*aUID*/)
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::ConstructL" )
+    
+    //iMsrp = CMSRP::NewL(aUID);
+    
+    iMsrpObserver = CMsrpCallbackMgrObserver::NewL(iEventHandler); 
+    
+    iFileShare = NULL;
+    iFileName = NULL;
+    iFileType = NULL;
+    iMsrpSessionOb = NULL;
+    
+    __SUBCONTROLLER( "CMccMsrpManager::ConstructL exit" )
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::NewL
+// Static constructor.
+// -----------------------------------------------------------------------------
+//
+CMccMsrpManager* CMccMsrpManager::NewL(MAsyncEventHandler& aHandler, MMccResources& aMccResources, TUid aUID)
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::NewL" )
+    CMccMsrpManager* self = new (ELeave) CMccMsrpManager( aHandler, aMccResources );     
+    CleanupStack::PushL( self );      
+    self->ConstructL(aUID);   
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SetLinkId
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::SetLinkId( TUint32 aLinkId )
+    {
+    iLinkId = aLinkId;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::~CMccMsrpManager
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CMccMsrpManager::~CMccMsrpManager()
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::~CMccMsrpManager" )
+ 
+    if (  NULL != iMsrpSession )
+        {
+        iMsrp->CloseMSRPSession(iMsrpSession);
+        }
+    if ( NULL != iMsrpObserver )
+        {
+        delete iMsrpObserver;
+        }
+    delete iFileName;
+    delete iFileType;
+    __SUBCONTROLLER( "CMccMsrpManager::~CMccMsrpManager, exit" )
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::GetLocalIpAddressesL
+// -----------------------------------------------------------------------------
+//
+TDes8& CMccMsrpManager::GetLocalMSRPPath( )
+    {
+    return iLocalMsrpPath;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SetLocalMSRPPath
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::SetLocalMSRPPath(TDesC8& aMsrpPath )
+    {
+    iLocalMsrpPath.Zero();
+    iLocalMsrpPath = aMsrpPath;
+    }
+    
+
+CMSRPSession* CMccMsrpManager::GetMsrpSession()
+    {
+    iRefCountForMSRPSession++;
+    return iMsrpSession;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::GetLocalIpAddressesL
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::GetLocalIpAddressesL( TMccCreateLink& aClientData )
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::GetLocalIpAddressesL, entry" )
+  
+    // Extract the local address and port from msrp path    
+    if (iLocalMsrpPath.Length() > 0)
+        {
+        TUriParser8 parser;
+        TInt parseValue = parser.Parse(iLocalMsrpPath); 
+            
+        TBuf8<50> host = parser.Extract(EUriHost);
+        TBuf16<60> hostBuf16;
+        hostBuf16.Copy(host);
+        TLex hostLex(hostBuf16);
+        TInt32 addr;
+        hostLex.Val(addr);
+        
+        TBuf8<10> portBuf = parser.Extract(EUriPort);
+        TBuf16<10> portBuf16;
+        portBuf16.Copy(portBuf);
+        TLex lex(portBuf16);
+        TInt Port;
+        lex.Val(Port);
+        
+        TInetAddr addr1(addr, Port );
+        aClientData.iLocalAddress = addr1; 
+        
+        __SUBCONTROLLER_INT1("CMccMsrpManager::GetLocalIpAddressesL: Host no",addr)
+        __SUBCONTROLLER_INT1("CMccMsrpManager::GetLocalIpAddressesL: Port no", Port)
+        __SUBCONTROLLER( "CMccMsrpManager::GetLocalIpAddressesL, exit" )
+        }
+    __SUBCONTROLLER( "CMccMsrpManager::GetLocalIpAddressesL, exit" )
+    }
+
+
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::CreateSessionL
+// Creates RTP session and adds session to SessionArray
+// -----------------------------------------------------------------------------
+//
+CMSRPSession* CMccMsrpManager::CreateMSRPSessionL(MMSRPSessionObserver &aObserver, TUint aIapId)
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::CreateMSRPSessionL: Entry" )
+     iMsrpSession = iMsrp->CreateMSRPSessionL(aObserver, aIapId) ;
+    
+    __ASSERT_ALWAYS(iMsrpSession != NULL, User::Leave(KErrArgument));
+    
+    iLocalMsrpPath.Zero();
+    iLocalMsrpPath = iMsrpSession->LocalMSRPPath();
+    iMsrpSessionOb = &aObserver;
+    
+    __SUBCONTROLLER( "CMccMsrpManager::CreateMSRPSessionL : Exit" )
+    return iMsrpSession;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::CreateTransmitStreamL
+// Creates a new transmit stream based on given parameters
+// -----------------------------------------------------------------------------
+//
+TUint32 CMccMsrpManager::CreateTransmitStreamL( MDataSink& aSink, 
+    const TMccCodecInfo& /*aCodecInfo*/ )
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::CreateTransmitStreamL" )
+    TUint32 streamId( 0 );
+    if (!iIsRegisteredForConnOb)
+        {
+        iMsrpObserver->RegisterConnectionObserver(*this);
+        iIsRegisteredForConnOb = ETrue;
+        }
+    
+    CMccMsrpSink& dSink = static_cast<CMccMsrpSink&>( aSink );
+        
+    TMccMsrpSessionParams sessMsrpParams (iMsrp, iMsrpSession);
+    
+    dSink.SetSessionParamsL( sessMsrpParams );
+    
+    return streamId;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::CreateReceiveStreamL
+// Creates a new receive stream based on given parameters
+// -----------------------------------------------------------------------------
+//
+TUint32 CMccMsrpManager::CreateReceiveStreamL( MDataSource& aSource, 
+    const TMccCodecInfo& /*aCodecInfo*/ )
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::CreateReceiveStreamL" )
+    TUint32 streamId( 0 );
+    
+    CMccMsrpSource& dSource = static_cast<CMccMsrpSource&>( aSource );
+    TMccMsrpSessionParams sessParams( iMsrp, iMsrpSession, iMsrpObserver);
+    if (!iIsRegisteredForConnOb )
+        {
+        // register connection observer if not registered yet
+        iMsrpObserver->RegisterConnectionObserver(*this);
+        }
+    if (! iFileShare )
+        {
+        iMsrpObserver->RegisterDataObserver(dSource);
+        }
+
+    return streamId;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SetFileShareAttrbs()
+// stores the File Sharing attributes
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::SetFileShareAttrbs(HBufC16* aFileName, 
+        TInt aFileSize, 
+        HBufC8* aFileType, 
+        TBool aFTProgressNotification) 
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::SetFileShareAttrbs, entry" )
+    iFileShare = ETrue; 
+    if (NULL != aFileName )
+        iFileName = aFileName->Des().Alloc();
+    iFileSize = aFileSize;
+    if (NULL != aFileType )
+        iFileType = aFileType->Des().Alloc();
+    iFTProgressNotification = aFTProgressNotification;
+    __SUBCONTROLLER( "CMccMsrpManager::SetFileShareAttrbs: file share attrbs set. exit" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SetRemoteMsrpPathL
+// Sets remote MSRP path for MSRP stack to either connect or listen
+// -----------------------------------------------------------------------------
+//
+TInt CMccMsrpManager::SetRemoteMsrpPathL( 
+        const TDes8& aRemoteMsrpPath, 
+        const TDes8& aConnStatus )
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::SetRemoteMsrpPathL, entry" )
+    //Connection Setup. active , actpass, passive
+    // check the remote partys preference for the connection negotiaiton
+    TInt conn1 = aConnStatus.Find(_L8("passive"));
+    TInt conn2 = aConnStatus.Find(_L8("active"));
+    
+    if(conn1 != KErrNotFound)
+        {
+        __SUBCONTROLLER( "CMccMsrpManager::SetRemoteMsrpPathL::Connect, entry" )
+        
+        // Wait for Synchronization
+        User::After(1500000);
+        User::LeaveIfError( iMsrpSession->Connect( aRemoteMsrpPath ));
+        
+        if (iFileShare || NULL!= iFileName)
+            {
+            __SUBCONTROLLER( "CMccMsrpManager::SetRemoteMsrpPathL File Send is requested" )
+            iFileSendRequested = ETrue;
+            }
+        }
+    else
+        {
+        __SUBCONTROLLER( "CMccMsrpManager::SetRemoteMsrpPathL::Listen, entry" )
+        User::LeaveIfError( iMsrpSession->Listen( aRemoteMsrpPath ));
+        if (iFileShare || NULL!=iFileName)
+            {
+            __SUBCONTROLLER( "CMccMsrpManager::SetRemoteMsrpPathL File receive is requested" )
+            iFileReceiveRequested = ETrue;
+            }
+        }
+    ifirstTime = EFalse;
+    return KErrNone;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SendFileNotification
+//  Notifies that the entire file has been sent successfully
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::SendFileNotification(TBool /*aStatus*/) 
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::SendFileNotification, entry" )
+    // reset the value as the request for the file transfer is completed
+    iFileSendRequested = EFalse; 
+    }
+                
+ 
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SendFileNotification
+//  Notifies that the entire file has been received successfully
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::ReceiveFileNotification(TBool /*status*/)
+    {
+    __SUBCONTROLLER( "CMccMsrpManager::ReceiveFileNotification, entry" )
+    // reset the value as the request for the file transfer is completed
+    iFileReceiveRequested = EFalse; 
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMccMsrpManager::SetMsrpObject
+//  Sets CMsrp object. not owned
+// -----------------------------------------------------------------------------
+//
+void CMccMsrpManager::SetMsrpObject(CMSRP* aMsrpObject)
+    {
+    iMsrp = aMsrpObject;
+    }
--- a/multimediacommscontroller/mmccsubcontroller/src/mccsubthreadclientbase.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccsubthreadclientbase.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -21,8 +21,10 @@
 // INCLUDE FILES
 #include "mccsubthreadclientbase.h"
 #include "mccrtpmanager.h"
+#include "mccmsrpmanager.h"
 #include "mccsubcontrollerlogs.h"
 #include "mccsymstreambase.h"
+#include "mmccinterfacedef.h"
 
 
 // ============================ MEMBER FUNCTIONS ===============================
@@ -42,6 +44,25 @@
 // CMccSubThreadClientBase::GetCodecL
 // Returns the used codec
 // -----------------------------------------------------------------------------
+void CMccSubThreadClientBase::GetCodecL( const TUint32 /*aStreamId*/,
+                                         TMccCodecInfo& aCodec )
+    {   
+    TFourCC nullFourCC;
+    if( nullFourCC == iCodecInfo.iFourCC )
+        {
+        //User::Leave( KErrNotReady );
+        }
+    else
+        {
+        aCodec = iCodecInfo;
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMccSubThreadClientBase::CodecInformationL
+// Returns the used codec
+// -----------------------------------------------------------------------------
 void CMccSubThreadClientBase::CodecInformationL( TUint32 aStreamId,
                                                  TMccCodecInfo& aCodec )
     {
@@ -105,6 +126,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMccSubThreadClientBase::SetRemoteMsrpPathL
+// Sets the remote msrp path of uplink stream
+// -----------------------------------------------------------------------------
+void CMccSubThreadClientBase::SetRemoteMsrpPathL( TDes8& /*aRemAddr*/, TDes8& /*aConnStatus*/ )
+    {
+    User::Leave( KErrNotSupported );    
+    }
+
+// -----------------------------------------------------------------------------
 // CMccSubThreadClientBase::InitializeLinkL
 // Creates the RTP session in the subthread, STEP #1
 // -----------------------------------------------------------------------------
@@ -116,6 +146,18 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMccSubThreadClientBase::InitializeLinkL
+// Creates the MSRP session in the subthread, STEP #1
+// -----------------------------------------------------------------------------
+//
+void CMccSubThreadClientBase::InitializeLinkL( TRequestStatus& /*aStatus*/, 
+                                               TInt /*aIapId*/,
+                                               HBufC8*& /*aLocalMsrpPath*/ )
+    {
+    User::Leave( KErrNotSupported );    
+    }
+
+// -----------------------------------------------------------------------------
 // CMccSubThreadClientBase::CreateSessionL
 // Creates the RTP session in the subthread, STEP #2
 // -----------------------------------------------------------------------------
@@ -136,9 +178,16 @@
 void CMccSubThreadClientBase::SetLinkId( TUint32 aLinkId )
     {
     iLinkId = aLinkId;
-    if ( iRtpmanager )
+    if(this->iLinkType == KMccLinkMessage)
         {
-        iRtpmanager->SetLinkId( aLinkId );
+        iMsrpmanager->SetLinkId( aLinkId );
+        }
+    else
+        {
+        if ( iRtpmanager )
+            {
+            iRtpmanager->SetLinkId( aLinkId );
+            }
         }
     }
 
@@ -308,6 +357,21 @@
     return KErrNotFound;
     }
 
+TInt CMccSubThreadClientBase::GetLinkType()
+    {
+    return iLinkType;
+    }
+
+// -----------------------------------------------------------------------------
+// CMccUlDlClient::SetMsrpObject()
+// Sets CMSRP object
+// -----------------------------------------------------------------------------
+//
+void CMccSubThreadClientBase::SetMsrpObject(CMSRP* aMsrpObject)
+    {
+    iMsrpmanager->SetMsrpObject(aMsrpObject);
+    }
+
 // ========================== OTHER EXPORTED FUNCTIONS =========================
 
 //  End of File  
--- a/multimediacommscontroller/mmccsubcontroller/src/mccsymsimpledlstream.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccsymsimpledlstream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -25,6 +25,7 @@
 #include "mccjitterbuffer.h"
 #include "mccuids.hrh"
 #include "mccrtpmanager.h"
+#include "mccmsrpmanager.h"
 #include "mcccodecconfigurator.h"
 #include "mccinternaldef.h"
 #include "mccvideosink.h"
@@ -61,6 +62,30 @@
     iFourCC = aFourCC;
     iRtpMediaClock = &aClock;
     }
+	
+	// -----------------------------------------------------------------------------
+// CMccSymSimpleDlStream::CMccSymSimpleDlStream
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CMccSymSimpleDlStream::CMccSymSimpleDlStream( 
+    TUint32 aMccStreamId, 
+    MAsyncEventHandler* aEventhandler, 
+    MMccResources* aMccResources,
+    CMccMsrpManager* aManager, 
+    TFourCC aFourCC,
+    TInt aStreamType,
+	CMccRtpMediaClock& aClock ) : 
+    CMccSymStreamBase( aMccStreamId, 
+                       aEventhandler, 
+                       aMccResources, 
+                       aManager, 
+                       aStreamType )
+    {
+    iFourCC = aFourCC;
+	iRtpMediaClock = &aClock;
+    } 
 
 // -----------------------------------------------------------------------------
 // CMccSymSimpleDlStream::NewL
@@ -89,6 +114,34 @@
 
     return s;
     }
+	
+// -----------------------------------------------------------------------------
+// CMccSymSimpleDlStream::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMccSymSimpleDlStream* CMccSymSimpleDlStream::NewLC( 
+    TUint32 aMccStreamId, 
+    MAsyncEventHandler* aEventhandler, 
+    MMccResources* aMccResources,
+    CMccMsrpManager* aManager, 
+    TFourCC aFourCC,
+    TInt aStreamType,
+    CMccRtpMediaClock& aClock ) 
+    {
+    CMccSymSimpleDlStream* s = 
+            new ( ELeave ) CMccSymSimpleDlStream( aMccStreamId, 
+                                                  aEventhandler,
+                                                  aMccResources, 
+                                                  aManager, 
+                                                  aFourCC, 
+                                                  aStreamType,
+												  aClock );
+    CleanupStack::PushL( s );
+    s->ConstructL();
+
+    return s;
+    }	
 
 // -----------------------------------------------------------------------------
 // CMccSymSimpleDlStream::ConstructL
@@ -294,11 +347,17 @@
 
     TUid formatuid;
     CMMFFormatDecode* tmp = NULL;
-    
-    formatuid.iUid = KImplUidAnyPayloadFormatDecode;
+    if(this->iType == KMccMessageDownlinkStream)
+        {
+        formatuid.iUid = iCodecInfo.iPayloadFormatDecoder;
+        }
+    else
+        {
+        formatuid.iUid = KImplUidAnyPayloadFormatDecode;
+        }
     
     // Multiplexer is the source of the decoder
-    tmp = CMMFFormatDecode::NewL( formatuid, iMultiplexer );
+    tmp = CMMFFormatDecode::NewL( formatuid, iDatasource );
     
 	tmp->SetSourceDataTypeCode( iCodecInfo.iFourCC, Type() );
 
@@ -335,13 +394,17 @@
 //
 void CMccSymSimpleDlStream::PrimeL( const TUint32 aEndpointId )
     {
-    __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
     __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
 
     TBool controlNetworkResources = SetStateL( EStatePrepared, aEndpointId );
     
-     if ( controlNetworkResources && !LocalStream() )
+    if( this->iType == KMccMessageDownlinkStream )
         {
+        iMsrpmanager->CreateReceiveStreamL( *iDatasource, iCodecInfo );
+        }
+    else if( controlNetworkResources && !LocalStream() )
+        { 
+		__ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
         iRtpmanager->CreateReceiveStreamL( *iDatasource, iCodecInfo );
         }
     
@@ -362,15 +425,15 @@
     TBool /*aStreamPaused*/, 
     TBool aEnableRtcp )
     {
-    __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
     __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
     
     TBool controlNetworkResources = SetStateL( EStateStreaming, aEndpointId );
     
-    if ( !LocalStream() )
+    if ( !LocalStream() && (this->iType != KMccMessageDownlinkStream) )
         {  
         if ( controlNetworkResources )
             {
+            __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
             iRtpmanager->StartSessionL();
             }
             
@@ -393,13 +456,14 @@
 //
 void CMccSymSimpleDlStream::PauseL( const TUint32 aEndpointId, TBool aEnableRtcp )
     {
-    __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
-    __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
     
     SetStateL( EStatePaused, aEndpointId );
     
-     if ( !LocalStream() )
-        { 
+    if(this->iType != KMccMessageDownlinkStream && !LocalStream())
+        {
+        __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
+        __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
+    
         User::LeaveIfError( iRtpmanager->SetRTCPSendReceive( aEnableRtcp ) );
         }
 
@@ -415,13 +479,14 @@
 //
 void CMccSymSimpleDlStream::ResumeL( const TUint32 aEndpointId, TBool aEnableRtcp )
     {
-    __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
-    __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
     
     SetStateL( EStateStreaming, aEndpointId );
     
-    if ( !LocalStream() )
-        { 
+    if(this->iType != KMccMessageDownlinkStream && !LocalStream() )
+        {
+        __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
+        __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
+    
         User::LeaveIfError( iRtpmanager->SetRTCPSendReceive( aEnableRtcp ) );
         }
 
--- a/multimediacommscontroller/mmccsubcontroller/src/mccsymstreambase.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccsymstreambase.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -47,6 +47,7 @@
     MMccResources* aMccResources,
     CMccRtpManager* aManager, 
     TInt aStreamType ) : 
+    iMsrpmanager( NULL ),
     iDatapath( NULL ), 
     iEventhandler( aEventhandler ), 
     iMccResources( aMccResources ),
@@ -59,6 +60,34 @@
     iType( aStreamType )
     {
     }
+    
+    
+    
+// -----------------------------------------------------------------------------
+// CMccSymStreamBase::CMccSymStreamBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CMccSymStreamBase::CMccSymStreamBase( 
+    TUint32 aMccStreamId, 
+    MAsyncEventHandler* aEventhandler, 
+    MMccResources* aMccResources,
+    CMccMsrpManager* aManager, 
+    TInt aStreamType ) : 
+    iMsrpmanager( aManager ),
+    iDatapath( NULL ), 
+    iEventhandler( aEventhandler ), 
+    iMccResources( aMccResources ),
+    iDatasink( NULL ), 
+    iDatasource( NULL ), 
+    iFmtpAttr( NULL ), 
+    iSoundDevice( NULL ), 
+    iMccStreamId( aMccStreamId ), 
+    iType( aStreamType )
+    {
+    }
+        
 
 // -----------------------------------------------------------------------------
 // CMccSymStreamBase::~CMccSymStreamBase
@@ -477,6 +506,18 @@
         {
         type = KUidMediaTypeVideo;
         }
+    else if (iType == KMccMessageUplinkStream)
+        {
+        
+        static const TUid KUidMediaTypeMessage    = {0x10289999};  //KImplUidMsrpPayloadFormatEncode
+        type = KUidMediaTypeMessage;
+        }
+    else if (iType == KMccMessageDownlinkStream)
+        {
+        
+        static const TUid KUidMediaTypeMessage    = {0x10288888};  //KImplUidMsrpPayloadFormatDecode
+        type = KUidMediaTypeMessage;
+        }
         
     return type;
     }
@@ -487,7 +528,7 @@
 //     
 TBool CMccSymStreamBase::LocalStream() const
     {
-    return ( iType == KMccVideoLocalStream || iType == KMccAudioLocalStream );
+    return ( iType == KMccVideoLocalStream || iType == KMccAudioLocalStream || iType == KMccMessageLocalStream );
     }
 
 // -----------------------------------------------------------------------------
--- a/multimediacommscontroller/mmccsubcontroller/src/mccsymsubthreadclient.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccsymsubthreadclient.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -21,6 +21,7 @@
 #include <mmf/server/mmfdatasource.h>
 #include <mmf/server/mmfdatasink.h>
 
+#include "mmccinterfacedef.h"
 #include "mccsymsubthreadclient.h"
 #include "mccsymulstream.h"
 #include "mccsymdlstream.h"
@@ -28,6 +29,7 @@
 #include "mccdtmfdlstream.h"
 #include "mccdtmfulstream.h"
 #include "mccrtpmanager.h"
+#include "mccmsrpmanager.h"
 #include "amrpayloadformatutil.h"
 #include "mccinternalevents.h"
 #include "mccsubcontrollerlogs.h"
@@ -59,7 +61,18 @@
 	__SUBCONTROLLER( "CMccSymSubthreadClient::ConstructL" )
 	User::LeaveIfNull( iObserver );
 	User::LeaveIfNull( iMccResources );
-    iRtpmanager = CMccRtpManager::NewL( *this, *iMccResources, MccSessionId() );
+	iFileName = NULL;
+	iFileType = NULL;
+	if(this->iLinkType == KMccLinkMessage)
+	    {
+	    TUid uid = {0x123456};
+	    iMsrpmanager = CMccMsrpManager::NewL( *this, *iMccResources, uid );
+	    iFileShare = NULL;
+	    }
+	else
+	    {
+        iRtpmanager = CMccRtpManager::NewL( *this, *iMccResources, MccSessionId() );
+	    }
 	__SUBCONTROLLER( "CMccSymSubthreadClient::ConstructL, exit" )
     }
 
@@ -94,12 +107,22 @@
     
     iUnusedStreams.Reset();
     iUnusedStreams.Close();
+    delete iFileName;
+    delete iFileType;
     
     if( iRtpmanager )
         {
         iRtpmanager->CloseSession();
         delete iRtpmanager;
-        }    
+        }
+    else if (iMsrpmanager)
+        {
+        delete iMsrpmanager;
+        }
+    else
+        {
+        // NOP
+        }
 	__SUBCONTROLLER( "CMccSymSubthreadClient::~CMccSymSubthreadClient, exit" )
     }
 
@@ -252,7 +275,7 @@
     {
 	__SUBCONTROLLER_INT1( "CMccSymSubthreadClient::OpenL for streamId", aStreamId )
 	__SUBCONTROLLER_INT1( "CMccSymSubthreadClient stream type", aStreamType )
-    __ASSERT_ALWAYS( iSessionCreated, User::Leave( KErrNotReady ) );
+    //__ASSERT_ALWAYS( iSessionCreated, User::Leave( KErrNotReady ) );
     __ASSERT_ALWAYS( aDatasource, User::Leave( KErrArgument ) );
     __ASSERT_ALWAYS( aDatasink, User::Leave( KErrArgument ) );
         
@@ -270,7 +293,29 @@
                                      sourceType == KMccFileSourceUid &&
                                      sinkType == KMccVideoSinkUid;
     
-    if ( KMccDtmfStream == aStreamType && KMccRtpSourceUid == sourceType )
+    if ( KMccMessageDownlinkStream == aStreamType )
+        {
+        __SUBCONTROLLER( "CMccSymSubthreadClient::OpenL, new CMccSymSimpleDlStream" )      
+        stream = CMccSymSimpleDlStream::NewLC( aStreamId, 
+                                               this, 
+                                               iMccResources,
+                                               iMsrpmanager, 
+                                               aFourCC, 
+                                               aStreamType,
+                                               *iRtpMediaClock);
+        }
+    else if (KMccMessageUplinkStream == aStreamType)
+        {
+        __SUBCONTROLLER( "CMccSymSubthreadClient::OpenL, new CMccSymUlStream" )
+        stream = CMccSymUlStream::NewLC( aStreamId, 
+                                         this, 
+                                         iMccResources, 
+                                         iMsrpmanager, 
+                                         aFourCC, 
+                                         aStreamType,
+                                         *iRtpMediaClock );
+        }
+    else if ( KMccDtmfStream == aStreamType && KMccRtpSourceUid == sourceType )
         {
         __SUBCONTROLLER( "CMccSymSubthreadClient::OpenL, new CMccDtmfDlStream" )
         
@@ -448,8 +493,15 @@
         iUnusedStreams.Remove( index );
         }
     
-    // No need to fail stream deletion if manager update fails
-    TRAP_IGNORE( iRtpmanager->UpdateL() )
+    if(this->iLinkType == KMccLinkMessage)
+        {
+        // NOP, MSRP sesssion will be deleted in destructor.
+        }
+    else
+        {
+        // No need to fail stream deletion if manager update fails
+        TRAP_IGNORE( iRtpmanager->UpdateL() )
+        }
         
 	__SUBCONTROLLER( "CMccSymSubthreadClient::CloseL, exit" )
     }
@@ -644,6 +696,34 @@
         }
 	__SUBCONTROLLER( "CMccSymSubthreadClient::SetRemoteRtcpAddrL, exit" )
     }
+
+
+// -----------------------------------------------------------------------------
+// CMccSymSubthreadClient::SetRemoteAddressL
+// Sets the remote address of uplink stream
+// -----------------------------------------------------------------------------
+void CMccSymSubthreadClient::SetRemoteMsrpPathL( TDes8& aRemoteMsrpPath, TDes8& aConnStatus )
+    {    
+    __SUBCONTROLLER( "CMccSymSubthreadClient::SetRemoteMsrpPathL" )
+    __ASSERT_ALWAYS( iMsrpmanager, User::Leave( KErrArgument ) );
+    
+    if (iFileShare )
+        {
+        iMsrpmanager->SetFileShareAttrbs(iFileName, iFileSize, iFileType, iFTProgressNotification);
+        }
+    if(this->iLinkType == KMccLinkMessage) 
+        { 
+        User::LeaveIfError( iMsrpmanager->SetRemoteMsrpPathL( aRemoteMsrpPath, aConnStatus )); 
+        }
+    
+    TInt strmCount = iStreams.Count();
+    for( TInt k = 0; k < strmCount; k++ )
+        {
+        iStreams[k]->ResetCountersL();
+        }
+    __SUBCONTROLLER( "CMccSymSubthreadClient::SetRemoteMsrpPathL, exit" )
+    }
+
     
 // -----------------------------------------------------------------------------
 // CMccSymSubthreadClient::InitializeLinkL
@@ -660,6 +740,31 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMccSymSubthreadClient::InitializeLinkL
+// Initializes the RTP session in the subthread
+// -----------------------------------------------------------------------------
+// 
+void CMccSymSubthreadClient::InitializeLinkL( TRequestStatus& aStatus,
+                                              TInt aIapId,
+                                              HBufC8*& aLocalMsrpPath)
+    {    
+    __SUBCONTROLLER( "CMccSymSubthreadClient::InitializeLinkL" )
+    __ASSERT_ALWAYS( !iSessionCreated, User::Leave( KErrAlreadyExists ) );
+    
+    //Create MSRP session
+    iMsrpmanager->iMsrpSession = iMsrpmanager->CreateMSRPSessionL(*iMsrpmanager->iMsrpObserver, aIapId);
+    
+    
+    iSessionCreated = ETrue;
+    
+    aLocalMsrpPath = iMsrpmanager->GetLocalMSRPPath().Alloc();
+    
+    TRequestStatus* status = &aStatus;
+    User::RequestComplete(status, KErrNone);
+    __SUBCONTROLLER( "CMccSymSubthreadClient::InitializeLinkL, exit" )
+    }
+
+// -----------------------------------------------------------------------------
 // CMccSymSubthreadClient::CreateRtpSessionL
 // Creates the RTP session in the subthread
 // -----------------------------------------------------------------------------
@@ -753,8 +858,14 @@
 void CMccSymSubthreadClient::GetLocalIpAddressesL( TMccCreateLink& aClientData )
 	{
 	__SUBCONTROLLER( "CMccSymSubthreadClient::GetLocalIpAddressesL" )
-	
-	iRtpmanager->GetLocalIpAddressesL( aClientData );
+	if(this->iLinkType == KMccLinkMessage)
+	    {
+	    iMsrpmanager->GetLocalIpAddressesL( aClientData );
+	    }
+	else
+	    {
+	    iRtpmanager->GetLocalIpAddressesL( aClientData );
+	    }
 	                                      
 	__SUBCONTROLLER( "CMccSymSubthreadClient::GetLocalIpAddressesL, exit" )
 	}
@@ -989,6 +1100,28 @@
         }
     return KErrNone;
     }
+
+// -----------------------------------------------------------------------------
+// CMccUlDlClient::SetFileShareAttrbs()
+// stores the File Sharing attributes
+// -----------------------------------------------------------------------------
+//
+void CMccSymSubthreadClient::SetFileSharingAttrbs(HBufC16* aFileName, 
+        TInt aFileSize, 
+        HBufC8* aFileType,
+        TBool aFTProgressNotification) 
+    {
+    __SUBCONTROLLER( "CMccSymSubthreadClient::SetFileSharingAttrbs Entry" )
+    iFileShare = ETrue; 
+    if (NULL!=aFileName )
+        iFileName = aFileName->Des().Alloc();
+    iFileSize = aFileSize;
+    if (NULL!=aFileType )
+        iFileType = aFileType->Des().Alloc();
+    iFTProgressNotification = aFTProgressNotification;
+    __SUBCONTROLLER( "CMccSymSubthreadClient::SetFileSharingAttrbs Exit" )
+    }
+
     
 // ========================== OTHER EXPORTED FUNCTIONS =========================
 
--- a/multimediacommscontroller/mmccsubcontroller/src/mccsymulstream.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mccsymulstream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -26,6 +26,7 @@
 #include "mcculdatapath.h"
 #include "mcccodecconfigurator.h"
 #include "mccrtpmanager.h"
+#include "mccmsrpmanager.h"
 #include "mccrtpdatasink.h"
 #include "mmccinterface.h"
 #include "mccsubcontrollerlogs.h"
@@ -81,6 +82,32 @@
     {
     iRtpMediaClock = &aClock;
     }
+    
+    
+// -----------------------------------------------------------------------------
+// CMccSymUlStream::CMccSymUlStream
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CMccSymUlStream::CMccSymUlStream( 
+    TUint32 aMccStreamId, 
+    MAsyncEventHandler* aEventhandler, 
+    MMccResources* aMccResources,
+    CMccMsrpManager* aManager, 
+    TFourCC aFourCC,
+    TInt aStreamType, 
+    CMccRtpMediaClock& aClock ) : 
+    CMccSymStreamBase( aMccStreamId, 
+                       aEventhandler, 
+                       aMccResources, 
+                       aManager, 
+                       aStreamType ), 
+    iFormatEncode( NULL ), 
+    iFourCC( aFourCC )
+    {
+    iRtpMediaClock = &aClock;
+    }
 
 // -----------------------------------------------------------------------------
 // CMccSymUlStream::NewL
@@ -109,6 +136,34 @@
     return s;
     }
 
+
+// -----------------------------------------------------------------------------
+// CMccSymUlStream::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CMccSymUlStream* CMccSymUlStream::NewLC( 
+    TUint32 aMccStreamId, 
+    MAsyncEventHandler* aEventhandler,
+    MMccResources* aMccResources,
+    CMccMsrpManager* aManager, 
+    TFourCC aFourCC,
+    TInt aStreamType,
+    CMccRtpMediaClock& aClock ) 
+    {
+    CMccSymUlStream* s = 
+            new ( ELeave ) CMccSymUlStream( aMccStreamId, 
+                                            aEventhandler, 
+                                            aMccResources,
+                                            aManager, 
+                                            aFourCC, 
+                                            aStreamType,
+                                            aClock );
+    CleanupStack::PushL( s );
+    s->ConstructL();
+    return s;
+    }
+
 // -----------------------------------------------------------------------------
 // CMccSymUlStream::ConstructL
 // Symbian 2nd phase constructor can leave.
@@ -388,10 +443,18 @@
 	
     TBool controlNetworkResources = SetStateL( EStatePrepared, aEndpointId );  
     
-    if ( controlNetworkResources && !LocalStream() )
+    if(this->iType == KMccMessageUplinkStream)
+        {
+        iMsrpmanager->CreateTransmitStreamL (*iDatasink, iCodecInfo);
+        }
+    else if ( controlNetworkResources && !LocalStream())
         {
         iRtpmanager->CreateTransmitStreamL( *iDatasink, iCodecInfo );
         }
+	else
+		{
+		//NOP
+		}
 
     LoadCodecL( iCodecInfo, KNullDesC8 );
         
@@ -415,7 +478,7 @@
 	
     TBool controlNetworkResources = SetStateL( EStateStreaming, aEndpointId );
     
-    if ( !LocalStream() )
+    if ( !LocalStream() && (this->iType !=KMccMessageUplinkStream))
         {
         if ( controlNetworkResources )
             {
@@ -445,11 +508,13 @@
 							  TBool aEnableRtcp )
     {
     __SUBCONTROLLER( "CMccSymUlStream::PauseL" )
-    
+        
     SetStateL( EStatePaused, aEndpointId );
-    
-    if ( !LocalStream() )
-        { 
+    if(this->iType != KMccMessageUplinkStream && !LocalStream())
+        {
+        __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
+        __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
+        
         User::LeaveIfError( iRtpmanager->SetRTCPSendReceive( aEnableRtcp ) );
         }
     
@@ -469,12 +534,16 @@
     __SUBCONTROLLER( "CMccSymUlStream::ResumeL" )
     
     SetStateL( EStateStreaming, aEndpointId );
-    
-    if ( !LocalStream() )
+    if (this->iType != KMccMessageUplinkStream &&  !LocalStream() )
         { 
+        __ASSERT_ALWAYS( iRtpmanager, User::Leave( KErrArgument ) );
+        __ASSERT_ALWAYS( iDatapath, User::Leave( KErrArgument ) );
         User::LeaveIfError( iRtpmanager->SetRTCPSendReceive( aEnableRtcp ) );
         }
-    
+    else
+        {
+        //NOP
+        }
     DoResumeL();
 
     InformStreamStateChange( KMccStreamResumed, aEndpointId );
--- a/multimediacommscontroller/mmccsubcontroller/src/mcculdlclient.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommscontroller/mmccsubcontroller/src/mcculdlclient.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -29,6 +29,7 @@
 #include "mccsubcontrollerlogs.h"
 #include "mccrtpmediaclock.h"
 #include "mmccsecureinterface.h"
+#include "mccmsrpmanager.h"
 
 
 // EXTERNAL DATA STRUCTURES
@@ -63,6 +64,7 @@
                                 iMccEventHandler( aMccEventHandler ),
                                 iMccResources( aMccResources )
     {
+    iIsMsrpSessionCreated = EFalse;
     }
 
 // -----------------------------------------------------------------------------
@@ -75,7 +77,9 @@
     User::LeaveIfNull( iMccEventHandler );
     User::LeaveIfNull( iMccResources );
     iRtpMediaClock = CMccRtpMediaClock::NewL();
-    
+    iFileShare = EFalse;
+    iFileName = NULL;
+    iFileType = NULL;
 	__SUBCONTROLLER( "CMccUlDlClient::ConstructL, exit" )
     }   
 
@@ -108,7 +112,10 @@
     iClientArray.ResetAndDestroy();
     iClientArray.Close();
     
+    delete iFileName;
+    delete iFileType;
     delete iRtpMediaClock;
+    delete iMSRP;
 
 	__SUBCONTROLLER( "CMccUlDlClient::~CMccUlDlClient, exit" )
     }
@@ -512,6 +519,30 @@
             break;
             }
 
+        case KMccLinkMessage:
+            {
+            CMccSymSubthreadClient* symClient = 
+                            CMccSymSubthreadClient::NewL( this, iMccResources, aType, iSessionId );
+
+            err = StoreLink( symClient ); // Writing data to client, here we can write msrplocal path to iClientData and can send to client.
+            if ( err == KErrNone )
+                {
+                aLinkId = reinterpret_cast<TUint32>( symClient );
+                symClient->SetLinkId( aLinkId );  
+                }
+            else
+                {
+                delete symClient;
+                }
+            if (iMSRP == NULL )
+                {
+                TUid uid = {0x123456};
+                iMSRP = CMSRP::NewL(uid);
+                }
+            symClient->SetMsrpObject(iMSRP);
+            break;
+            }
+
         case KMccLinkLocal:
             {
             CMccSymSubthreadClient* symClient = 
@@ -575,6 +606,48 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMccUlDlClient::InitializeLinkL
+// Initializes ul and dl links, 2nd step in link creation - MSRP
+// -----------------------------------------------------------------------------
+// 
+
+
+EXPORT_C void CMccUlDlClient::InitializeLinkL( TRequestStatus& aStatus,
+                                       TUint32 aLinkId,
+                                       TInt aIapId,
+                                       HBufC8* &aLocalMsrpPath)
+    {
+    __SUBCONTROLLER( "CMccUlDlClient::InitializeLinkL" )
+    iLinkCount++;
+    TInt link = FindLinkL( aLinkId );
+    if(!iIsMsrpSessionCreated)
+        {
+        // Creates MSRP session and gets LocalMsrpPath
+        iClientArray[link]->InitializeLinkL( aStatus, aIapId, aLocalMsrpPath );
+        iIsMsrpSessionCreated = ETrue;
+        }
+    else
+        {
+        for ( TInt i = 0;  i < iClientArray.Count() ; i++ )
+            {
+            if (iClientArray[i]->GetLinkType() == KMccLinkMessage && i!= link)
+                {
+            
+                iClientArray[link]->iMsrpmanager->iMsrpSession =
+                        iClientArray[i]->iMsrpmanager->iMsrpSession;
+            
+                delete iClientArray[link]->iMsrpmanager->iMsrpObserver;
+                iClientArray[link]->iMsrpmanager->iMsrpObserver = 
+                        iClientArray[i]->iMsrpmanager->iMsrpObserver ;
+                break;
+                }
+            }
+        TRequestStatus* status = &aStatus;
+        User::RequestComplete(status, KErrNone);
+        }
+    }
+
+// -----------------------------------------------------------------------------
 // CMccUlDlClient::CreateRtpSessionL
 // Creates RTP session, 3rd step in link creation
 // -----------------------------------------------------------------------------
@@ -604,6 +677,20 @@
 	__SUBCONTROLLER( "CMccUlDlClient::CloseLinkL" )
 	__SUBCONTROLLER_INT1( "CMccUlDlClient linkid",  aLinkId )
     TInt arrayId = FindLinkL( aLinkId );
+	
+	if (iClientArray[arrayId]->GetLinkType() == KMccLinkMessage )
+	    {
+        // trace through links to check there is no message link exists
+	    for ( TInt i = 0;  i < iClientArray.Count() ; i++ )
+	        {
+	        if (iClientArray[i]->GetLinkType() == KMccLinkMessage && i!= arrayId)
+	            {
+                iClientArray[i]->iMsrpmanager->iMsrpObserver = NULL;
+                iClientArray[i]->iMsrpmanager->iMsrpSession = NULL;
+                break;
+	            }
+	        }
+	    }
     CMccSubThreadClientBase* temp = iClientArray[arrayId];    
     iClientArray[arrayId]->CloseL();
     iClientArray.Remove( arrayId );
@@ -645,6 +732,24 @@
     iClientArray[ind]->SetRemoteRtcpAddrL( aRemAddr );
 	__SUBCONTROLLER( "CMccUlDlClient::SetRemoteRtcpAddrL, exit" )
     }
+
+// -----------------------------------------------------------------------------
+// CMccUlSubThreadClient::SetRemoteMsrpPathL
+// Sets the remote msrp path for uplink stream
+// -----------------------------------------------------------------------------
+EXPORT_C void CMccUlDlClient::SetRemoteMsrpPathL( TDes8& aRemMsrpPath,
+                                                  TDes8& aConnStatus, TUint32 aLinkId ) 
+    {
+    __SUBCONTROLLER( "CMccUlDlClient::SetRemoteMsrpPathL" )
+    __SUBCONTROLLER_INT1( "CMccUlDlClient linkid",  aLinkId )
+    TInt ind = FindLinkL( aLinkId );
+    if (iFileShare )
+        {
+        iClientArray[ind]->SetFileSharingAttrbs(iFileName, iFileSize, iFileType,iFTProgressNotification);
+        }
+    iClientArray[ind]->SetRemoteMsrpPathL( aRemMsrpPath, aConnStatus );
+    __SUBCONTROLLER( "CMccUlDlClient::SetRemoteMsrpPathL, exit" )
+    }
     
 // -----------------------------------------------------------------------------
 // CMccUlDlClient::GetCodecDefaultsL
@@ -990,6 +1095,29 @@
     return err;
     }
 
+
+// -----------------------------------------------------------------------------
+// CMccUlDlClient::SetFileShareAttrbs()
+// stores the File Sharing attributes
+// -----------------------------------------------------------------------------
+//
+void CMccUlDlClient::SetFileShareAttrbs(HBufC16* aFileName, 
+        TInt aFileSize, 
+        HBufC8* aFileType,
+        TBool aFTProgressNotification) 
+    {
+    __SUBCONTROLLER( "CMccUlDlClient::SetFileShareAttrbs, IN ")
+    iFileShare = ETrue; 
+    if ( NULL != aFileName)
+        iFileName = aFileName->Des().Alloc();
+    iFileSize = aFileSize;
+    if (NULL!=aFileType)
+        iFileType = aFileType->Des().Alloc();
+    iFTProgressNotification = aFTProgressNotification;
+    
+    __SUBCONTROLLER( "CMccUlDlClient::SetFileShareAttrbs, OUT")
+    }
+
 // -----------------------------------------------------------------------------
 // CMccUlDlClient::BindContextIntoStreamL()
 // -----------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommscontroller/mmccsubcontroller/src/msrpcallbackmgrobserver.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,197 @@
+/*
+* Copyright (c) 2004-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:    UL/DL Session abstraction for Mcc Subthread clients
+*
+*/
+
+// INCLUDE FILES
+#include "msrpcallbackmgrobserver.h"
+#include "mccsubcontrollerlogs.h"
+#include <e32base.h>
+#include "mccinternalevents.h"
+#include "mmcccodecinformation.h"
+
+CMsrpCallbackMgrObserver* CMsrpCallbackMgrObserver::NewL(MAsyncEventHandler& aEventHandler)
+	{
+    CMsrpCallbackMgrObserver* self = new(ELeave) CMsrpCallbackMgrObserver(aEventHandler);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+	}
+
+
+void CMsrpCallbackMgrObserver::ConstructL()
+    {
+    
+    }
+
+
+CMsrpCallbackMgrObserver::CMsrpCallbackMgrObserver(
+    MAsyncEventHandler& aEventHandler) : 
+    iEventHandler( aEventHandler )
+    {
+    iDataObserver = NULL;
+    iConnObserver = NULL;
+    }
+
+// ============================= LOCAL FUNCTIONS ===============================
+
+void CMsrpCallbackMgrObserver::IncomingMessage( HBufC8* aMessageContent, TInt aStatus )
+    {
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::IncomingMessage" )
+    
+    if(iDataObserver)
+        {
+        iDataObserver->IncomingMessage(aMessageContent,aStatus);
+        }
+    }
+    
+void CMsrpCallbackMgrObserver::IncomingReport( TInt aStatus, TInt aRangeStart,
+                                           TInt aRangeEnd, TInt aTotal )
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::IncomingReport" )
+            
+    if(iDataObserver)
+        {
+        iDataObserver->IncomingReport( aStatus, aRangeStart, aRangeEnd,  aTotal );
+        }
+	}
+    
+void CMsrpCallbackMgrObserver::SendResult( TInt aStatus, const TDesC8& aMessageid )
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::SendResult" )
+            
+    if(iDataObserver)
+        {
+        iDataObserver->SendResult(aStatus, aMessageid );
+        }
+	}
+    
+void CMsrpCallbackMgrObserver::ListenPortFailure( TInt aStatus )
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::ListenPortFailure" )
+            
+    if(iDataObserver)
+        {
+        iDataObserver->ListenPortFailure(aStatus);
+        }
+	}
+    
+void CMsrpCallbackMgrObserver::ConnectStatus( TInt aStatus )
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::ConnectStatus" )
+            
+    if(iConnObserver)    
+        {
+        iConnObserver->ConnectStatus(aStatus);
+        }
+	}
+		
+void CMsrpCallbackMgrObserver::RegisterConnectionObserver (MMsrpConnectionObserver& aObserver)
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::RegisterConnectionObserver" )
+	iConnObserver = &aObserver;
+	}
+		
+		
+void CMsrpCallbackMgrObserver::RegisterDataObserver (MMsrpDataObserver& aObserver)
+	{
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::RegisterDataObserver" )
+	iDataObserver = &aObserver;
+	}
+
+//
+//
+//
+void CMsrpCallbackMgrObserver::SendFileNotification(TBool aStatus)
+    {
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::SendFileNotification : Entry" )
+    iMccEvent = TMccEvent();
+    
+    iMccEvent.iEndpointId = KErrNone;
+    iMccEvent.iEventCategory = 0;
+    iMccEvent.iEventType = KMccFileSendCompleted;
+    iMccEvent.iErrorCode = (TInt)aStatus;
+    iMccEvent.iEventNumData = 0;
+    
+    TMccInternalEvent internalEvent( KUidMediaTypeMessage, 
+                                             EMccInternalEventNone,
+                                             iMccEvent );
+    iEventHandler.SendEventToClient(internalEvent);
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::SendFileNotification : Exit" )
+    }
+
+/* Notifies that the entire file has been received successfully */
+void CMsrpCallbackMgrObserver::ReceiveFileNotification(TBool status)
+    {
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::ReceiveFileNotification : Entry" )
+    iMccEvent = TMccEvent();
+    
+    iMccEvent.iEndpointId = KErrNone;
+    iMccEvent.iEventCategory = 0;
+    iMccEvent.iEventType = KMccFileReceiveCompleted;
+    iMccEvent.iErrorCode = (TInt)status;
+    iMccEvent.iEventNumData = 0;
+    
+    TMccInternalEvent internalEvent( KUidMediaTypeMessage, 
+                                             EMccInternalEventNone,
+                                             iMccEvent );
+    iEventHandler.SendEventToClient(internalEvent);
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::ReceiveFileNotification : Exit" )
+    }
+/**
+* File data transfer progress. returns the progress of data transfer
+* @param aTransferred number of bytes transferred
+* @param aTotal Total amount of bytes to be transferred
+*/
+void CMsrpCallbackMgrObserver::FileSendProgress( TInt aTransferred, TInt aTotal )
+    {
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::FileSendProgress : Entry" )
+    iMccEvent = TMccEvent();
+    
+    iMccEvent.iEndpointId = KErrNone;
+    iMccEvent.iEventCategory = 0;
+    iMccEvent.iEventType = KMccFileSendProgressNotification;
+    iMccEvent.iErrorCode = (TInt)aTransferred;
+    iMccEvent.iEventNumData = aTotal;
+    
+    TMccInternalEvent internalEvent( KUidMediaTypeMessage, 
+                                             EMccInternalEventNone,
+                                             iMccEvent );
+    iEventHandler.SendEventToClient(internalEvent);
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::FileSendProgress : Exit" )
+    
+    }
+
+/**
+* File receive progress, number of bytes received from incoming data
+* @param aReceived number of bytes received
+* @param aTotal Total amount of bytes to be received
+*/
+void CMsrpCallbackMgrObserver::FileReceiveProgress( TInt aReceived, TInt aTotal )
+    {
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::FileReceiveProgress : Entry" )
+    iMccEvent = TMccEvent();
+    
+    iMccEvent.iEndpointId = KErrNone;
+    iMccEvent.iEventCategory = 0;
+    iMccEvent.iEventType = KMccFileReceiveProgressNotification;
+    iMccEvent.iErrorCode = (TInt)aReceived;
+    iMccEvent.iEventNumData = aTotal;
+    
+    TMccInternalEvent internalEvent( KUidMediaTypeMessage, EMccInternalEventNone, iMccEvent );
+    iEventHandler.SendEventToClient(internalEvent);
+    __SUBCONTROLLER( "CMsrpCallbackMgrObserver::FileReceiveProgress : Exit" )
+    }
--- a/multimediacommsengine/mmcecli/bwins/mceclientU.DEF	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/bwins/mceclientU.DEF	Mon Sep 06 17:32:13 2010 +0530
@@ -1,391 +1,475 @@
-EXPORTS
-	?VolumeL@CMceSpeakerSink@@QBEHXZ @ 1 NONAME ; int CMceSpeakerSink::VolumeL(void) const
-	?TranscodeL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 2 NONAME ; void CMceFileSource::TranscodeL(class TBuf<256> const &)
-	?SetPreferredEncodingDecodingDeviceL@CMceAvcCodec@@UAEXVTUid@@@Z @ 3 NONAME ; void CMceAvcCodec::SetPreferredEncodingDecodingDeviceL(class TUid)
-	?RejectL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 4 NONAME ; void CMceInSession::RejectL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?CloneL@CMceCnCodec@@UBEPAVCMceAudioCodec@@XZ @ 5 NONAME ; class CMceAudioCodec * CMceCnCodec::CloneL(void) const
-	??1CMceStreamBundle@@UAE@XZ @ 6 NONAME ; CMceStreamBundle::~CMceStreamBundle(void)
-	?SetPayloadType@CMceDtmfCodec@@UAEHE@Z @ 7 NONAME ; int CMceDtmfCodec::SetPayloadType(unsigned char)
-	?KeepAliveData@CMceCodec@@QBEABVTDesC8@@XZ @ 8 NONAME ; class TDesC8 const & CMceCodec::KeepAliveData(void) const
-	?IsSsrcEnabledL@CMceRtpSource@@QAEHI@Z @ 9 NONAME ; int CMceRtpSource::IsSsrcEnabledL(unsigned int)
-	?GetCameraInfo@CMceCameraSource@@QBEXAAVTCameraInfo@@@Z @ 10 NONAME ; void CMceCameraSource::GetCameraInfo(class TCameraInfo &) const
-	??1CMceSpeakerSink@@UAE@XZ @ 11 NONAME ; CMceSpeakerSink::~CMceSpeakerSink(void)
-	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceRefer@@@Z @ 12 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceRefer &)
-	?SetPayloadType@CMceG711Codec@@UAEHE@Z @ 13 NONAME ; int CMceG711Codec::SetPayloadType(unsigned char)
-	?SetLocalMediaPortL@CMceMediaStream@@QAEXI@Z @ 14 NONAME ; void CMceMediaStream::SetLocalMediaPortL(unsigned int)
-	?CloneL@CMceDtmfCodec@@UBEPAVCMceAudioCodec@@XZ @ 15 NONAME ; class CMceAudioCodec * CMceDtmfCodec::CloneL(void) const
-	?NewLC@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 16 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewLC(enum CMceStreamBundle::TMceStreamBundleType)
-	?AssociatedRefersL@CMceEvent@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 17 NONAME ; class RPointerArray<class CMceRefer> * CMceEvent::AssociatedRefersL(void) const
-	?SetMaxPTime@CMceiLBCCodec@@UAEHI@Z @ 18 NONAME ; int CMceiLBCCodec::SetMaxPTime(unsigned int)
-	?AssociatedEventsL@CMceSession@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 19 NONAME ; class RPointerArray<class CMceEvent> * CMceSession::AssociatedEventsL(void) const
-	?UpdateL@CMceRtpSource@@QAEXIIKPAVHBufC8@@@Z @ 20 NONAME ; void CMceRtpSource::UpdateL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	?NewL@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 21 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewL(class CMceManager &)
-	?SetPreferredEncodingDecodingDeviceL@CMceH263Codec@@UAEXVTUid@@@Z @ 22 NONAME ; void CMceH263Codec::SetPreferredEncodingDecodingDeviceL(class TUid)
-	?SetAllowedBitrates@CMceAmrCodec@@UAEHI@Z @ 23 NONAME ; int CMceAmrCodec::SetAllowedBitrates(unsigned int)
-	?Bundles@CMceSession@@QBEABV?$RPointerArray@VCMceStreamBundle@@@@XZ @ 24 NONAME ; class RPointerArray<class CMceStreamBundle> const & CMceSession::Bundles(void) const
-	?DisableL@CMceFileSink@@UAEXXZ @ 25 NONAME ; void CMceFileSink::DisableL(void)
-	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceEvent@@@Z @ 26 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceEvent &)
-	?AllowedResolutions@CMceVideoCodec@@QBEIXZ @ 27 NONAME ; unsigned int CMceVideoCodec::AllowedResolutions(void) const
-	?SetAllowedBitrates@CMceDtmfCodec@@UAEHI@Z @ 28 NONAME ; int CMceDtmfCodec::SetAllowedBitrates(unsigned int)
-	?NotifyL@CMceInEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 29 NONAME ; void CMceInEvent::NotifyL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?DisplaysAvailable@CMceDisplaySink@@QBEHXZ @ 30 NONAME ; int CMceDisplaySink::DisplaysAvailable(void) const
-	?SetConfigKeyL@CMceH263Codec@@UAEXABVTDesC8@@@Z @ 31 NONAME ; void CMceH263Codec::SetConfigKeyL(class TDesC8 const &)
-	?LastPacket@CMceRtpSink@@QBEKXZ @ 32 NONAME ; unsigned long CMceRtpSink::LastPacket(void) const
-	?NewLC@CMceAudioStream@@SAPAV1@XZ @ 33 NONAME ; class CMceAudioStream * CMceAudioStream::NewLC(void)
-	?Type@CMceMediaSource@@QBEIXZ @ 34 NONAME ; unsigned int CMceMediaSource::Type(void) const
-	?NewLC@CMceSpeakerSink@@SAPAV1@XZ @ 35 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewLC(void)
-	?UpdateL@CMceFcMsgExchange@@QAEXAAVCMceSession@@PAVCDesC8Array@@@Z @ 36 NONAME ; void CMceFcMsgExchange::UpdateL(class CMceSession &, class CDesC8Array *)
-	?RemoveStreamL@CMceSession@@QAEXAAVCMceMediaStream@@@Z @ 37 NONAME ; void CMceSession::RemoveStreamL(class CMceMediaStream &)
-	?ReplaceCodecsL@CMceAudioStream@@QAEXPAV?$RPointerArray@VCMceAudioCodec@@@@@Z @ 38 NONAME ; void CMceAudioStream::ReplaceCodecsL(class RPointerArray<class CMceAudioCodec> *)
-	?Type@CMceMediaSink@@QBEIXZ @ 39 NONAME ; unsigned int CMceMediaSink::Type(void) const
-	?SetAllowedBitrates@CMceG711Codec@@UAEHI@Z @ 40 NONAME ; int CMceG711Codec::SetAllowedBitrates(unsigned int)
-	?UpdateL@CMceRtpSink@@QAEXHPAVHBufC8@@@Z @ 41 NONAME ; void CMceRtpSink::UpdateL(int, class HBufC8 *)
-	?SetInEventObserver@CMceManager@@QAEXPAVMMceInEventObserver@@@Z @ 42 NONAME ; void CMceManager::SetInEventObserver(class MMceInEventObserver *)
-	?NewL@CMceOutEvent@@SAPAV1@AAVCMceSession@@ABVTDesC8@@K@Z @ 43 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceSession &, class TDesC8 const &, unsigned long)
-	?SetRtpObserver@CMceManager@@QAEXPAVMMceRtpObserver@@@Z @ 44 NONAME ; void CMceManager::SetRtpObserver(class MMceRtpObserver *)
-	?SetFrameRateL@CMceH263Codec@@UAEXN@Z @ 45 NONAME ; void CMceH263Codec::SetFrameRateL(double)
-	?SetTransactionObserver@CMceManager@@QAEXPAVMMceTransactionObserver@@@Z @ 46 NONAME ; void CMceManager::SetTransactionObserver(class MMceTransactionObserver *)
-	?SetMaxPTime@CMceG729Codec@@UAEHI@Z @ 47 NONAME ; int CMceG729Codec::SetMaxPTime(unsigned int)
-	?Recipient@CMceSession@@QBEABVTDesC8@@XZ @ 48 NONAME ; class TDesC8 const & CMceSession::Recipient(void) const
-	?GetModifierL@CMceSession@@QBEXKAAI@Z @ 49 NONAME ; void CMceSession::GetModifierL(unsigned long, unsigned int &) const
-	?DisableL@CMceCameraSource@@UAEXXZ @ 50 NONAME ; void CMceCameraSource::DisableL(void)
-	?SubscribeL@CMceOutEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 51 NONAME ; void CMceOutEvent::SubscribeL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?CurrentMediaElement@CMceFileSource@@QAEHI@Z @ 52 NONAME ; int CMceFileSource::CurrentMediaElement(unsigned int)
-	?ControlPathSecurityLevel@CMceSession@@QBE?AW4TControlPathSecurityLevel@1@XZ @ 53 NONAME ; enum CMceSession::TControlPathSecurityLevel CMceSession::ControlPathSecurityLevel(void) const
-	?RingL@CMceInSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 54 NONAME ; void CMceInSession::RingL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?ReplaceCodecsL@CMceVideoStream@@QAEXPAV?$RPointerArray@VCMceVideoCodec@@@@@Z @ 55 NONAME ; void CMceVideoStream::ReplaceCodecsL(class RPointerArray<class CMceVideoCodec> *)
-	?SetPTime@CMceRedCodec@@UAEHI@Z @ 56 NONAME ; int CMceRedCodec::SetPTime(unsigned int)
-	?SetExposureL@CMceCameraSource@@QAEXW4TExposure@CCamera@@@Z @ 57 NONAME ; void CMceCameraSource::SetExposureL(enum CCamera::TExposure)
-	?NewL@CMceOutEvent@@SAPAV1@AAVCMceRefer@@ABVTDesC8@@K@Z @ 58 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceRefer &, class TDesC8 const &, unsigned long)
-	?Type@CMceRefer@@QBE?AW4TType@1@XZ @ 59 NONAME ; enum CMceRefer::TType CMceRefer::Type(void) const
-	?GetContentType@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 60 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContentType(void)
-	?EnableVAD@CMceAmrCodec@@UAEHH@Z @ 61 NONAME ; int CMceAmrCodec::EnableVAD(int)
-	?AcceptL@CMceInEvent@@QAEXXZ @ 62 NONAME ; void CMceInEvent::AcceptL(void)
-	?SetCodecMode@CMceiLBCCodec@@UAEHI@Z @ 63 NONAME ; int CMceiLBCCodec::SetCodecMode(unsigned int)
-	?RejectL@CMceInEvent@@QAEXXZ @ 64 NONAME ; void CMceInEvent::RejectL(void)
-	?ReferL@CMceOutRefer@@QAEPAVCMceOutEvent@@PAVCDesC8Array@@PAVHBufC8@@1@Z @ 65 NONAME ; class CMceOutEvent * CMceOutRefer::ReferL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?NewL@CMceOutRefer@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@2W4TType@CMceRefer@@PAVHBufC8@@@Z @ 66 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class TDesC8 const &, enum CMceRefer::TType, class HBufC8 *)
-	?NewLC@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 67 NONAME ; class CMceRtpSource * CMceRtpSource::NewLC(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	??1CMceDtmfCodec@@UAE@XZ @ 68 NONAME ; CMceDtmfCodec::~CMceDtmfCodec(void)
-	?AddStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 69 NONAME ; void CMceStreamBundle::AddStreamL(class CMceMediaStream &)
-	?NewL@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 70 NONAME ; class CMceFileSink * CMceFileSink::NewL(class TBuf<256> const &)
-	?CloneL@CMceAmrWbCodec@@UBEPAVCMceAudioCodec@@XZ @ 71 NONAME ; class CMceAudioCodec * CMceAmrWbCodec::CloneL(void) const
-	?SetPTime@CMceDtmfCodec@@UAEHI@Z @ 72 NONAME ; int CMceDtmfCodec::SetPTime(unsigned int)
-	?NewLC@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 73 NONAME ; class CMceFileSource * CMceFileSource::NewLC(class CMceManager &, class TBuf<256> const &)
-	??1CMceiLBCCodec@@UAE@XZ @ 74 NONAME ; CMceiLBCCodec::~CMceiLBCCodec(void)
-	?RejectL@CMceInSession@@QAEXXZ @ 75 NONAME ; void CMceInSession::RejectL(void)
-	?AssociatedSession@CMceRefer@@QBEPAVCMceSession@@XZ @ 76 NONAME ; class CMceSession * CMceRefer::AssociatedSession(void) const
-	?SetModifierL@CMceSession@@QAEXKI@Z @ 77 NONAME ; void CMceSession::SetModifierL(unsigned long, unsigned int)
-	?SetMMFPriorityPreferenceL@CMceCodec@@QAEXH@Z @ 78 NONAME ; void CMceCodec::SetMMFPriorityPreferenceL(int)
-	?SetAllowedResolutionsL@CMceAvcCodec@@UAEXI@Z @ 79 NONAME ; void CMceAvcCodec::SetAllowedResolutionsL(unsigned int)
-	?State@CMceSession@@QBE?AW4TState@1@XZ @ 80 NONAME ; enum CMceSession::TState CMceSession::State(void) const
-	?SetPTime@CMceG711Codec@@UAEHI@Z @ 81 NONAME ; int CMceG711Codec::SetPTime(unsigned int)
-	?SetMaxBitrateL@CMceH263Codec@@UAEXI@Z @ 82 NONAME ; void CMceH263Codec::SetMaxBitrateL(unsigned int)
-	?SetInTransactionObserver@CMceManager@@QAEXPAVMMceInTransactionObserver@@@Z @ 83 NONAME ; void CMceManager::SetInTransactionObserver(class MMceInTransactionObserver *)
-	?Events@CMceManager@@QBEABV?$RPointerArray@VCMceEvent@@@@XZ @ 84 NONAME ; class RPointerArray<class CMceEvent> const & CMceManager::Events(void) const
-	?CloneL@CMceH263Codec@@UBEPAVCMceVideoCodec@@XZ @ 85 NONAME ; class CMceVideoCodec * CMceH263Codec::CloneL(void) const
-	?MaxBitRate@CMceVideoCodec@@QBEIXZ @ 86 NONAME ; unsigned int CMceVideoCodec::MaxBitRate(void) const
-	?SetPayloadType@CMceCnCodec@@UAEHE@Z @ 87 NONAME ; int CMceCnCodec::SetPayloadType(unsigned char)
-	?SetCurrentMediaElementL@CMceFileSource@@QAEXIH@Z @ 88 NONAME ; void CMceFileSource::SetCurrentMediaElementL(unsigned int, int)
-	?SetCodecMode@CMceG729Codec@@UAEHI@Z @ 89 NONAME ; int CMceG729Codec::SetCodecMode(unsigned int)
-	??1CMceH263Codec@@UAE@XZ @ 90 NONAME ; CMceH263Codec::~CMceH263Codec(void)
-	?EnableVAD@CMceiLBCCodec@@UAEHH@Z @ 91 NONAME ; int CMceiLBCCodec::EnableVAD(int)
-	?SetBitrate@CMceAvcCodec@@UAEHI@Z @ 92 NONAME ; int CMceAvcCodec::SetBitrate(unsigned int)
-	?Ssrc@CMceRtpSource@@QBEKXZ @ 93 NONAME ; unsigned long CMceRtpSource::Ssrc(void) const
-	?Streams@CMceStreamBundle@@QAEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 94 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceStreamBundle::Streams(void)
-	?SendRRL@CMceRtpSource@@QAEXXZ @ 95 NONAME ; void CMceRtpSource::SendRRL(void)
-	?NewLC@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 96 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewLC(class CMceManager &)
-	?NewL@CMceOutEvent@@SAPAV1@AAVCMceEvent@@ABVTDesC8@@K@Z @ 97 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceEvent &, class TDesC8 const &, unsigned long)
-	??1CMceRtpSink@@UAE@XZ @ 98 NONAME ; CMceRtpSink::~CMceRtpSink(void)
-	?SetWhiteBalanceL@CMceCameraSource@@QAEXW4TWhiteBalance@CCamera@@@Z @ 99 NONAME ; void CMceCameraSource::SetWhiteBalanceL(enum CCamera::TWhiteBalance)
-	?SupportedVideoCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 100 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceManager::SupportedVideoCodecs(void) const
-	?MediaAttributeLinesL@CMceMediaStream@@QAEPAVMDesC8Array@@XZ @ 101 NONAME ; class MDesC8Array * CMceMediaStream::MediaAttributeLinesL(void)
-	?NewL@CMceOutRefer@@SAPAV1@AAVCMceSession@@ABVTDesC8@@W4TType@CMceRefer@@@Z @ 102 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceSession &, class TDesC8 const &, enum CMceRefer::TType)
-	?ZoomFactorL@CMceCameraSource@@QAEHXZ @ 103 NONAME ; int CMceCameraSource::ZoomFactorL(void)
-	?SetPayloadType@CMceiLBCCodec@@UAEHE@Z @ 104 NONAME ; int CMceiLBCCodec::SetPayloadType(unsigned char)
-	?EnableVAD@CMceCnCodec@@UAEHH@Z @ 105 NONAME ; int CMceCnCodec::EnableVAD(int)
-	?RemoveBundleL@CMceSession@@QAEXAAVCMceStreamBundle@@@Z @ 106 NONAME ; void CMceSession::RemoveBundleL(class CMceStreamBundle &)
-	?Type@CMceCodec@@QBEIXZ @ 107 NONAME ; unsigned int CMceCodec::Type(void) const
-	?SetSamplingFreq@CMceDtmfCodec@@UAEHI@Z @ 108 NONAME ; int CMceDtmfCodec::SetSamplingFreq(unsigned int)
-	?SetRoutingL@CMceSpeakerSink@@QAEXH@Z @ 109 NONAME ; void CMceSpeakerSink::SetRoutingL(int)
-	?SetMediaAttributeLinesL@CMceMediaStream@@QAEXPAVCDesC8Array@@@Z @ 110 NONAME ; void CMceMediaStream::SetMediaAttributeLinesL(class CDesC8Array *)
-	??1CMceG729Codec@@UAE@XZ @ 111 NONAME ; CMceG729Codec::~CMceG729Codec(void)
-	?RemoveStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 112 NONAME ; void CMceStreamBundle::RemoveStreamL(class CMceMediaStream &)
-	?SetRotationL@CMceDisplaySink@@QAEXW4TRotation@1@@Z @ 113 NONAME ; void CMceDisplaySink::SetRotationL(enum CMceDisplaySink::TRotation)
-	?SetCodecMode@CMceAvcCodec@@UAEHI@Z @ 114 NONAME ; int CMceAvcCodec::SetCodecMode(unsigned int)
-	?SessionTimer@CMceSession@@QBEKXZ @ 115 NONAME ; unsigned long CMceSession::SessionTimer(void) const
-	?CloneL@CMceRedCodec@@UBEPAVCMceAudioCodec@@XZ @ 116 NONAME ; class CMceAudioCodec * CMceRedCodec::CloneL(void) const
-	?FrameSize@CMceCodec@@QBEIXZ @ 117 NONAME ; unsigned int CMceCodec::FrameSize(void) const
-	?NewLC@CMceVideoStream@@SAPAV1@XZ @ 118 NONAME ; class CMceVideoStream * CMceVideoStream::NewLC(void)
-	?SetSamplingFreq@CMceG711Codec@@UAEHI@Z @ 119 NONAME ; int CMceG711Codec::SetSamplingFreq(unsigned int)
-	?EnableL@CMceSpeakerSink@@UAEXXZ @ 120 NONAME ; void CMceSpeakerSink::EnableL(void)
-	?EnableVAD@CMceG729Codec@@UAEHH@Z @ 121 NONAME ; int CMceG729Codec::EnableVAD(int)
-	?Profile@CMceSession@@QBEKXZ @ 122 NONAME ; unsigned long CMceSession::Profile(void) const
-	??1CMceRedCodec@@UAE@XZ @ 123 NONAME ; CMceRedCodec::~CMceRedCodec(void)
-	?SetAllowedBitrates@CMceiLBCCodec@@UAEHI@Z @ 124 NONAME ; int CMceiLBCCodec::SetAllowedBitrates(unsigned int)
-	??1CMceInRefer@@UAE@XZ @ 125 NONAME ; CMceInRefer::~CMceInRefer(void)
-	?TranscodingProgressL@CMceFileSource@@QBEHXZ @ 126 NONAME ; int CMceFileSource::TranscodingProgressL(void) const
-	?RemoveSinkL@CMceMediaStream@@QAEXAAVCMceMediaSink@@@Z @ 127 NONAME ; void CMceMediaStream::RemoveSinkL(class CMceMediaSink &)
-	?BoundStream@CMceMediaStream@@QBEHXZ @ 128 NONAME ; int CMceMediaStream::BoundStream(void) const
-	?State@CMceEvent@@QBE?AW4TState@1@XZ @ 129 NONAME ; enum CMceEvent::TState CMceEvent::State(void) const
-	??1CMceCameraSource@@UAE@XZ @ 130 NONAME ; CMceCameraSource::~CMceCameraSource(void)
-	?SetPositionL@CMceFileSource@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 131 NONAME ; void CMceFileSource::SetPositionL(class TTimeIntervalMicroSeconds const &)
-	?SetSamplingFreq@CMceAmrCodec@@UAEHI@Z @ 132 NONAME ; int CMceAmrCodec::SetSamplingFreq(unsigned int)
-	?SetPayloadType@CMceG729Codec@@UAEHE@Z @ 133 NONAME ; int CMceG729Codec::SetPayloadType(unsigned char)
-	?SetMaxBitrateL@CMceAvcCodec@@UAEXI@Z @ 134 NONAME ; void CMceAvcCodec::SetMaxBitrateL(unsigned int)
-	?DisableL@CMceSpeakerSink@@UAEXXZ @ 135 NONAME ; void CMceSpeakerSink::DisableL(void)
-	?SetVolumeL@CMceSpeakerSink@@QAEXH@Z @ 136 NONAME ; void CMceSpeakerSink::SetVolumeL(int)
-	?SetBitrate@CMceAmrCodec@@UAEHI@Z @ 137 NONAME ; int CMceAmrCodec::SetBitrate(unsigned int)
-	?EnableSsrcL@CMceRtpSource@@QAEXI@Z @ 138 NONAME ; void CMceRtpSource::EnableSsrcL(unsigned int)
-	?SetBitrate@CMceCnCodec@@UAEHI@Z @ 139 NONAME ; int CMceCnCodec::SetBitrate(unsigned int)
-	?NewL@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 140 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewL(class TBuf8<20>)
-	?CloneL@CMceG729Codec@@UBEPAVCMceAudioCodec@@XZ @ 141 NONAME ; class CMceAudioCodec * CMceG729Codec::CloneL(void) const
-	??1CMceMediaStream@@UAE@XZ @ 142 NONAME ; CMceMediaStream::~CMceMediaStream(void)
-	?SetDefaultHeadersL@CMceManager@@QAEXPAVCDesC8Array@@0@Z @ 143 NONAME ; void CMceManager::SetDefaultHeadersL(class CDesC8Array *, class CDesC8Array *)
-	?EnableL@CMceRtpSink@@UAEXXZ @ 144 NONAME ; void CMceRtpSink::EnableL(void)
-	?NewLC@CMceRtpSink@@SAPAV1@XZ @ 145 NONAME ; class CMceRtpSink * CMceRtpSink::NewLC(void)
-	?SetAllowedBitrates@CMceG729Codec@@UAEHI@Z @ 146 NONAME ; int CMceG729Codec::SetAllowedBitrates(unsigned int)
-	?ExposureL@CMceCameraSource@@QAE?AW4TExposure@CCamera@@XZ @ 147 NONAME ; enum CCamera::TExposure CMceCameraSource::ExposureL(void)
-	?SetCodecMode@CMceAmrCodec@@UAEHI@Z @ 148 NONAME ; int CMceAmrCodec::SetCodecMode(unsigned int)
-	?SetReferObserver@CMceManager@@QAEXPAVMMceReferObserver@@@Z @ 149 NONAME ; void CMceManager::SetReferObserver(class MMceReferObserver *)
-	?SetCameraIndexL@CMceCameraSource@@QAEXH@Z @ 150 NONAME ; void CMceCameraSource::SetCameraIndexL(int)
-	?SetBitrate@CMceH263Codec@@UAEHI@Z @ 151 NONAME ; int CMceH263Codec::SetBitrate(unsigned int)
-	??1CMceFileSink@@UAE@XZ @ 152 NONAME ; CMceFileSink::~CMceFileSink(void)
-	?Originator@CMceEvent@@QBEABVTDesC8@@XZ @ 153 NONAME ; class TDesC8 const & CMceEvent::Originator(void) const
-	?GainL@CMceMicSource@@QBEHXZ @ 154 NONAME ; int CMceMicSource::GainL(void) const
-	?SetRedPayloadTypesL@CMceRedCodec@@QAEXABV?$RArray@I@@@Z @ 155 NONAME ; void CMceRedCodec::SetRedPayloadTypesL(class RArray<unsigned int> const &)
-	?SetPTime@CMceiLBCCodec@@UAEHI@Z @ 156 NONAME ; int CMceiLBCCodec::SetPTime(unsigned int)
-	?CloneL@CMceiLBCCodec@@UBEPAVCMceAudioCodec@@XZ @ 157 NONAME ; class CMceAudioCodec * CMceiLBCCodec::CloneL(void) const
-	??1CMceVideoStream@@UAE@XZ @ 158 NONAME ; CMceVideoStream::~CMceVideoStream(void)
-	?DisableL@CMceRtpSink@@UAEXXZ @ 159 NONAME ; void CMceRtpSink::DisableL(void)
-	??1CMceSecureOutSession@@UAE@XZ @ 160 NONAME ; CMceSecureOutSession::~CMceSecureOutSession(void)
-	??1CMceMicSource@@UAE@XZ @ 161 NONAME ; CMceMicSource::~CMceMicSource(void)
-	?Resolution@CMceVideoCodec@@QBE?AVTSize@@XZ @ 162 NONAME ; class TSize CMceVideoCodec::Resolution(void) const
-	?NewLC@CMceMicSource@@SAPAV1@XZ @ 163 NONAME ; class CMceMicSource * CMceMicSource::NewLC(void)
-	?CancelTranscodeL@CMceFileSource@@QAEXXZ @ 164 NONAME ; void CMceFileSource::CancelTranscodeL(void)
-	?SetResolutionL@CMceAvcCodec@@UAEXVTSize@@@Z @ 165 NONAME ; void CMceAvcCodec::SetResolutionL(class TSize)
-	?ContrastL@CMceCameraSource@@QAEHXZ @ 166 NONAME ; int CMceCameraSource::ContrastL(void)
-	?PriorityL@CMceDisplaySink@@QAEIXZ @ 167 NONAME ; unsigned int CMceDisplaySink::PriorityL(void)
-	??1CMceManager@@UAE@XZ @ 168 NONAME ; CMceManager::~CMceManager(void)
-	?Recipient@CMceRefer@@QBEABVTDesC8@@XZ @ 169 NONAME ; class TDesC8 const & CMceRefer::Recipient(void) const
-	?SetPTime@CMceG729Codec@@UAEHI@Z @ 170 NONAME ; int CMceG729Codec::SetPTime(unsigned int)
-	?SetMaxPTime@CMceAmrCodec@@UAEHI@Z @ 171 NONAME ; int CMceAmrCodec::SetMaxPTime(unsigned int)
-	?SetDisplay@CMceDisplaySink@@QAEXAAVRWindow@@AAVCWindowGc@@@Z @ 172 NONAME ; void CMceDisplaySink::SetDisplay(class RWindow &, class CWindowGc &)
-	?NewL@CMceManager@@SAPAV1@ABVTUid@@PAVTMceTransactionDataContainer@@@Z @ 173 NONAME ; class CMceManager * CMceManager::NewL(class TUid const &, class TMceTransactionDataContainer *)
-	?Streams@CMceSession@@QBEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 174 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceSession::Streams(void) const
-	??1CMceDisplaySink@@UAE@XZ @ 175 NONAME ; CMceDisplaySink::~CMceDisplaySink(void)
-	?SupportedVideoCodecs@CMceVideoStream@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 176 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceVideoStream::SupportedVideoCodecs(void) const
-	?Sessions@CMceManager@@QBEABV?$RPointerArray@VCMceSession@@@@XZ @ 177 NONAME ; class RPointerArray<class CMceSession> const & CMceManager::Sessions(void) const
-	??0TMceTransactionDataContainer@@QAE@XZ @ 178 NONAME ; TMceTransactionDataContainer::TMceTransactionDataContainer(void)
-	?SetFrameRateL@CMceAvcCodec@@UAEXN@Z @ 179 NONAME ; void CMceAvcCodec::SetFrameRateL(double)
-	?ConnectionActive@CMceSession@@QBEHXZ @ 180 NONAME ; int CMceSession::ConnectionActive(void) const
-	?RemoveCodecL@CMceAudioStream@@QAEXAAVCMceAudioCodec@@@Z @ 181 NONAME ; void CMceAudioStream::RemoveCodecL(class CMceAudioCodec &)
-	?SetPriorityL@CMceDisplaySink@@QAEXI@Z @ 182 NONAME ; void CMceDisplaySink::SetPriorityL(unsigned int)
-	?CloneL@CMceAmrCodec@@UBEPAVCMceAudioCodec@@XZ @ 183 NONAME ; class CMceAudioCodec * CMceAmrCodec::CloneL(void) const
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceManager@@KABVTDesC8@@1PAVCDesC8Array@@@Z @ 184 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceManager &, unsigned long, class TDesC8 const &, class TDesC8 const &, class CDesC8Array *)
-	?SetPayloadType@CMceRedCodec@@UAEHE@Z @ 185 NONAME ; int CMceRedCodec::SetPayloadType(unsigned char)
-	?NewL@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 186 NONAME ; class CMceH263Codec * CMceH263Codec::NewL(class TBuf8<20>)
-	?CloneL@CMceAvcCodec@@UBEPAVCMceVideoCodec@@XZ @ 187 NONAME ; class CMceVideoCodec * CMceAvcCodec::CloneL(void) const
-	?Type@CMceStreamBundle@@QBE?AW4TMceStreamBundleType@1@XZ @ 188 NONAME ; enum CMceStreamBundle::TMceStreamBundleType CMceStreamBundle::Type(void) const
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@PAVHBufC8@@@Z @ 189 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class HBufC8 *)
-	??1CMceAudioStream@@UAE@XZ @ 190 NONAME ; CMceAudioStream::~CMceAudioStream(void)
-	?SetSamplingFreq@CMceiLBCCodec@@UAEHI@Z @ 191 NONAME ; int CMceiLBCCodec::SetSamplingFreq(unsigned int)
-	?LocalMediaPort@CMceMediaStream@@QBEIXZ @ 192 NONAME ; unsigned int CMceMediaStream::LocalMediaPort(void) const
-	?InitializeL@CMceFcMsgExchange@@QAEXAAVCMceSession@@HAAVMMceFcMsgObserver@@@Z @ 193 NONAME ; void CMceFcMsgExchange::InitializeL(class CMceSession &, int, class MMceFcMsgObserver &)
-	?NewL@CMceAudioStream@@SAPAV1@XZ @ 194 NONAME ; class CMceAudioStream * CMceAudioStream::NewL(void)
-	?Sinks@CMceMediaStream@@QBEABV?$RPointerArray@VCMceMediaSink@@@@XZ @ 195 NONAME ; class RPointerArray<class CMceMediaSink> const & CMceMediaStream::Sinks(void) const
-	?SetResolutionL@CMceH263Codec@@UAEXVTSize@@@Z @ 196 NONAME ; void CMceH263Codec::SetResolutionL(class TSize)
-	?NewL@CMceSpeakerSink@@SAPAV1@XZ @ 197 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewL(void)
-	?DisplayRectL@CMceDisplaySink@@QAE?BVTRect@@XZ @ 198 NONAME ; class TRect const CMceDisplaySink::DisplayRectL(void)
-	?SetDigitalZoomFactorL@CMceCameraSource@@QAEXH@Z @ 199 NONAME ; void CMceCameraSource::SetDigitalZoomFactorL(int)
-	?SetBrightnessL@CMceCameraSource@@QAEXH@Z @ 200 NONAME ; void CMceCameraSource::SetBrightnessL(int)
-	?NewL@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 201 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewL(enum CMceStreamBundle::TMceStreamBundleType)
-	?NewL@CMceOutRefer@@SAPAV1@AAVCMceRefer@@ABVTDesC8@@W4TType@2@@Z @ 202 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceRefer &, class TDesC8 const &, enum CMceRefer::TType)
-	?SetSamplingFreq@CMceCnCodec@@UAEHI@Z @ 203 NONAME ; int CMceCnCodec::SetSamplingFreq(unsigned int)
-	?AcceptL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 204 NONAME ; void CMceInSession::AcceptL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	??1CMceSecureInSession@@UAE@XZ @ 205 NONAME ; CMceSecureInSession::~CMceSecureInSession(void)
-	?SetEventObserver@CMceManager@@QAEXPAVMMceEventObserver@@@Z @ 206 NONAME ; void CMceManager::SetEventObserver(class MMceEventObserver *)
-	?AddSinkL@CMceMediaStream@@QAEXPAVCMceMediaSink@@@Z @ 207 NONAME ; void CMceMediaStream::AddSinkL(class CMceMediaSink *)
-	?NewL@CMceRtpSink@@SAPAV1@HPAVHBufC8@@@Z @ 208 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(int, class HBufC8 *)
-	?ServiceType@CMceSession@@QBEKXZ @ 209 NONAME ; unsigned long CMceSession::ServiceType(void) const
-	?CodecMode@CMceCodec@@QBEIXZ @ 210 NONAME ; unsigned int CMceCodec::CodecMode(void) const
-	?DigitalZoomFactorL@CMceCameraSource@@QAEHXZ @ 211 NONAME ; int CMceCameraSource::DigitalZoomFactorL(void)
-	?BindL@CMceMediaStream@@QAEXPAV1@@Z @ 212 NONAME ; void CMceMediaStream::BindL(class CMceMediaStream *)
-	?SetFastForwardL@CMceFileSource@@QAEXH@Z @ 213 NONAME ; void CMceFileSource::SetFastForwardL(int)
-	?SupportedAudioCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceAudioCodec@@@@XZ @ 214 NONAME ; class RPointerArray<class CMceAudioCodec const > const & CMceManager::SupportedAudioCodecs(void) const
-	?SetSamplingFreq@CMceG729Codec@@UAEHI@Z @ 215 NONAME ; int CMceG729Codec::SetSamplingFreq(unsigned int)
-	?SendSRL@CMceRtpSink@@QAEXXZ @ 216 NONAME ; void CMceRtpSink::SendSRL(void)
-	?NewLC@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 217 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewLC(class TBuf8<20>)
-	??1CMceOutRefer@@UAE@XZ @ 218 NONAME ; CMceOutRefer::~CMceOutRefer(void)
-	?DisableL@CMceFileSource@@UAEXXZ @ 219 NONAME ; void CMceFileSource::DisableL(void)
-	?AllowedBitrates@CMceCodec@@QBEIXZ @ 220 NONAME ; unsigned int CMceCodec::AllowedBitrates(void) const
-	?ConfigKeyL@CMceVideoCodec@@QBEPAVHBufC8@@XZ @ 221 NONAME ; class HBufC8 * CMceVideoCodec::ConfigKeyL(void) const
-	?AllowedFrameRates@CMceVideoCodec@@QBEIXZ @ 222 NONAME ; unsigned int CMceVideoCodec::AllowedFrameRates(void) const
-	?SetGainL@CMceMicSource@@QAEXH@Z @ 223 NONAME ; void CMceMicSource::SetGainL(int)
-	?SetCodecMode@CMceCnCodec@@UAEHI@Z @ 224 NONAME ; int CMceCnCodec::SetCodecMode(unsigned int)
-	?EventHeader@CMceEvent@@QBEABVTDesC8@@XZ @ 225 NONAME ; class TDesC8 const & CMceEvent::EventHeader(void) const
-	?SetPTime@CMceCnCodec@@UAEHI@Z @ 226 NONAME ; int CMceCnCodec::SetPTime(unsigned int)
-	?IsEnabled@CMceMediaStream@@QBEHXZ @ 227 NONAME ; int CMceMediaStream::IsEnabled(void) const
-	?BrightnessL@CMceCameraSource@@QAEHXZ @ 228 NONAME ; int CMceCameraSource::BrightnessL(void)
-	?AssociatedEventsL@CMceRefer@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 229 NONAME ; class RPointerArray<class CMceEvent> * CMceRefer::AssociatedEventsL(void) const
-	?SetBitrate@CMceDtmfCodec@@UAEHI@Z @ 230 NONAME ; int CMceDtmfCodec::SetBitrate(unsigned int)
-	?Bitrate@CMceCodec@@QBEIXZ @ 231 NONAME ; unsigned int CMceCodec::Bitrate(void) const
-	??1CMceMediaSink@@UAE@XZ @ 232 NONAME ; CMceMediaSink::~CMceMediaSink(void)
-	?SetAllowedBitrates@CMceRedCodec@@UAEHI@Z @ 233 NONAME ; int CMceRedCodec::SetAllowedBitrates(unsigned int)
-	??1CMceAvcCodec@@UAE@XZ @ 234 NONAME ; CMceAvcCodec::~CMceAvcCodec(void)
-	?AssociatedSession@CMceEvent@@QBEPAVCMceSession@@XZ @ 235 NONAME ; class CMceSession * CMceEvent::AssociatedSession(void) const
-	?SetBitrate@CMceG711Codec@@UAEHI@Z @ 236 NONAME ; int CMceG711Codec::SetBitrate(unsigned int)
-	?CamerasAvailable@CMceCameraSource@@QBEHXZ @ 237 NONAME ; int CMceCameraSource::CamerasAvailable(void) const
-	??1CMceOutSession@@UAE@XZ @ 238 NONAME ; CMceOutSession::~CMceOutSession(void)
-	?SetPTime@CMceAmrCodec@@UAEHI@Z @ 239 NONAME ; int CMceAmrCodec::SetPTime(unsigned int)
-	?State@CMceCodec@@QBE?AW4TState@1@XZ @ 240 NONAME ; enum CMceCodec::TState CMceCodec::State(void) const
-	?NewL@CMceOutEvent@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@2KPAVHBufC8@@@Z @ 241 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class TDesC8 const &, unsigned long, class HBufC8 *)
-	?Refers@CMceManager@@QBEABV?$RPointerArray@VCMceRefer@@@@XZ @ 242 NONAME ; class RPointerArray<class CMceRefer> const & CMceManager::Refers(void) const
-	?Ssrcs@CMceRtpSource@@QBEABV?$RArray@I@@XZ @ 243 NONAME ; class RArray<unsigned int> const & CMceRtpSource::Ssrcs(void) const
-	??1CMceRtpSource@@UAE@XZ @ 244 NONAME ; CMceRtpSource::~CMceRtpSource(void)
-	?DisableSsrcL@CMceRtpSource@@QAEXI@Z @ 245 NONAME ; void CMceRtpSource::DisableSsrcL(unsigned int)
-	?RespondL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 246 NONAME ; void CMceInSession::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?NewL@CMceOutRefer@@SAPAV1@AAVCMceEvent@@ABVTDesC8@@W4TType@CMceRefer@@@Z @ 247 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceEvent &, class TDesC8 const &, enum CMceRefer::TType)
-	?TerminateL@CMceSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 248 NONAME ; void CMceSession::TerminateL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?Type@CMceMediaStream@@QBEIXZ @ 249 NONAME ; unsigned int CMceMediaStream::Type(void) const
-	?DisableL@CMceMicSource@@UAEXXZ @ 250 NONAME ; void CMceMicSource::DisableL(void)
-	?SetMediaObserver@CMceManager@@QAEXPAVMMceStreamObserver@@@Z @ 251 NONAME ; void CMceManager::SetMediaObserver(class MMceStreamObserver *)
-	?SetStandByTimerL@CMceCodec@@QAEXK@Z @ 252 NONAME ; void CMceCodec::SetStandByTimerL(unsigned long)
-	?SetAllowedFrameRatesL@CMceH263Codec@@UAEXI@Z @ 253 NONAME ; void CMceH263Codec::SetAllowedFrameRatesL(unsigned int)
-	?NewL@CMceRtpSink@@SAPAV1@XZ @ 254 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(void)
-	?Session@CMceMediaStream@@QBEPAVCMceSession@@XZ @ 255 NONAME ; class CMceSession * CMceMediaStream::Session(void) const
-	?SetSessionObserver@CMceManager@@QAEXPAVMMceSessionObserver@@@Z @ 256 NONAME ; void CMceManager::SetSessionObserver(class MMceSessionObserver *)
-	?NewL@CMceMicSource@@SAPAV1@XZ @ 257 NONAME ; class CMceMicSource * CMceMicSource::NewL(void)
-	?EnableVAD@CMceRedCodec@@UAEHH@Z @ 258 NONAME ; int CMceRedCodec::EnableVAD(int)
-	??1CMceInEvent@@UAE@XZ @ 259 NONAME ; CMceInEvent::~CMceInEvent(void)
-	?Originator@CMceSession@@QBEABVTDesC8@@XZ @ 260 NONAME ; class TDesC8 const & CMceSession::Originator(void) const
-	?SetKeepAliveTimerL@CMceCodec@@QAEXE@Z @ 261 NONAME ; void CMceCodec::SetKeepAliveTimerL(unsigned char)
-	?SetConfigKeyL@CMceAvcCodec@@UAEXABVTDesC8@@@Z @ 262 NONAME ; void CMceAvcCodec::SetConfigKeyL(class TDesC8 const &)
-	?SetSourceL@CMceMediaStream@@QAEXPAVCMceMediaSource@@@Z @ 263 NONAME ; void CMceMediaStream::SetSourceL(class CMceMediaSource *)
-	?NewL@CMceVideoStream@@SAPAV1@XZ @ 264 NONAME ; class CMceVideoStream * CMceVideoStream::NewL(void)
-	?SetFastRewindL@CMceFileSource@@QAEXH@Z @ 265 NONAME ; void CMceFileSource::SetFastRewindL(int)
-	?RemoveCodecL@CMceVideoStream@@QAEXAAVCMceVideoCodec@@@Z @ 266 NONAME ; void CMceVideoStream::RemoveCodecL(class CMceVideoCodec &)
-	?DefaultHeadersL@CMceManager@@QBEPAVCDesC8Array@@ABVTDesC8@@@Z @ 267 NONAME ; class CDesC8Array * CMceManager::DefaultHeadersL(class TDesC8 const &) const
-	?EnableL@CMceDisplaySink@@UAEXXZ @ 268 NONAME ; void CMceDisplaySink::EnableL(void)
-	?SdpName@CMceCodec@@QBEABVTDesC8@@XZ @ 269 NONAME ; class TDesC8 const & CMceCodec::SdpName(void) const
-	?NewL@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 270 NONAME ; class CMceFileSource * CMceFileSource::NewL(class CMceManager &, class TBuf<256> const &)
-	?DisableInactivityTimerL@CMceRtpSource@@QAEXXZ @ 271 NONAME ; void CMceRtpSource::DisableInactivityTimerL(void)
-	?UpdateL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 272 NONAME ; void CMceFileSource::UpdateL(class TBuf<256> const &)
-	?RespondL@CMceInEvent@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 273 NONAME ; void CMceInEvent::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?SetCodecMode@CMceH263Codec@@UAEHI@Z @ 274 NONAME ; int CMceH263Codec::SetCodecMode(unsigned int)
-	?MaxGainL@CMceMicSource@@QBEHXZ @ 275 NONAME ; int CMceMicSource::MaxGainL(void) const
-	?EnableL@CMceMicSource@@UAEXXZ @ 276 NONAME ; void CMceMicSource::EnableL(void)
-	?UpdateL@CMceOutEvent@@QAEXKPAVCDesC8Array@@PAVHBufC8@@1@Z @ 277 NONAME ; void CMceOutEvent::UpdateL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?NewLC@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 278 NONAME ; class CMceCameraSource * CMceCameraSource::NewLC(class CMceManager &)
-	?SendResponseL@CMceSession@@QAEXKABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 279 NONAME ; void CMceSession::SendResponseL(unsigned long, class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?GetContent@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 280 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContent(void)
-	?DisableL@CMceDisplaySink@@UAEXXZ @ 281 NONAME ; void CMceDisplaySink::DisableL(void)
-	?PayloadType@CMceCodec@@QBEEXZ @ 282 NONAME ; unsigned char CMceCodec::PayloadType(void) const
-	?TerminateL@CMceEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 283 NONAME ; void CMceEvent::TerminateL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?AcceptL@CMceInRefer@@QAEPAVCMceInEvent@@XZ @ 284 NONAME ; class CMceInEvent * CMceInRefer::AcceptL(void)
-	?SetZoomFactorL@CMceCameraSource@@QAEXH@Z @ 285 NONAME ; void CMceCameraSource::SetZoomFactorL(int)
-	?CancelL@CMceOutSession@@QAEXXZ @ 286 NONAME ; void CMceOutSession::CancelL(void)
-	?AddCodecL@CMceAudioStream@@QAEXPAVCMceAudioCodec@@@Z @ 287 NONAME ; void CMceAudioStream::AddCodecL(class CMceAudioCodec *)
-	??1CMceAmrWbCodec@@UAE@XZ @ 288 NONAME ; CMceAmrWbCodec::~CMceAmrWbCodec(void)
-	?CloneL@CMceG711Codec@@UBEPAVCMceAudioCodec@@XZ @ 289 NONAME ; class CMceAudioCodec * CMceG711Codec::CloneL(void) const
-	?Codecs@CMceAudioStream@@QAEABV?$RPointerArray@VCMceAudioCodec@@@@XZ @ 290 NONAME ; class RPointerArray<class CMceAudioCodec> const & CMceAudioStream::Codecs(void)
-	??1CMceMediaSource@@UAE@XZ @ 291 NONAME ; CMceMediaSource::~CMceMediaSource(void)
-	?MediaElementCountL@CMceFileSource@@QBEHI@Z @ 292 NONAME ; int CMceFileSource::MediaElementCountL(unsigned int) const
-	?RejectL@CMceInRefer@@QAEXXZ @ 293 NONAME ; void CMceInRefer::RejectL(void)
-	?UpdateL@CMceSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 294 NONAME ; void CMceSession::UpdateL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
-	?SetDisplayRectL@CMceDisplaySink@@QAEXABVTRect@@@Z @ 295 NONAME ; void CMceDisplaySink::SetDisplayRectL(class TRect const &)
-	?GetHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 296 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetHeaders(void)
-	??1CMceCnCodec@@UAE@XZ @ 297 NONAME ; CMceCnCodec::~CMceCnCodec(void)
-	?AssociatedRefersL@CMceRefer@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 298 NONAME ; class RPointerArray<class CMceRefer> * CMceRefer::AssociatedRefersL(void) const
-	??1CMceFileSource@@UAE@XZ @ 299 NONAME ; CMceFileSource::~CMceFileSource(void)
-	?EnableL@CMceCameraSource@@UAEXXZ @ 300 NONAME ; void CMceCameraSource::EnableL(void)
-	?SetBitrate@CMceiLBCCodec@@UAEHI@Z @ 301 NONAME ; int CMceiLBCCodec::SetBitrate(unsigned int)
-	?Codecs@CMceVideoStream@@QAEABV?$RPointerArray@VCMceVideoCodec@@@@XZ @ 302 NONAME ; class RPointerArray<class CMceVideoCodec> const & CMceVideoStream::Codecs(void)
-	?SetServiceTypeL@CMceSession@@QAEXK@Z @ 303 NONAME ; void CMceSession::SetServiceTypeL(unsigned long)
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceRefer@@@Z @ 304 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceRefer &)
-	?SetPayloadType@CMceH263Codec@@UAEHE@Z @ 305 NONAME ; int CMceH263Codec::SetPayloadType(unsigned char)
-	?BoundStreamL@CMceMediaStream@@QBEAAV1@XZ @ 306 NONAME ; class CMceMediaStream & CMceMediaStream::BoundStreamL(void) const
-	?RotationL@CMceDisplaySink@@QAE?AW4TRotation@1@XZ @ 307 NONAME ; enum CMceDisplaySink::TRotation CMceDisplaySink::RotationL(void)
-	?SetMaxPTime@CMceDtmfCodec@@UAEHI@Z @ 308 NONAME ; int CMceDtmfCodec::SetMaxPTime(unsigned int)
-	?GetStatusCode@TMceTransactionDataContainer@@QAEHXZ @ 309 NONAME ; int TMceTransactionDataContainer::GetStatusCode(void)
-	?AssociatedRefersL@CMceSession@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 310 NONAME ; class RPointerArray<class CMceRefer> * CMceSession::AssociatedRefersL(void) const
-	?NewLC@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 311 NONAME ; class CMceH263Codec * CMceH263Codec::NewLC(class TBuf8<20>)
-	?MediaAttributeLinesL@CMceFcMsgExchange@@QAEPAVMDesC8Array@@AAVCMceSession@@@Z @ 312 NONAME ; class MDesC8Array * CMceFcMsgExchange::MediaAttributeLinesL(class CMceSession &)
-	?NewLC@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 313 NONAME ; class CMceFileSink * CMceFileSink::NewLC(class TBuf<256> const &)
-	?RoutingL@CMceSpeakerSink@@QBEHXZ @ 314 NONAME ; int CMceSpeakerSink::RoutingL(void) const
-	?NewL@CMceOutSession@@SAPAV1@AAVCMceEvent@@@Z @ 315 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceEvent &)
-	?State@CMceRefer@@QBE?AW4TState@1@XZ @ 316 NONAME ; enum CMceRefer::TState CMceRefer::State(void) const
-	?SetSamplingFreq@CMceRedCodec@@UAEHI@Z @ 317 NONAME ; int CMceRedCodec::SetSamplingFreq(unsigned int)
-	?SetAllowedFrameRatesL@CMceAvcCodec@@UAEXI@Z @ 318 NONAME ; void CMceAvcCodec::SetAllowedFrameRatesL(unsigned int)
-	?FourCC@CMceCodec@@QBEKXZ @ 319 NONAME ; unsigned long CMceCodec::FourCC(void) const
-	?AssociatedEventsL@CMceEvent@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 320 NONAME ; class RPointerArray<class CMceEvent> * CMceEvent::AssociatedEventsL(void) const
-	?PositionL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 321 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::PositionL(void) const
-	?SetMaxPTime@CMceG711Codec@@UAEHI@Z @ 322 NONAME ; int CMceG711Codec::SetMaxPTime(unsigned int)
-	?Originator@CMceRefer@@QBEABVTDesC8@@XZ @ 323 NONAME ; class TDesC8 const & CMceRefer::Originator(void) const
-	?SetBitrate@CMceRedCodec@@UAEHI@Z @ 324 NONAME ; int CMceRedCodec::SetBitrate(unsigned int)
-	?DisableL@CMceRtpSource@@UAEXXZ @ 325 NONAME ; void CMceRtpSource::DisableL(void)
-	?SetPayloadType@CMceAvcCodec@@UAEHE@Z @ 326 NONAME ; int CMceAvcCodec::SetPayloadType(unsigned char)
-	?NewL@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 327 NONAME ; class CMceCameraSource * CMceCameraSource::NewL(class CMceManager &)
-	?RespondL@CMceInRefer@@QAEPAVCMceInEvent@@ABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 328 NONAME ; class CMceInEvent * CMceInRefer::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?SetAllowedBitrates@CMceH263Codec@@UAEHI@Z @ 329 NONAME ; int CMceH263Codec::SetAllowedBitrates(unsigned int)
-	?MMFPriority@CMceCodec@@QBEHXZ @ 330 NONAME ; int CMceCodec::MMFPriority(void) const
-	?FrameRate@CMceVideoCodec@@QBENXZ @ 331 NONAME ; double CMceVideoCodec::FrameRate(void) const
-	?SetBitrate@CMceG729Codec@@UAEHI@Z @ 332 NONAME ; int CMceG729Codec::SetBitrate(unsigned int)
-	?GetContentHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 333 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetContentHeaders(void)
-	?NewL@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 334 NONAME ; class CMceRtpSource * CMceRtpSource::NewL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
-	?EstablishL@CMceOutSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 335 NONAME ; void CMceOutSession::EstablishL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
-	?EnableInactivityTimerL@CMceRtpSource@@QAEXK@Z @ 336 NONAME ; void CMceRtpSource::EnableInactivityTimerL(unsigned long)
-	?ReferTo@CMceRefer@@QBEABVTDesC8@@XZ @ 337 NONAME ; class TDesC8 const & CMceRefer::ReferTo(void) const
-	?MMFPriorityPreference@CMceCodec@@QBEHXZ @ 338 NONAME ; int CMceCodec::MMFPriorityPreference(void) const
-	?SetCodecMode@CMceRedCodec@@UAEHI@Z @ 339 NONAME ; int CMceRedCodec::SetCodecMode(unsigned int)
-	?SetDisplayIndexL@CMceDisplaySink@@QAEXH@Z @ 340 NONAME ; void CMceDisplaySink::SetDisplayIndexL(int)
-	?MaxVolumeL@CMceSpeakerSink@@QBEHXZ @ 341 NONAME ; int CMceSpeakerSink::MaxVolumeL(void) const
-	?RedPayloadTypesL@CMceRedCodec@@QAEXAAV?$RArray@I@@@Z @ 342 NONAME ; void CMceRedCodec::RedPayloadTypesL(class RArray<unsigned int> &)
-	?Preference@CMceCodec@@QBEHXZ @ 343 NONAME ; int CMceCodec::Preference(void) const
-	?KeepAliveTimer@CMceCodec@@QBEEXZ @ 344 NONAME ; unsigned char CMceCodec::KeepAliveTimer(void) const
-	?SendRequestL@CMceSession@@QAEKABVTDesC8@@PAVCDesC8Array@@PAVHBufC8@@2@Z @ 345 NONAME ; unsigned long CMceSession::SendRequestL(class TDesC8 const &, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
-	?SetDtmfObserver@CMceManager@@QAEXPAVMMceDtmfObserver@@@Z @ 346 NONAME ; void CMceManager::SetDtmfObserver(class MMceDtmfObserver *)
-	?DurationL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 347 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::DurationL(void) const
-	??1CMceInSession@@UAE@XZ @ 348 NONAME ; CMceInSession::~CMceInSession(void)
-	?SendL@CMceFcMsgExchange@@QAEXAAVCMceSession@@PAVHBufC8@@@Z @ 349 NONAME ; void CMceFcMsgExchange::SendL(class CMceSession &, class HBufC8 *)
-	?EnableL@CMceRtpSource@@UAEXXZ @ 350 NONAME ; void CMceRtpSource::EnableL(void)
-	?SetCodecMode@CMceDtmfCodec@@UAEHI@Z @ 351 NONAME ; int CMceDtmfCodec::SetCodecMode(unsigned int)
-	?AcceptL@CMceInSession@@QAEXXZ @ 352 NONAME ; void CMceInSession::AcceptL(void)
-	?SetAllowedResolutionsL@CMceH263Codec@@UAEXI@Z @ 353 NONAME ; void CMceH263Codec::SetAllowedResolutionsL(unsigned int)
-	?AddBundleL@CMceSession@@QAEXPAVCMceStreamBundle@@@Z @ 354 NONAME ; void CMceSession::AddBundleL(class CMceStreamBundle *)
-	??1CMceOutEvent@@UAE@XZ @ 355 NONAME ; CMceOutEvent::~CMceOutEvent(void)
-	?IsEnabled@CMceMediaSink@@QBEHXZ @ 356 NONAME ; int CMceMediaSink::IsEnabled(void) const
-	?SetCodecMode@CMceG711Codec@@UAEHI@Z @ 357 NONAME ; int CMceG711Codec::SetCodecMode(unsigned int)
-	?SetPayloadType@CMceAmrCodec@@UAEHE@Z @ 358 NONAME ; int CMceAmrCodec::SetPayloadType(unsigned char)
-	??1CMceG711Codec@@UAE@XZ @ 359 NONAME ; CMceG711Codec::~CMceG711Codec(void)
-	?SetStateL@CMceCodec@@QAEXW4TState@1@@Z @ 360 NONAME ; void CMceCodec::SetStateL(enum CMceCodec::TState)
-	?SetInSessionObserver@CMceManager@@QAEXPAVMMceInSessionObserver@@@Z @ 361 NONAME ; void CMceManager::SetInSessionObserver(class MMceInSessionObserver *)
-	?GetReasonPhrase@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 362 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetReasonPhrase(void)
-	?SetMaxPTime@CMceCnCodec@@UAEHI@Z @ 363 NONAME ; int CMceCnCodec::SetMaxPTime(unsigned int)
-	?SetSessionSDPLinesL@CMceSession@@QAEXPAVCDesC8Array@@@Z @ 364 NONAME ; void CMceSession::SetSessionSDPLinesL(class CDesC8Array *)
-	?SetAllowedBitrates@CMceAvcCodec@@UAEHI@Z @ 365 NONAME ; int CMceAvcCodec::SetAllowedBitrates(unsigned int)
-	?EnableL@CMceFileSource@@UAEXXZ @ 366 NONAME ; void CMceFileSource::EnableL(void)
-	?EnableL@CMceFileSink@@UAEXXZ @ 367 NONAME ; void CMceFileSink::EnableL(void)
-	?SetMaxPTime@CMceRedCodec@@UAEHI@Z @ 368 NONAME ; int CMceRedCodec::SetMaxPTime(unsigned int)
-	?SetContrastL@CMceCameraSource@@QAEXH@Z @ 369 NONAME ; void CMceCameraSource::SetContrastL(int)
-	?Recipient@CMceEvent@@QBEABVTDesC8@@XZ @ 370 NONAME ; class TDesC8 const & CMceEvent::Recipient(void) const
-	?WhiteBalanceL@CMceCameraSource@@QAE?AW4TWhiteBalance@CCamera@@XZ @ 371 NONAME ; enum CCamera::TWhiteBalance CMceCameraSource::WhiteBalanceL(void)
-	?SetKeepAliveDataL@CMceCodec@@QAEXABVTDesC8@@@Z @ 372 NONAME ; void CMceCodec::SetKeepAliveDataL(class TDesC8 const &)
-	?AddCodecL@CMceVideoStream@@QAEXPAVCMceVideoCodec@@@Z @ 373 NONAME ; void CMceVideoStream::AddCodecL(class CMceVideoCodec *)
-	?NewL@CMceFcMsgExchange@@SAPAV1@AAVCMceManager@@ABVTDesC8@@@Z @ 374 NONAME ; class CMceFcMsgExchange * CMceFcMsgExchange::NewL(class CMceManager &, class TDesC8 const &)
-	?SetMMFPriorityL@CMceCodec@@QAEXH@Z @ 375 NONAME ; void CMceCodec::SetMMFPriorityL(int)
-	?KeepAlivePayloadType@CMceCodec@@QBEEXZ @ 376 NONAME ; unsigned char CMceCodec::KeepAlivePayloadType(void) const
-	?SessionSDPLinesL@CMceSession@@QAEPAVMDesC8Array@@XZ @ 377 NONAME ; class MDesC8Array * CMceSession::SessionSDPLinesL(void)
-	?SetPreferenceL@CMceCodec@@QAEXH@Z @ 378 NONAME ; void CMceCodec::SetPreferenceL(int)
-	?Ssrc@CMceRtpSink@@QBEKXZ @ 379 NONAME ; unsigned long CMceRtpSink::Ssrc(void) const
-	??1CMceAmrCodec@@UAE@XZ @ 380 NONAME ; CMceAmrCodec::~CMceAmrCodec(void)
-	?EnableVAD@CMceDtmfCodec@@UAEHH@Z @ 381 NONAME ; int CMceDtmfCodec::EnableVAD(int)
-	?State@CMceMediaStream@@QBE?AW4TState@1@XZ @ 382 NONAME ; enum CMceMediaStream::TState CMceMediaStream::State(void) const
-	?Source@CMceMediaStream@@QBEPAVCMceMediaSource@@XZ @ 383 NONAME ; class CMceMediaSource * CMceMediaStream::Source(void) const
-	?SetKeepAlivePayloadTypeL@CMceCodec@@QAEXE@Z @ 384 NONAME ; void CMceCodec::SetKeepAlivePayloadTypeL(unsigned char)
-	?SetInReferObserver@CMceManager@@QAEXPAVMMceInReferObserver@@@Z @ 385 NONAME ; void CMceManager::SetInReferObserver(class MMceInReferObserver *)
-	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@PAVHBufC8@@@Z @ 386 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class HBufC8 *)
-	?EnableVAD@CMceG711Codec@@UAEHH@Z @ 387 NONAME ; int CMceG711Codec::EnableVAD(int)
-	?IsEnabled@CMceMediaSource@@QBEHXZ @ 388 NONAME ; int CMceMediaSource::IsEnabled(void) const
-	?SetAllowedBitrates@CMceCnCodec@@UAEHI@Z @ 389 NONAME ; int CMceCnCodec::SetAllowedBitrates(unsigned int)
-
+EXPORTS
+	?VolumeL@CMceSpeakerSink@@QBEHXZ @ 1 NONAME ; int CMceSpeakerSink::VolumeL(void) const
+	?TranscodeL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 2 NONAME ; void CMceFileSource::TranscodeL(class TBuf<256> const &)
+	?SetPreferredEncodingDecodingDeviceL@CMceAvcCodec@@UAEXVTUid@@@Z @ 3 NONAME ; void CMceAvcCodec::SetPreferredEncodingDecodingDeviceL(class TUid)
+	?RejectL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 4 NONAME ; void CMceInSession::RejectL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?CloneL@CMceCnCodec@@UBEPAVCMceAudioCodec@@XZ @ 5 NONAME ; class CMceAudioCodec * CMceCnCodec::CloneL(void) const
+	??1CMceStreamBundle@@UAE@XZ @ 6 NONAME ; CMceStreamBundle::~CMceStreamBundle(void)
+	?SetPayloadType@CMceDtmfCodec@@UAEHE@Z @ 7 NONAME ; int CMceDtmfCodec::SetPayloadType(unsigned char)
+	?KeepAliveData@CMceCodec@@QBEABVTDesC8@@XZ @ 8 NONAME ; class TDesC8 const & CMceCodec::KeepAliveData(void) const
+	?IsSsrcEnabledL@CMceRtpSource@@QAEHI@Z @ 9 NONAME ; int CMceRtpSource::IsSsrcEnabledL(unsigned int)
+	?GetCameraInfo@CMceCameraSource@@QBEXAAVTCameraInfo@@@Z @ 10 NONAME ; void CMceCameraSource::GetCameraInfo(class TCameraInfo &) const
+	??1CMceSpeakerSink@@UAE@XZ @ 11 NONAME ; CMceSpeakerSink::~CMceSpeakerSink(void)
+	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceRefer@@@Z @ 12 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceRefer &)
+	?SetPayloadType@CMceG711Codec@@UAEHE@Z @ 13 NONAME ; int CMceG711Codec::SetPayloadType(unsigned char)
+	?SetLocalMediaPortL@CMceMediaStream@@QAEXI@Z @ 14 NONAME ; void CMceMediaStream::SetLocalMediaPortL(unsigned int)
+	?CloneL@CMceDtmfCodec@@UBEPAVCMceAudioCodec@@XZ @ 15 NONAME ; class CMceAudioCodec * CMceDtmfCodec::CloneL(void) const
+	?NewLC@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 16 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewLC(enum CMceStreamBundle::TMceStreamBundleType)
+	?AssociatedRefersL@CMceEvent@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 17 NONAME ; class RPointerArray<class CMceRefer> * CMceEvent::AssociatedRefersL(void) const
+	?SetMaxPTime@CMceiLBCCodec@@UAEHI@Z @ 18 NONAME ; int CMceiLBCCodec::SetMaxPTime(unsigned int)
+	?AssociatedEventsL@CMceSession@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 19 NONAME ; class RPointerArray<class CMceEvent> * CMceSession::AssociatedEventsL(void) const
+	?UpdateL@CMceRtpSource@@QAEXIIKPAVHBufC8@@@Z @ 20 NONAME ; void CMceRtpSource::UpdateL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
+	?NewL@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 21 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewL(class CMceManager &)
+	?SetPreferredEncodingDecodingDeviceL@CMceH263Codec@@UAEXVTUid@@@Z @ 22 NONAME ; void CMceH263Codec::SetPreferredEncodingDecodingDeviceL(class TUid)
+	?SetAllowedBitrates@CMceAmrCodec@@UAEHI@Z @ 23 NONAME ; int CMceAmrCodec::SetAllowedBitrates(unsigned int)
+	?Bundles@CMceSession@@QBEABV?$RPointerArray@VCMceStreamBundle@@@@XZ @ 24 NONAME ; class RPointerArray<class CMceStreamBundle> const & CMceSession::Bundles(void) const
+	?DisableL@CMceFileSink@@UAEXXZ @ 25 NONAME ; void CMceFileSink::DisableL(void)
+	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceEvent@@@Z @ 26 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceEvent &)
+	?AllowedResolutions@CMceVideoCodec@@QBEIXZ @ 27 NONAME ; unsigned int CMceVideoCodec::AllowedResolutions(void) const
+	?SetAllowedBitrates@CMceDtmfCodec@@UAEHI@Z @ 28 NONAME ; int CMceDtmfCodec::SetAllowedBitrates(unsigned int)
+	?NotifyL@CMceInEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 29 NONAME ; void CMceInEvent::NotifyL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?DisplaysAvailable@CMceDisplaySink@@QBEHXZ @ 30 NONAME ; int CMceDisplaySink::DisplaysAvailable(void) const
+	?SetConfigKeyL@CMceH263Codec@@UAEXABVTDesC8@@@Z @ 31 NONAME ; void CMceH263Codec::SetConfigKeyL(class TDesC8 const &)
+	?LastPacket@CMceRtpSink@@QBEKXZ @ 32 NONAME ; unsigned long CMceRtpSink::LastPacket(void) const
+	?NewLC@CMceAudioStream@@SAPAV1@XZ @ 33 NONAME ; class CMceAudioStream * CMceAudioStream::NewLC(void)
+	?Type@CMceMediaSource@@QBEIXZ @ 34 NONAME ; unsigned int CMceMediaSource::Type(void) const
+	?NewLC@CMceSpeakerSink@@SAPAV1@XZ @ 35 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewLC(void)
+	?UpdateL@CMceFcMsgExchange@@QAEXAAVCMceSession@@PAVCDesC8Array@@@Z @ 36 NONAME ; void CMceFcMsgExchange::UpdateL(class CMceSession &, class CDesC8Array *)
+	?RemoveStreamL@CMceSession@@QAEXAAVCMceMediaStream@@@Z @ 37 NONAME ; void CMceSession::RemoveStreamL(class CMceMediaStream &)
+	?ReplaceCodecsL@CMceAudioStream@@QAEXPAV?$RPointerArray@VCMceAudioCodec@@@@@Z @ 38 NONAME ; void CMceAudioStream::ReplaceCodecsL(class RPointerArray<class CMceAudioCodec> *)
+	?Type@CMceMediaSink@@QBEIXZ @ 39 NONAME ; unsigned int CMceMediaSink::Type(void) const
+	?SetAllowedBitrates@CMceG711Codec@@UAEHI@Z @ 40 NONAME ; int CMceG711Codec::SetAllowedBitrates(unsigned int)
+	?UpdateL@CMceRtpSink@@QAEXHPAVHBufC8@@@Z @ 41 NONAME ; void CMceRtpSink::UpdateL(int, class HBufC8 *)
+	?SetInEventObserver@CMceManager@@QAEXPAVMMceInEventObserver@@@Z @ 42 NONAME ; void CMceManager::SetInEventObserver(class MMceInEventObserver *)
+	?NewL@CMceOutEvent@@SAPAV1@AAVCMceSession@@ABVTDesC8@@K@Z @ 43 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceSession &, class TDesC8 const &, unsigned long)
+	?SetRtpObserver@CMceManager@@QAEXPAVMMceRtpObserver@@@Z @ 44 NONAME ; void CMceManager::SetRtpObserver(class MMceRtpObserver *)
+	?SetFrameRateL@CMceH263Codec@@UAEXN@Z @ 45 NONAME ; void CMceH263Codec::SetFrameRateL(double)
+	?SetTransactionObserver@CMceManager@@QAEXPAVMMceTransactionObserver@@@Z @ 46 NONAME ; void CMceManager::SetTransactionObserver(class MMceTransactionObserver *)
+	?SetMaxPTime@CMceG729Codec@@UAEHI@Z @ 47 NONAME ; int CMceG729Codec::SetMaxPTime(unsigned int)
+	?Recipient@CMceSession@@QBEABVTDesC8@@XZ @ 48 NONAME ; class TDesC8 const & CMceSession::Recipient(void) const
+	?GetModifierL@CMceSession@@QBEXKAAI@Z @ 49 NONAME ; void CMceSession::GetModifierL(unsigned long, unsigned int &) const
+	?DisableL@CMceCameraSource@@UAEXXZ @ 50 NONAME ; void CMceCameraSource::DisableL(void)
+	?SubscribeL@CMceOutEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 51 NONAME ; void CMceOutEvent::SubscribeL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?CurrentMediaElement@CMceFileSource@@QAEHI@Z @ 52 NONAME ; int CMceFileSource::CurrentMediaElement(unsigned int)
+	?ControlPathSecurityLevel@CMceSession@@QBE?AW4TControlPathSecurityLevel@1@XZ @ 53 NONAME ; enum CMceSession::TControlPathSecurityLevel CMceSession::ControlPathSecurityLevel(void) const
+	?RingL@CMceInSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 54 NONAME ; void CMceInSession::RingL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?ReplaceCodecsL@CMceVideoStream@@QAEXPAV?$RPointerArray@VCMceVideoCodec@@@@@Z @ 55 NONAME ; void CMceVideoStream::ReplaceCodecsL(class RPointerArray<class CMceVideoCodec> *)
+	?SetPTime@CMceRedCodec@@UAEHI@Z @ 56 NONAME ; int CMceRedCodec::SetPTime(unsigned int)
+	?SetExposureL@CMceCameraSource@@QAEXW4TExposure@CCamera@@@Z @ 57 NONAME ; void CMceCameraSource::SetExposureL(enum CCamera::TExposure)
+	?NewL@CMceOutEvent@@SAPAV1@AAVCMceRefer@@ABVTDesC8@@K@Z @ 58 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceRefer &, class TDesC8 const &, unsigned long)
+	?Type@CMceRefer@@QBE?AW4TType@1@XZ @ 59 NONAME ; enum CMceRefer::TType CMceRefer::Type(void) const
+	?GetContentType@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 60 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContentType(void)
+	?EnableVAD@CMceAmrCodec@@UAEHH@Z @ 61 NONAME ; int CMceAmrCodec::EnableVAD(int)
+	?AcceptL@CMceInEvent@@QAEXXZ @ 62 NONAME ; void CMceInEvent::AcceptL(void)
+	?SetCodecMode@CMceiLBCCodec@@UAEHI@Z @ 63 NONAME ; int CMceiLBCCodec::SetCodecMode(unsigned int)
+	?RejectL@CMceInEvent@@QAEXXZ @ 64 NONAME ; void CMceInEvent::RejectL(void)
+	?ReferL@CMceOutRefer@@QAEPAVCMceOutEvent@@PAVCDesC8Array@@PAVHBufC8@@1@Z @ 65 NONAME ; class CMceOutEvent * CMceOutRefer::ReferL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?NewL@CMceOutRefer@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@2W4TType@CMceRefer@@PAVHBufC8@@@Z @ 66 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class TDesC8 const &, enum CMceRefer::TType, class HBufC8 *)
+	?NewLC@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 67 NONAME ; class CMceRtpSource * CMceRtpSource::NewLC(unsigned int, unsigned int, unsigned long, class HBufC8 *)
+	??1CMceDtmfCodec@@UAE@XZ @ 68 NONAME ; CMceDtmfCodec::~CMceDtmfCodec(void)
+	?AddStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 69 NONAME ; void CMceStreamBundle::AddStreamL(class CMceMediaStream &)
+	?NewL@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 70 NONAME ; class CMceFileSink * CMceFileSink::NewL(class TBuf<256> const &)
+	?CloneL@CMceAmrWbCodec@@UBEPAVCMceAudioCodec@@XZ @ 71 NONAME ; class CMceAudioCodec * CMceAmrWbCodec::CloneL(void) const
+	?SetPTime@CMceDtmfCodec@@UAEHI@Z @ 72 NONAME ; int CMceDtmfCodec::SetPTime(unsigned int)
+	?NewLC@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 73 NONAME ; class CMceFileSource * CMceFileSource::NewLC(class CMceManager &, class TBuf<256> const &)
+	??1CMceiLBCCodec@@UAE@XZ @ 74 NONAME ; CMceiLBCCodec::~CMceiLBCCodec(void)
+	?RejectL@CMceInSession@@QAEXXZ @ 75 NONAME ; void CMceInSession::RejectL(void)
+	?AssociatedSession@CMceRefer@@QBEPAVCMceSession@@XZ @ 76 NONAME ; class CMceSession * CMceRefer::AssociatedSession(void) const
+	?SetModifierL@CMceSession@@QAEXKI@Z @ 77 NONAME ; void CMceSession::SetModifierL(unsigned long, unsigned int)
+	?SetMMFPriorityPreferenceL@CMceCodec@@QAEXH@Z @ 78 NONAME ; void CMceCodec::SetMMFPriorityPreferenceL(int)
+	?SetAllowedResolutionsL@CMceAvcCodec@@UAEXI@Z @ 79 NONAME ; void CMceAvcCodec::SetAllowedResolutionsL(unsigned int)
+	?State@CMceSession@@QBE?AW4TState@1@XZ @ 80 NONAME ; enum CMceSession::TState CMceSession::State(void) const
+	?SetPTime@CMceG711Codec@@UAEHI@Z @ 81 NONAME ; int CMceG711Codec::SetPTime(unsigned int)
+	?SetMaxBitrateL@CMceH263Codec@@UAEXI@Z @ 82 NONAME ; void CMceH263Codec::SetMaxBitrateL(unsigned int)
+	?SetInTransactionObserver@CMceManager@@QAEXPAVMMceInTransactionObserver@@@Z @ 83 NONAME ; void CMceManager::SetInTransactionObserver(class MMceInTransactionObserver *)
+	?Events@CMceManager@@QBEABV?$RPointerArray@VCMceEvent@@@@XZ @ 84 NONAME ; class RPointerArray<class CMceEvent> const & CMceManager::Events(void) const
+	?CloneL@CMceH263Codec@@UBEPAVCMceVideoCodec@@XZ @ 85 NONAME ; class CMceVideoCodec * CMceH263Codec::CloneL(void) const
+	?MaxBitRate@CMceVideoCodec@@QBEIXZ @ 86 NONAME ; unsigned int CMceVideoCodec::MaxBitRate(void) const
+	?SetPayloadType@CMceCnCodec@@UAEHE@Z @ 87 NONAME ; int CMceCnCodec::SetPayloadType(unsigned char)
+	?SetCurrentMediaElementL@CMceFileSource@@QAEXIH@Z @ 88 NONAME ; void CMceFileSource::SetCurrentMediaElementL(unsigned int, int)
+	?SetCodecMode@CMceG729Codec@@UAEHI@Z @ 89 NONAME ; int CMceG729Codec::SetCodecMode(unsigned int)
+	??1CMceH263Codec@@UAE@XZ @ 90 NONAME ; CMceH263Codec::~CMceH263Codec(void)
+	?EnableVAD@CMceiLBCCodec@@UAEHH@Z @ 91 NONAME ; int CMceiLBCCodec::EnableVAD(int)
+	?SetBitrate@CMceAvcCodec@@UAEHI@Z @ 92 NONAME ; int CMceAvcCodec::SetBitrate(unsigned int)
+	?Ssrc@CMceRtpSource@@QBEKXZ @ 93 NONAME ; unsigned long CMceRtpSource::Ssrc(void) const
+	?Streams@CMceStreamBundle@@QAEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 94 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceStreamBundle::Streams(void)
+	?SendRRL@CMceRtpSource@@QAEXXZ @ 95 NONAME ; void CMceRtpSource::SendRRL(void)
+	?NewLC@CMceDisplaySink@@SAPAV1@AAVCMceManager@@@Z @ 96 NONAME ; class CMceDisplaySink * CMceDisplaySink::NewLC(class CMceManager &)
+	?NewL@CMceOutEvent@@SAPAV1@AAVCMceEvent@@ABVTDesC8@@K@Z @ 97 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceEvent &, class TDesC8 const &, unsigned long)
+	??1CMceRtpSink@@UAE@XZ @ 98 NONAME ; CMceRtpSink::~CMceRtpSink(void)
+	?SetWhiteBalanceL@CMceCameraSource@@QAEXW4TWhiteBalance@CCamera@@@Z @ 99 NONAME ; void CMceCameraSource::SetWhiteBalanceL(enum CCamera::TWhiteBalance)
+	?SupportedVideoCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 100 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceManager::SupportedVideoCodecs(void) const
+	?MediaAttributeLinesL@CMceMediaStream@@QAEPAVMDesC8Array@@XZ @ 101 NONAME ; class MDesC8Array * CMceMediaStream::MediaAttributeLinesL(void)
+	?NewL@CMceOutRefer@@SAPAV1@AAVCMceSession@@ABVTDesC8@@W4TType@CMceRefer@@@Z @ 102 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceSession &, class TDesC8 const &, enum CMceRefer::TType)
+	?ZoomFactorL@CMceCameraSource@@QAEHXZ @ 103 NONAME ; int CMceCameraSource::ZoomFactorL(void)
+	?SetPayloadType@CMceiLBCCodec@@UAEHE@Z @ 104 NONAME ; int CMceiLBCCodec::SetPayloadType(unsigned char)
+	?EnableVAD@CMceCnCodec@@UAEHH@Z @ 105 NONAME ; int CMceCnCodec::EnableVAD(int)
+	?RemoveBundleL@CMceSession@@QAEXAAVCMceStreamBundle@@@Z @ 106 NONAME ; void CMceSession::RemoveBundleL(class CMceStreamBundle &)
+	?Type@CMceCodec@@QBEIXZ @ 107 NONAME ; unsigned int CMceCodec::Type(void) const
+	?SetSamplingFreq@CMceDtmfCodec@@UAEHI@Z @ 108 NONAME ; int CMceDtmfCodec::SetSamplingFreq(unsigned int)
+	?SetRoutingL@CMceSpeakerSink@@QAEXH@Z @ 109 NONAME ; void CMceSpeakerSink::SetRoutingL(int)
+	?SetMediaAttributeLinesL@CMceMediaStream@@QAEXPAVCDesC8Array@@@Z @ 110 NONAME ; void CMceMediaStream::SetMediaAttributeLinesL(class CDesC8Array *)
+	??1CMceG729Codec@@UAE@XZ @ 111 NONAME ; CMceG729Codec::~CMceG729Codec(void)
+	?RemoveStreamL@CMceStreamBundle@@QAEXAAVCMceMediaStream@@@Z @ 112 NONAME ; void CMceStreamBundle::RemoveStreamL(class CMceMediaStream &)
+	?SetRotationL@CMceDisplaySink@@QAEXW4TRotation@1@@Z @ 113 NONAME ; void CMceDisplaySink::SetRotationL(enum CMceDisplaySink::TRotation)
+	?SetCodecMode@CMceAvcCodec@@UAEHI@Z @ 114 NONAME ; int CMceAvcCodec::SetCodecMode(unsigned int)
+	?SessionTimer@CMceSession@@QBEKXZ @ 115 NONAME ; unsigned long CMceSession::SessionTimer(void) const
+	?CloneL@CMceRedCodec@@UBEPAVCMceAudioCodec@@XZ @ 116 NONAME ; class CMceAudioCodec * CMceRedCodec::CloneL(void) const
+	?FrameSize@CMceCodec@@QBEIXZ @ 117 NONAME ; unsigned int CMceCodec::FrameSize(void) const
+	?NewLC@CMceVideoStream@@SAPAV1@XZ @ 118 NONAME ; class CMceVideoStream * CMceVideoStream::NewLC(void)
+	?SetSamplingFreq@CMceG711Codec@@UAEHI@Z @ 119 NONAME ; int CMceG711Codec::SetSamplingFreq(unsigned int)
+	?EnableL@CMceSpeakerSink@@UAEXXZ @ 120 NONAME ; void CMceSpeakerSink::EnableL(void)
+	?EnableVAD@CMceG729Codec@@UAEHH@Z @ 121 NONAME ; int CMceG729Codec::EnableVAD(int)
+	?Profile@CMceSession@@QBEKXZ @ 122 NONAME ; unsigned long CMceSession::Profile(void) const
+	??1CMceRedCodec@@UAE@XZ @ 123 NONAME ; CMceRedCodec::~CMceRedCodec(void)
+	?SetAllowedBitrates@CMceiLBCCodec@@UAEHI@Z @ 124 NONAME ; int CMceiLBCCodec::SetAllowedBitrates(unsigned int)
+	??1CMceInRefer@@UAE@XZ @ 125 NONAME ; CMceInRefer::~CMceInRefer(void)
+	?TranscodingProgressL@CMceFileSource@@QBEHXZ @ 126 NONAME ; int CMceFileSource::TranscodingProgressL(void) const
+	?RemoveSinkL@CMceMediaStream@@QAEXAAVCMceMediaSink@@@Z @ 127 NONAME ; void CMceMediaStream::RemoveSinkL(class CMceMediaSink &)
+	?BoundStream@CMceMediaStream@@QBEHXZ @ 128 NONAME ; int CMceMediaStream::BoundStream(void) const
+	?State@CMceEvent@@QBE?AW4TState@1@XZ @ 129 NONAME ; enum CMceEvent::TState CMceEvent::State(void) const
+	??1CMceCameraSource@@UAE@XZ @ 130 NONAME ; CMceCameraSource::~CMceCameraSource(void)
+	?SetPositionL@CMceFileSource@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 131 NONAME ; void CMceFileSource::SetPositionL(class TTimeIntervalMicroSeconds const &)
+	?SetSamplingFreq@CMceAmrCodec@@UAEHI@Z @ 132 NONAME ; int CMceAmrCodec::SetSamplingFreq(unsigned int)
+	?SetPayloadType@CMceG729Codec@@UAEHE@Z @ 133 NONAME ; int CMceG729Codec::SetPayloadType(unsigned char)
+	?SetMaxBitrateL@CMceAvcCodec@@UAEXI@Z @ 134 NONAME ; void CMceAvcCodec::SetMaxBitrateL(unsigned int)
+	?DisableL@CMceSpeakerSink@@UAEXXZ @ 135 NONAME ; void CMceSpeakerSink::DisableL(void)
+	?SetVolumeL@CMceSpeakerSink@@QAEXH@Z @ 136 NONAME ; void CMceSpeakerSink::SetVolumeL(int)
+	?SetBitrate@CMceAmrCodec@@UAEHI@Z @ 137 NONAME ; int CMceAmrCodec::SetBitrate(unsigned int)
+	?EnableSsrcL@CMceRtpSource@@QAEXI@Z @ 138 NONAME ; void CMceRtpSource::EnableSsrcL(unsigned int)
+	?SetBitrate@CMceCnCodec@@UAEHI@Z @ 139 NONAME ; int CMceCnCodec::SetBitrate(unsigned int)
+	?NewL@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 140 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewL(class TBuf8<20>)
+	?CloneL@CMceG729Codec@@UBEPAVCMceAudioCodec@@XZ @ 141 NONAME ; class CMceAudioCodec * CMceG729Codec::CloneL(void) const
+	??1CMceMediaStream@@UAE@XZ @ 142 NONAME ; CMceMediaStream::~CMceMediaStream(void)
+	?SetDefaultHeadersL@CMceManager@@QAEXPAVCDesC8Array@@0@Z @ 143 NONAME ; void CMceManager::SetDefaultHeadersL(class CDesC8Array *, class CDesC8Array *)
+	?EnableL@CMceRtpSink@@UAEXXZ @ 144 NONAME ; void CMceRtpSink::EnableL(void)
+	?NewLC@CMceRtpSink@@SAPAV1@XZ @ 145 NONAME ; class CMceRtpSink * CMceRtpSink::NewLC(void)
+	?SetAllowedBitrates@CMceG729Codec@@UAEHI@Z @ 146 NONAME ; int CMceG729Codec::SetAllowedBitrates(unsigned int)
+	?ExposureL@CMceCameraSource@@QAE?AW4TExposure@CCamera@@XZ @ 147 NONAME ; enum CCamera::TExposure CMceCameraSource::ExposureL(void)
+	?SetCodecMode@CMceAmrCodec@@UAEHI@Z @ 148 NONAME ; int CMceAmrCodec::SetCodecMode(unsigned int)
+	?SetReferObserver@CMceManager@@QAEXPAVMMceReferObserver@@@Z @ 149 NONAME ; void CMceManager::SetReferObserver(class MMceReferObserver *)
+	?SetCameraIndexL@CMceCameraSource@@QAEXH@Z @ 150 NONAME ; void CMceCameraSource::SetCameraIndexL(int)
+	?SetBitrate@CMceH263Codec@@UAEHI@Z @ 151 NONAME ; int CMceH263Codec::SetBitrate(unsigned int)
+	??1CMceFileSink@@UAE@XZ @ 152 NONAME ; CMceFileSink::~CMceFileSink(void)
+	?Originator@CMceEvent@@QBEABVTDesC8@@XZ @ 153 NONAME ; class TDesC8 const & CMceEvent::Originator(void) const
+	?GainL@CMceMicSource@@QBEHXZ @ 154 NONAME ; int CMceMicSource::GainL(void) const
+	?SetRedPayloadTypesL@CMceRedCodec@@QAEXABV?$RArray@I@@@Z @ 155 NONAME ; void CMceRedCodec::SetRedPayloadTypesL(class RArray<unsigned int> const &)
+	?SetPTime@CMceiLBCCodec@@UAEHI@Z @ 156 NONAME ; int CMceiLBCCodec::SetPTime(unsigned int)
+	?CloneL@CMceiLBCCodec@@UBEPAVCMceAudioCodec@@XZ @ 157 NONAME ; class CMceAudioCodec * CMceiLBCCodec::CloneL(void) const
+	??1CMceVideoStream@@UAE@XZ @ 158 NONAME ; CMceVideoStream::~CMceVideoStream(void)
+	?DisableL@CMceRtpSink@@UAEXXZ @ 159 NONAME ; void CMceRtpSink::DisableL(void)
+	??1CMceSecureOutSession@@UAE@XZ @ 160 NONAME ; CMceSecureOutSession::~CMceSecureOutSession(void)
+	??1CMceMicSource@@UAE@XZ @ 161 NONAME ; CMceMicSource::~CMceMicSource(void)
+	?Resolution@CMceVideoCodec@@QBE?AVTSize@@XZ @ 162 NONAME ; class TSize CMceVideoCodec::Resolution(void) const
+	?NewLC@CMceMicSource@@SAPAV1@XZ @ 163 NONAME ; class CMceMicSource * CMceMicSource::NewLC(void)
+	?CancelTranscodeL@CMceFileSource@@QAEXXZ @ 164 NONAME ; void CMceFileSource::CancelTranscodeL(void)
+	?SetResolutionL@CMceAvcCodec@@UAEXVTSize@@@Z @ 165 NONAME ; void CMceAvcCodec::SetResolutionL(class TSize)
+	?ContrastL@CMceCameraSource@@QAEHXZ @ 166 NONAME ; int CMceCameraSource::ContrastL(void)
+	?PriorityL@CMceDisplaySink@@QAEIXZ @ 167 NONAME ; unsigned int CMceDisplaySink::PriorityL(void)
+	??1CMceManager@@UAE@XZ @ 168 NONAME ; CMceManager::~CMceManager(void)
+	?Recipient@CMceRefer@@QBEABVTDesC8@@XZ @ 169 NONAME ; class TDesC8 const & CMceRefer::Recipient(void) const
+	?SetPTime@CMceG729Codec@@UAEHI@Z @ 170 NONAME ; int CMceG729Codec::SetPTime(unsigned int)
+	?SetMaxPTime@CMceAmrCodec@@UAEHI@Z @ 171 NONAME ; int CMceAmrCodec::SetMaxPTime(unsigned int)
+	?SetDisplay@CMceDisplaySink@@QAEXAAVRWindow@@AAVCWindowGc@@@Z @ 172 NONAME ; void CMceDisplaySink::SetDisplay(class RWindow &, class CWindowGc &)
+	?NewL@CMceManager@@SAPAV1@ABVTUid@@PAVTMceTransactionDataContainer@@@Z @ 173 NONAME ; class CMceManager * CMceManager::NewL(class TUid const &, class TMceTransactionDataContainer *)
+	?Streams@CMceSession@@QBEABV?$RPointerArray@VCMceMediaStream@@@@XZ @ 174 NONAME ; class RPointerArray<class CMceMediaStream> const & CMceSession::Streams(void) const
+	??1CMceDisplaySink@@UAE@XZ @ 175 NONAME ; CMceDisplaySink::~CMceDisplaySink(void)
+	?SupportedVideoCodecs@CMceVideoStream@@QBEABV?$RPointerArray@$$CBVCMceVideoCodec@@@@XZ @ 176 NONAME ; class RPointerArray<class CMceVideoCodec const > const & CMceVideoStream::SupportedVideoCodecs(void) const
+	?Sessions@CMceManager@@QBEABV?$RPointerArray@VCMceSession@@@@XZ @ 177 NONAME ; class RPointerArray<class CMceSession> const & CMceManager::Sessions(void) const
+	??0TMceTransactionDataContainer@@QAE@XZ @ 178 NONAME ; TMceTransactionDataContainer::TMceTransactionDataContainer(void)
+	?SetFrameRateL@CMceAvcCodec@@UAEXN@Z @ 179 NONAME ; void CMceAvcCodec::SetFrameRateL(double)
+	?ConnectionActive@CMceSession@@QBEHXZ @ 180 NONAME ; int CMceSession::ConnectionActive(void) const
+	?RemoveCodecL@CMceAudioStream@@QAEXAAVCMceAudioCodec@@@Z @ 181 NONAME ; void CMceAudioStream::RemoveCodecL(class CMceAudioCodec &)
+	?SetPriorityL@CMceDisplaySink@@QAEXI@Z @ 182 NONAME ; void CMceDisplaySink::SetPriorityL(unsigned int)
+	?CloneL@CMceAmrCodec@@UBEPAVCMceAudioCodec@@XZ @ 183 NONAME ; class CMceAudioCodec * CMceAmrCodec::CloneL(void) const
+	?NewL@CMceOutSession@@SAPAV1@AAVCMceManager@@KABVTDesC8@@1PAVCDesC8Array@@@Z @ 184 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceManager &, unsigned long, class TDesC8 const &, class TDesC8 const &, class CDesC8Array *)
+	?SetPayloadType@CMceRedCodec@@UAEHE@Z @ 185 NONAME ; int CMceRedCodec::SetPayloadType(unsigned char)
+	?NewL@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 186 NONAME ; class CMceH263Codec * CMceH263Codec::NewL(class TBuf8<20>)
+	?CloneL@CMceAvcCodec@@UBEPAVCMceVideoCodec@@XZ @ 187 NONAME ; class CMceVideoCodec * CMceAvcCodec::CloneL(void) const
+	?Type@CMceStreamBundle@@QBE?AW4TMceStreamBundleType@1@XZ @ 188 NONAME ; enum CMceStreamBundle::TMceStreamBundleType CMceStreamBundle::Type(void) const
+	?NewL@CMceOutSession@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@PAVHBufC8@@@Z @ 189 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class HBufC8 *)
+	??1CMceAudioStream@@UAE@XZ @ 190 NONAME ; CMceAudioStream::~CMceAudioStream(void)
+	?SetSamplingFreq@CMceiLBCCodec@@UAEHI@Z @ 191 NONAME ; int CMceiLBCCodec::SetSamplingFreq(unsigned int)
+	?LocalMediaPort@CMceMediaStream@@QBEIXZ @ 192 NONAME ; unsigned int CMceMediaStream::LocalMediaPort(void) const
+	?InitializeL@CMceFcMsgExchange@@QAEXAAVCMceSession@@HAAVMMceFcMsgObserver@@@Z @ 193 NONAME ; void CMceFcMsgExchange::InitializeL(class CMceSession &, int, class MMceFcMsgObserver &)
+	?NewL@CMceAudioStream@@SAPAV1@XZ @ 194 NONAME ; class CMceAudioStream * CMceAudioStream::NewL(void)
+	?Sinks@CMceMediaStream@@QBEABV?$RPointerArray@VCMceMediaSink@@@@XZ @ 195 NONAME ; class RPointerArray<class CMceMediaSink> const & CMceMediaStream::Sinks(void) const
+	?SetResolutionL@CMceH263Codec@@UAEXVTSize@@@Z @ 196 NONAME ; void CMceH263Codec::SetResolutionL(class TSize)
+	?NewL@CMceSpeakerSink@@SAPAV1@XZ @ 197 NONAME ; class CMceSpeakerSink * CMceSpeakerSink::NewL(void)
+	?DisplayRectL@CMceDisplaySink@@QAE?BVTRect@@XZ @ 198 NONAME ; class TRect const CMceDisplaySink::DisplayRectL(void)
+	?SetDigitalZoomFactorL@CMceCameraSource@@QAEXH@Z @ 199 NONAME ; void CMceCameraSource::SetDigitalZoomFactorL(int)
+	?SetBrightnessL@CMceCameraSource@@QAEXH@Z @ 200 NONAME ; void CMceCameraSource::SetBrightnessL(int)
+	?NewL@CMceStreamBundle@@SAPAV1@W4TMceStreamBundleType@1@@Z @ 201 NONAME ; class CMceStreamBundle * CMceStreamBundle::NewL(enum CMceStreamBundle::TMceStreamBundleType)
+	?NewL@CMceOutRefer@@SAPAV1@AAVCMceRefer@@ABVTDesC8@@W4TType@2@@Z @ 202 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceRefer &, class TDesC8 const &, enum CMceRefer::TType)
+	?SetSamplingFreq@CMceCnCodec@@UAEHI@Z @ 203 NONAME ; int CMceCnCodec::SetSamplingFreq(unsigned int)
+	?AcceptL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 204 NONAME ; void CMceInSession::AcceptL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	??1CMceSecureInSession@@UAE@XZ @ 205 NONAME ; CMceSecureInSession::~CMceSecureInSession(void)
+	?SetEventObserver@CMceManager@@QAEXPAVMMceEventObserver@@@Z @ 206 NONAME ; void CMceManager::SetEventObserver(class MMceEventObserver *)
+	?AddSinkL@CMceMediaStream@@QAEXPAVCMceMediaSink@@@Z @ 207 NONAME ; void CMceMediaStream::AddSinkL(class CMceMediaSink *)
+	?NewL@CMceRtpSink@@SAPAV1@HPAVHBufC8@@@Z @ 208 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(int, class HBufC8 *)
+	?ServiceType@CMceSession@@QBEKXZ @ 209 NONAME ; unsigned long CMceSession::ServiceType(void) const
+	?CodecMode@CMceCodec@@QBEIXZ @ 210 NONAME ; unsigned int CMceCodec::CodecMode(void) const
+	?DigitalZoomFactorL@CMceCameraSource@@QAEHXZ @ 211 NONAME ; int CMceCameraSource::DigitalZoomFactorL(void)
+	?BindL@CMceMediaStream@@QAEXPAV1@@Z @ 212 NONAME ; void CMceMediaStream::BindL(class CMceMediaStream *)
+	?SetFastForwardL@CMceFileSource@@QAEXH@Z @ 213 NONAME ; void CMceFileSource::SetFastForwardL(int)
+	?SupportedAudioCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceAudioCodec@@@@XZ @ 214 NONAME ; class RPointerArray<class CMceAudioCodec const > const & CMceManager::SupportedAudioCodecs(void) const
+	?SetSamplingFreq@CMceG729Codec@@UAEHI@Z @ 215 NONAME ; int CMceG729Codec::SetSamplingFreq(unsigned int)
+	?SendSRL@CMceRtpSink@@QAEXXZ @ 216 NONAME ; void CMceRtpSink::SendSRL(void)
+	?NewLC@CMceAvcCodec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 217 NONAME ; class CMceAvcCodec * CMceAvcCodec::NewLC(class TBuf8<20>)
+	??1CMceOutRefer@@UAE@XZ @ 218 NONAME ; CMceOutRefer::~CMceOutRefer(void)
+	?DisableL@CMceFileSource@@UAEXXZ @ 219 NONAME ; void CMceFileSource::DisableL(void)
+	?AllowedBitrates@CMceCodec@@QBEIXZ @ 220 NONAME ; unsigned int CMceCodec::AllowedBitrates(void) const
+	?ConfigKeyL@CMceVideoCodec@@QBEPAVHBufC8@@XZ @ 221 NONAME ; class HBufC8 * CMceVideoCodec::ConfigKeyL(void) const
+	?AllowedFrameRates@CMceVideoCodec@@QBEIXZ @ 222 NONAME ; unsigned int CMceVideoCodec::AllowedFrameRates(void) const
+	?SetGainL@CMceMicSource@@QAEXH@Z @ 223 NONAME ; void CMceMicSource::SetGainL(int)
+	?SetCodecMode@CMceCnCodec@@UAEHI@Z @ 224 NONAME ; int CMceCnCodec::SetCodecMode(unsigned int)
+	?EventHeader@CMceEvent@@QBEABVTDesC8@@XZ @ 225 NONAME ; class TDesC8 const & CMceEvent::EventHeader(void) const
+	?SetPTime@CMceCnCodec@@UAEHI@Z @ 226 NONAME ; int CMceCnCodec::SetPTime(unsigned int)
+	?IsEnabled@CMceMediaStream@@QBEHXZ @ 227 NONAME ; int CMceMediaStream::IsEnabled(void) const
+	?BrightnessL@CMceCameraSource@@QAEHXZ @ 228 NONAME ; int CMceCameraSource::BrightnessL(void)
+	?AssociatedEventsL@CMceRefer@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 229 NONAME ; class RPointerArray<class CMceEvent> * CMceRefer::AssociatedEventsL(void) const
+	?SetBitrate@CMceDtmfCodec@@UAEHI@Z @ 230 NONAME ; int CMceDtmfCodec::SetBitrate(unsigned int)
+	?Bitrate@CMceCodec@@QBEIXZ @ 231 NONAME ; unsigned int CMceCodec::Bitrate(void) const
+	??1CMceMediaSink@@UAE@XZ @ 232 NONAME ; CMceMediaSink::~CMceMediaSink(void)
+	?SetAllowedBitrates@CMceRedCodec@@UAEHI@Z @ 233 NONAME ; int CMceRedCodec::SetAllowedBitrates(unsigned int)
+	??1CMceAvcCodec@@UAE@XZ @ 234 NONAME ; CMceAvcCodec::~CMceAvcCodec(void)
+	?AssociatedSession@CMceEvent@@QBEPAVCMceSession@@XZ @ 235 NONAME ; class CMceSession * CMceEvent::AssociatedSession(void) const
+	?SetBitrate@CMceG711Codec@@UAEHI@Z @ 236 NONAME ; int CMceG711Codec::SetBitrate(unsigned int)
+	?CamerasAvailable@CMceCameraSource@@QBEHXZ @ 237 NONAME ; int CMceCameraSource::CamerasAvailable(void) const
+	??1CMceOutSession@@UAE@XZ @ 238 NONAME ; CMceOutSession::~CMceOutSession(void)
+	?SetPTime@CMceAmrCodec@@UAEHI@Z @ 239 NONAME ; int CMceAmrCodec::SetPTime(unsigned int)
+	?State@CMceCodec@@QBE?AW4TState@1@XZ @ 240 NONAME ; enum CMceCodec::TState CMceCodec::State(void) const
+	?NewL@CMceOutEvent@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@2KPAVHBufC8@@@Z @ 241 NONAME ; class CMceOutEvent * CMceOutEvent::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class TDesC8 const &, unsigned long, class HBufC8 *)
+	?Refers@CMceManager@@QBEABV?$RPointerArray@VCMceRefer@@@@XZ @ 242 NONAME ; class RPointerArray<class CMceRefer> const & CMceManager::Refers(void) const
+	?Ssrcs@CMceRtpSource@@QBEABV?$RArray@I@@XZ @ 243 NONAME ; class RArray<unsigned int> const & CMceRtpSource::Ssrcs(void) const
+	??1CMceRtpSource@@UAE@XZ @ 244 NONAME ; CMceRtpSource::~CMceRtpSource(void)
+	?DisableSsrcL@CMceRtpSource@@QAEXI@Z @ 245 NONAME ; void CMceRtpSource::DisableSsrcL(unsigned int)
+	?RespondL@CMceInSession@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 246 NONAME ; void CMceInSession::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?NewL@CMceOutRefer@@SAPAV1@AAVCMceEvent@@ABVTDesC8@@W4TType@CMceRefer@@@Z @ 247 NONAME ; class CMceOutRefer * CMceOutRefer::NewL(class CMceEvent &, class TDesC8 const &, enum CMceRefer::TType)
+	?TerminateL@CMceSession@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 248 NONAME ; void CMceSession::TerminateL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?Type@CMceMediaStream@@QBEIXZ @ 249 NONAME ; unsigned int CMceMediaStream::Type(void) const
+	?DisableL@CMceMicSource@@UAEXXZ @ 250 NONAME ; void CMceMicSource::DisableL(void)
+	?SetMediaObserver@CMceManager@@QAEXPAVMMceStreamObserver@@@Z @ 251 NONAME ; void CMceManager::SetMediaObserver(class MMceStreamObserver *)
+	?SetStandByTimerL@CMceCodec@@QAEXK@Z @ 252 NONAME ; void CMceCodec::SetStandByTimerL(unsigned long)
+	?SetAllowedFrameRatesL@CMceH263Codec@@UAEXI@Z @ 253 NONAME ; void CMceH263Codec::SetAllowedFrameRatesL(unsigned int)
+	?NewL@CMceRtpSink@@SAPAV1@XZ @ 254 NONAME ; class CMceRtpSink * CMceRtpSink::NewL(void)
+	?Session@CMceMediaStream@@QBEPAVCMceSession@@XZ @ 255 NONAME ; class CMceSession * CMceMediaStream::Session(void) const
+	?SetSessionObserver@CMceManager@@QAEXPAVMMceSessionObserver@@@Z @ 256 NONAME ; void CMceManager::SetSessionObserver(class MMceSessionObserver *)
+	?NewL@CMceMicSource@@SAPAV1@XZ @ 257 NONAME ; class CMceMicSource * CMceMicSource::NewL(void)
+	?EnableVAD@CMceRedCodec@@UAEHH@Z @ 258 NONAME ; int CMceRedCodec::EnableVAD(int)
+	??1CMceInEvent@@UAE@XZ @ 259 NONAME ; CMceInEvent::~CMceInEvent(void)
+	?Originator@CMceSession@@QBEABVTDesC8@@XZ @ 260 NONAME ; class TDesC8 const & CMceSession::Originator(void) const
+	?SetKeepAliveTimerL@CMceCodec@@QAEXE@Z @ 261 NONAME ; void CMceCodec::SetKeepAliveTimerL(unsigned char)
+	?SetConfigKeyL@CMceAvcCodec@@UAEXABVTDesC8@@@Z @ 262 NONAME ; void CMceAvcCodec::SetConfigKeyL(class TDesC8 const &)
+	?SetSourceL@CMceMediaStream@@QAEXPAVCMceMediaSource@@@Z @ 263 NONAME ; void CMceMediaStream::SetSourceL(class CMceMediaSource *)
+	?NewL@CMceVideoStream@@SAPAV1@XZ @ 264 NONAME ; class CMceVideoStream * CMceVideoStream::NewL(void)
+	?SetFastRewindL@CMceFileSource@@QAEXH@Z @ 265 NONAME ; void CMceFileSource::SetFastRewindL(int)
+	?RemoveCodecL@CMceVideoStream@@QAEXAAVCMceVideoCodec@@@Z @ 266 NONAME ; void CMceVideoStream::RemoveCodecL(class CMceVideoCodec &)
+	?DefaultHeadersL@CMceManager@@QBEPAVCDesC8Array@@ABVTDesC8@@@Z @ 267 NONAME ; class CDesC8Array * CMceManager::DefaultHeadersL(class TDesC8 const &) const
+	?EnableL@CMceDisplaySink@@UAEXXZ @ 268 NONAME ; void CMceDisplaySink::EnableL(void)
+	?SdpName@CMceCodec@@QBEABVTDesC8@@XZ @ 269 NONAME ; class TDesC8 const & CMceCodec::SdpName(void) const
+	?NewL@CMceFileSource@@SAPAV1@AAVCMceManager@@ABV?$TBuf@$0BAA@@@@Z @ 270 NONAME ; class CMceFileSource * CMceFileSource::NewL(class CMceManager &, class TBuf<256> const &)
+	?DisableInactivityTimerL@CMceRtpSource@@QAEXXZ @ 271 NONAME ; void CMceRtpSource::DisableInactivityTimerL(void)
+	?UpdateL@CMceFileSource@@QAEXABV?$TBuf@$0BAA@@@@Z @ 272 NONAME ; void CMceFileSource::UpdateL(class TBuf<256> const &)
+	?RespondL@CMceInEvent@@QAEXABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 273 NONAME ; void CMceInEvent::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?SetCodecMode@CMceH263Codec@@UAEHI@Z @ 274 NONAME ; int CMceH263Codec::SetCodecMode(unsigned int)
+	?MaxGainL@CMceMicSource@@QBEHXZ @ 275 NONAME ; int CMceMicSource::MaxGainL(void) const
+	?EnableL@CMceMicSource@@UAEXXZ @ 276 NONAME ; void CMceMicSource::EnableL(void)
+	?UpdateL@CMceOutEvent@@QAEXKPAVCDesC8Array@@PAVHBufC8@@1@Z @ 277 NONAME ; void CMceOutEvent::UpdateL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?NewLC@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 278 NONAME ; class CMceCameraSource * CMceCameraSource::NewLC(class CMceManager &)
+	?SendResponseL@CMceSession@@QAEXKABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 279 NONAME ; void CMceSession::SendResponseL(unsigned long, class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?GetContent@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 280 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetContent(void)
+	?DisableL@CMceDisplaySink@@UAEXXZ @ 281 NONAME ; void CMceDisplaySink::DisableL(void)
+	?PayloadType@CMceCodec@@QBEEXZ @ 282 NONAME ; unsigned char CMceCodec::PayloadType(void) const
+	?TerminateL@CMceEvent@@QAEXPAVCDesC8Array@@PAVHBufC8@@1@Z @ 283 NONAME ; void CMceEvent::TerminateL(class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?AcceptL@CMceInRefer@@QAEPAVCMceInEvent@@XZ @ 284 NONAME ; class CMceInEvent * CMceInRefer::AcceptL(void)
+	?SetZoomFactorL@CMceCameraSource@@QAEXH@Z @ 285 NONAME ; void CMceCameraSource::SetZoomFactorL(int)
+	?CancelL@CMceOutSession@@QAEXXZ @ 286 NONAME ; void CMceOutSession::CancelL(void)
+	?AddCodecL@CMceAudioStream@@QAEXPAVCMceAudioCodec@@@Z @ 287 NONAME ; void CMceAudioStream::AddCodecL(class CMceAudioCodec *)
+	??1CMceAmrWbCodec@@UAE@XZ @ 288 NONAME ; CMceAmrWbCodec::~CMceAmrWbCodec(void)
+	?CloneL@CMceG711Codec@@UBEPAVCMceAudioCodec@@XZ @ 289 NONAME ; class CMceAudioCodec * CMceG711Codec::CloneL(void) const
+	?Codecs@CMceAudioStream@@QAEABV?$RPointerArray@VCMceAudioCodec@@@@XZ @ 290 NONAME ; class RPointerArray<class CMceAudioCodec> const & CMceAudioStream::Codecs(void)
+	??1CMceMediaSource@@UAE@XZ @ 291 NONAME ; CMceMediaSource::~CMceMediaSource(void)
+	?MediaElementCountL@CMceFileSource@@QBEHI@Z @ 292 NONAME ; int CMceFileSource::MediaElementCountL(unsigned int) const
+	?RejectL@CMceInRefer@@QAEXXZ @ 293 NONAME ; void CMceInRefer::RejectL(void)
+	?UpdateL@CMceSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 294 NONAME ; void CMceSession::UpdateL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
+	?SetDisplayRectL@CMceDisplaySink@@QAEXABVTRect@@@Z @ 295 NONAME ; void CMceDisplaySink::SetDisplayRectL(class TRect const &)
+	?GetHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 296 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetHeaders(void)
+	??1CMceCnCodec@@UAE@XZ @ 297 NONAME ; CMceCnCodec::~CMceCnCodec(void)
+	?AssociatedRefersL@CMceRefer@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 298 NONAME ; class RPointerArray<class CMceRefer> * CMceRefer::AssociatedRefersL(void) const
+	??1CMceFileSource@@UAE@XZ @ 299 NONAME ; CMceFileSource::~CMceFileSource(void)
+	?EnableL@CMceCameraSource@@UAEXXZ @ 300 NONAME ; void CMceCameraSource::EnableL(void)
+	?SetBitrate@CMceiLBCCodec@@UAEHI@Z @ 301 NONAME ; int CMceiLBCCodec::SetBitrate(unsigned int)
+	?Codecs@CMceVideoStream@@QAEABV?$RPointerArray@VCMceVideoCodec@@@@XZ @ 302 NONAME ; class RPointerArray<class CMceVideoCodec> const & CMceVideoStream::Codecs(void)
+	?SetServiceTypeL@CMceSession@@QAEXK@Z @ 303 NONAME ; void CMceSession::SetServiceTypeL(unsigned long)
+	?NewL@CMceOutSession@@SAPAV1@AAVCMceRefer@@@Z @ 304 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceRefer &)
+	?SetPayloadType@CMceH263Codec@@UAEHE@Z @ 305 NONAME ; int CMceH263Codec::SetPayloadType(unsigned char)
+	?BoundStreamL@CMceMediaStream@@QBEAAV1@XZ @ 306 NONAME ; class CMceMediaStream & CMceMediaStream::BoundStreamL(void) const
+	?RotationL@CMceDisplaySink@@QAE?AW4TRotation@1@XZ @ 307 NONAME ; enum CMceDisplaySink::TRotation CMceDisplaySink::RotationL(void)
+	?SetMaxPTime@CMceDtmfCodec@@UAEHI@Z @ 308 NONAME ; int CMceDtmfCodec::SetMaxPTime(unsigned int)
+	?GetStatusCode@TMceTransactionDataContainer@@QAEHXZ @ 309 NONAME ; int TMceTransactionDataContainer::GetStatusCode(void)
+	?AssociatedRefersL@CMceSession@@QBEPAV?$RPointerArray@VCMceRefer@@@@XZ @ 310 NONAME ; class RPointerArray<class CMceRefer> * CMceSession::AssociatedRefersL(void) const
+	?NewLC@CMceH263Codec@@SAPAV1@V?$TBuf8@$0BE@@@@Z @ 311 NONAME ; class CMceH263Codec * CMceH263Codec::NewLC(class TBuf8<20>)
+	?MediaAttributeLinesL@CMceFcMsgExchange@@QAEPAVMDesC8Array@@AAVCMceSession@@@Z @ 312 NONAME ; class MDesC8Array * CMceFcMsgExchange::MediaAttributeLinesL(class CMceSession &)
+	?NewLC@CMceFileSink@@SAPAV1@ABV?$TBuf@$0BAA@@@@Z @ 313 NONAME ; class CMceFileSink * CMceFileSink::NewLC(class TBuf<256> const &)
+	?RoutingL@CMceSpeakerSink@@QBEHXZ @ 314 NONAME ; int CMceSpeakerSink::RoutingL(void) const
+	?NewL@CMceOutSession@@SAPAV1@AAVCMceEvent@@@Z @ 315 NONAME ; class CMceOutSession * CMceOutSession::NewL(class CMceEvent &)
+	?State@CMceRefer@@QBE?AW4TState@1@XZ @ 316 NONAME ; enum CMceRefer::TState CMceRefer::State(void) const
+	?SetSamplingFreq@CMceRedCodec@@UAEHI@Z @ 317 NONAME ; int CMceRedCodec::SetSamplingFreq(unsigned int)
+	?SetAllowedFrameRatesL@CMceAvcCodec@@UAEXI@Z @ 318 NONAME ; void CMceAvcCodec::SetAllowedFrameRatesL(unsigned int)
+	?FourCC@CMceCodec@@QBEKXZ @ 319 NONAME ; unsigned long CMceCodec::FourCC(void) const
+	?AssociatedEventsL@CMceEvent@@QBEPAV?$RPointerArray@VCMceEvent@@@@XZ @ 320 NONAME ; class RPointerArray<class CMceEvent> * CMceEvent::AssociatedEventsL(void) const
+	?PositionL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 321 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::PositionL(void) const
+	?SetMaxPTime@CMceG711Codec@@UAEHI@Z @ 322 NONAME ; int CMceG711Codec::SetMaxPTime(unsigned int)
+	?Originator@CMceRefer@@QBEABVTDesC8@@XZ @ 323 NONAME ; class TDesC8 const & CMceRefer::Originator(void) const
+	?SetBitrate@CMceRedCodec@@UAEHI@Z @ 324 NONAME ; int CMceRedCodec::SetBitrate(unsigned int)
+	?DisableL@CMceRtpSource@@UAEXXZ @ 325 NONAME ; void CMceRtpSource::DisableL(void)
+	?SetPayloadType@CMceAvcCodec@@UAEHE@Z @ 326 NONAME ; int CMceAvcCodec::SetPayloadType(unsigned char)
+	?NewL@CMceCameraSource@@SAPAV1@AAVCMceManager@@@Z @ 327 NONAME ; class CMceCameraSource * CMceCameraSource::NewL(class CMceManager &)
+	?RespondL@CMceInRefer@@QAEPAVCMceInEvent@@ABVTDesC8@@KPAVCDesC8Array@@PAVHBufC8@@2@Z @ 328 NONAME ; class CMceInEvent * CMceInRefer::RespondL(class TDesC8 const &, unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?SetAllowedBitrates@CMceH263Codec@@UAEHI@Z @ 329 NONAME ; int CMceH263Codec::SetAllowedBitrates(unsigned int)
+	?MMFPriority@CMceCodec@@QBEHXZ @ 330 NONAME ; int CMceCodec::MMFPriority(void) const
+	?FrameRate@CMceVideoCodec@@QBENXZ @ 331 NONAME ; double CMceVideoCodec::FrameRate(void) const
+	?SetBitrate@CMceG729Codec@@UAEHI@Z @ 332 NONAME ; int CMceG729Codec::SetBitrate(unsigned int)
+	?GetContentHeaders@TMceTransactionDataContainer@@QAEPAVCDesC8Array@@XZ @ 333 NONAME ; class CDesC8Array * TMceTransactionDataContainer::GetContentHeaders(void)
+	?NewL@CMceRtpSource@@SAPAV1@IIKPAVHBufC8@@@Z @ 334 NONAME ; class CMceRtpSource * CMceRtpSource::NewL(unsigned int, unsigned int, unsigned long, class HBufC8 *)
+	?EstablishL@CMceOutSession@@QAEXKPAVCDesC8Array@@PAVHBufC8@@10@Z @ 335 NONAME ; void CMceOutSession::EstablishL(unsigned long, class CDesC8Array *, class HBufC8 *, class HBufC8 *, class CDesC8Array *)
+	?EnableInactivityTimerL@CMceRtpSource@@QAEXK@Z @ 336 NONAME ; void CMceRtpSource::EnableInactivityTimerL(unsigned long)
+	?ReferTo@CMceRefer@@QBEABVTDesC8@@XZ @ 337 NONAME ; class TDesC8 const & CMceRefer::ReferTo(void) const
+	?MMFPriorityPreference@CMceCodec@@QBEHXZ @ 338 NONAME ; int CMceCodec::MMFPriorityPreference(void) const
+	?SetCodecMode@CMceRedCodec@@UAEHI@Z @ 339 NONAME ; int CMceRedCodec::SetCodecMode(unsigned int)
+	?SetDisplayIndexL@CMceDisplaySink@@QAEXH@Z @ 340 NONAME ; void CMceDisplaySink::SetDisplayIndexL(int)
+	?MaxVolumeL@CMceSpeakerSink@@QBEHXZ @ 341 NONAME ; int CMceSpeakerSink::MaxVolumeL(void) const
+	?RedPayloadTypesL@CMceRedCodec@@QAEXAAV?$RArray@I@@@Z @ 342 NONAME ; void CMceRedCodec::RedPayloadTypesL(class RArray<unsigned int> &)
+	?Preference@CMceCodec@@QBEHXZ @ 343 NONAME ; int CMceCodec::Preference(void) const
+	?KeepAliveTimer@CMceCodec@@QBEEXZ @ 344 NONAME ; unsigned char CMceCodec::KeepAliveTimer(void) const
+	?SendRequestL@CMceSession@@QAEKABVTDesC8@@PAVCDesC8Array@@PAVHBufC8@@2@Z @ 345 NONAME ; unsigned long CMceSession::SendRequestL(class TDesC8 const &, class CDesC8Array *, class HBufC8 *, class HBufC8 *)
+	?SetDtmfObserver@CMceManager@@QAEXPAVMMceDtmfObserver@@@Z @ 346 NONAME ; void CMceManager::SetDtmfObserver(class MMceDtmfObserver *)
+	?DurationL@CMceFileSource@@QBE?AVTTimeIntervalMicroSeconds@@XZ @ 347 NONAME ; class TTimeIntervalMicroSeconds CMceFileSource::DurationL(void) const
+	??1CMceInSession@@UAE@XZ @ 348 NONAME ; CMceInSession::~CMceInSession(void)
+	?SendL@CMceFcMsgExchange@@QAEXAAVCMceSession@@PAVHBufC8@@@Z @ 349 NONAME ; void CMceFcMsgExchange::SendL(class CMceSession &, class HBufC8 *)
+	?EnableL@CMceRtpSource@@UAEXXZ @ 350 NONAME ; void CMceRtpSource::EnableL(void)
+	?SetCodecMode@CMceDtmfCodec@@UAEHI@Z @ 351 NONAME ; int CMceDtmfCodec::SetCodecMode(unsigned int)
+	?AcceptL@CMceInSession@@QAEXXZ @ 352 NONAME ; void CMceInSession::AcceptL(void)
+	?SetAllowedResolutionsL@CMceH263Codec@@UAEXI@Z @ 353 NONAME ; void CMceH263Codec::SetAllowedResolutionsL(unsigned int)
+	?AddBundleL@CMceSession@@QAEXPAVCMceStreamBundle@@@Z @ 354 NONAME ; void CMceSession::AddBundleL(class CMceStreamBundle *)
+	??1CMceOutEvent@@UAE@XZ @ 355 NONAME ; CMceOutEvent::~CMceOutEvent(void)
+	?IsEnabled@CMceMediaSink@@QBEHXZ @ 356 NONAME ; int CMceMediaSink::IsEnabled(void) const
+	?SetCodecMode@CMceG711Codec@@UAEHI@Z @ 357 NONAME ; int CMceG711Codec::SetCodecMode(unsigned int)
+	?SetPayloadType@CMceAmrCodec@@UAEHE@Z @ 358 NONAME ; int CMceAmrCodec::SetPayloadType(unsigned char)
+	??1CMceG711Codec@@UAE@XZ @ 359 NONAME ; CMceG711Codec::~CMceG711Codec(void)
+	?SetStateL@CMceCodec@@QAEXW4TState@1@@Z @ 360 NONAME ; void CMceCodec::SetStateL(enum CMceCodec::TState)
+	?SetInSessionObserver@CMceManager@@QAEXPAVMMceInSessionObserver@@@Z @ 361 NONAME ; void CMceManager::SetInSessionObserver(class MMceInSessionObserver *)
+	?GetReasonPhrase@TMceTransactionDataContainer@@QAEPAVHBufC8@@XZ @ 362 NONAME ; class HBufC8 * TMceTransactionDataContainer::GetReasonPhrase(void)
+	?SetMaxPTime@CMceCnCodec@@UAEHI@Z @ 363 NONAME ; int CMceCnCodec::SetMaxPTime(unsigned int)
+	?SetSessionSDPLinesL@CMceSession@@QAEXPAVCDesC8Array@@@Z @ 364 NONAME ; void CMceSession::SetSessionSDPLinesL(class CDesC8Array *)
+	?SetAllowedBitrates@CMceAvcCodec@@UAEHI@Z @ 365 NONAME ; int CMceAvcCodec::SetAllowedBitrates(unsigned int)
+	?EnableL@CMceFileSource@@UAEXXZ @ 366 NONAME ; void CMceFileSource::EnableL(void)
+	?EnableL@CMceFileSink@@UAEXXZ @ 367 NONAME ; void CMceFileSink::EnableL(void)
+	?SetMaxPTime@CMceRedCodec@@UAEHI@Z @ 368 NONAME ; int CMceRedCodec::SetMaxPTime(unsigned int)
+	?SetContrastL@CMceCameraSource@@QAEXH@Z @ 369 NONAME ; void CMceCameraSource::SetContrastL(int)
+	?Recipient@CMceEvent@@QBEABVTDesC8@@XZ @ 370 NONAME ; class TDesC8 const & CMceEvent::Recipient(void) const
+	?WhiteBalanceL@CMceCameraSource@@QAE?AW4TWhiteBalance@CCamera@@XZ @ 371 NONAME ; enum CCamera::TWhiteBalance CMceCameraSource::WhiteBalanceL(void)
+	?SetKeepAliveDataL@CMceCodec@@QAEXABVTDesC8@@@Z @ 372 NONAME ; void CMceCodec::SetKeepAliveDataL(class TDesC8 const &)
+	?AddCodecL@CMceVideoStream@@QAEXPAVCMceVideoCodec@@@Z @ 373 NONAME ; void CMceVideoStream::AddCodecL(class CMceVideoCodec *)
+	?NewL@CMceFcMsgExchange@@SAPAV1@AAVCMceManager@@ABVTDesC8@@@Z @ 374 NONAME ; class CMceFcMsgExchange * CMceFcMsgExchange::NewL(class CMceManager &, class TDesC8 const &)
+	?SetMMFPriorityL@CMceCodec@@QAEXH@Z @ 375 NONAME ; void CMceCodec::SetMMFPriorityL(int)
+	?KeepAlivePayloadType@CMceCodec@@QBEEXZ @ 376 NONAME ; unsigned char CMceCodec::KeepAlivePayloadType(void) const
+	?SessionSDPLinesL@CMceSession@@QAEPAVMDesC8Array@@XZ @ 377 NONAME ; class MDesC8Array * CMceSession::SessionSDPLinesL(void)
+	?SetPreferenceL@CMceCodec@@QAEXH@Z @ 378 NONAME ; void CMceCodec::SetPreferenceL(int)
+	?Ssrc@CMceRtpSink@@QBEKXZ @ 379 NONAME ; unsigned long CMceRtpSink::Ssrc(void) const
+	??1CMceAmrCodec@@UAE@XZ @ 380 NONAME ; CMceAmrCodec::~CMceAmrCodec(void)
+	?EnableVAD@CMceDtmfCodec@@UAEHH@Z @ 381 NONAME ; int CMceDtmfCodec::EnableVAD(int)
+	?State@CMceMediaStream@@QBE?AW4TState@1@XZ @ 382 NONAME ; enum CMceMediaStream::TState CMceMediaStream::State(void) const
+	?Source@CMceMediaStream@@QBEPAVCMceMediaSource@@XZ @ 383 NONAME ; class CMceMediaSource * CMceMediaStream::Source(void) const
+	?SetKeepAlivePayloadTypeL@CMceCodec@@QAEXE@Z @ 384 NONAME ; void CMceCodec::SetKeepAlivePayloadTypeL(unsigned char)
+	?SetInReferObserver@CMceManager@@QAEXPAVMMceInReferObserver@@@Z @ 385 NONAME ; void CMceManager::SetInReferObserver(class MMceInReferObserver *)
+	?NewL@CMceSecureOutSession@@SAPAV1@AAVCMceManager@@AAVCSIPProfile@@ABVTDesC8@@PAVHBufC8@@@Z @ 386 NONAME ; class CMceSecureOutSession * CMceSecureOutSession::NewL(class CMceManager &, class CSIPProfile &, class TDesC8 const &, class HBufC8 *)
+	?EnableVAD@CMceG711Codec@@UAEHH@Z @ 387 NONAME ; int CMceG711Codec::EnableVAD(int)
+	?IsEnabled@CMceMediaSource@@QBEHXZ @ 388 NONAME ; int CMceMediaSource::IsEnabled(void) const
+	?SetAllowedBitrates@CMceCnCodec@@UAEHI@Z @ 389 NONAME ; int CMceCnCodec::SetAllowedBitrates(unsigned int)
+	?SetPathToSaveReceivedFile@CMceMsrpSink@@QAEXABVTDesC16@@@Z @ 390 NONAME ; void CMceMsrpSink::SetPathToSaveReceivedFile(class TDesC16 const &)
+	?NewLC@CMceMessageSink@@SAPAV1@AAVCMceManager@@@Z @ 391 NONAME ; class CMceMessageSink * CMceMessageSink::NewLC(class CMceManager &)
+	?Path@CMceMsrpSource@@QAEAAV?$RPointerArray@VTUriC8@@@@XZ @ 392 NONAME ; class RPointerArray<class TUriC8> & CMceMsrpSource::Path(void)
+	??1CMceExternalSource@@UAE@XZ @ 393 NONAME ; CMceExternalSource::~CMceExternalSource(void)
+	?EnableL@CMceExternalSink@@UAEXXZ @ 394 NONAME ; void CMceExternalSink::EnableL(void)
+	?SetFileSelectorL@CMceMsrpSource@@QAEXABVTDesC16@@ABVTDesC8@@I@Z @ 395 NONAME ; void CMceMsrpSource::SetFileSelectorL(class TDesC16 const &, class TDesC8 const &, unsigned int)
+	?GetRemoteMediaPortL@TMceSessionUtility@@SAXPAVCMceMediaStream@@AAI@Z @ 396 NONAME ; void TMceSessionUtility::GetRemoteMediaPortL(class CMceMediaStream *, unsigned int &)
+	?SetPathL@CMceMsrpSink@@QAEXABV?$RPointerArray@VTUriC8@@@@@Z @ 397 NONAME ; void CMceMsrpSink::SetPathL(class RPointerArray<class TUriC8> const &)
+	?getRemoteMediaSDPAttrL@TMceSessionUtility@@SAPAVHBufC8@@PAVCMceMediaStream@@ABVTDesC8@@@Z @ 398 NONAME ; class HBufC8 * TMceSessionUtility::getRemoteMediaSDPAttrL(class CMceMediaStream *, class TDesC8 const &)
+	?getSessionSdPLineL@TMceSessionUtility@@SAPAVHBufC8@@PAVCMceSession@@W4TSDPLineName@1@@Z @ 399 NONAME ; class HBufC8 * TMceSessionUtility::getSessionSdPLineL(class CMceSession *, enum TMceSessionUtility::TSDPLineName)
+	?SetFileTransferIdL@CMceMsrpSink@@QAEXAAVTDes8@@@Z @ 400 NONAME ; void CMceMsrpSink::SetFileTransferIdL(class TDes8 &)
+	?EnableL@CMceMsrpSource@@UAEXXZ @ 401 NONAME ; void CMceMsrpSource::EnableL(void)
+	?EnableL@CMceMessageSink@@UAEXXZ @ 402 NONAME ; void CMceMessageSink::EnableL(void)
+	?NewLC@CMceMsrpSink@@SAPAV1@XZ @ 403 NONAME ; class CMceMsrpSink * CMceMsrpSink::NewLC(void)
+	??1CMceMsrpSink@@UAE@XZ @ 404 NONAME ; CMceMsrpSink::~CMceMsrpSink(void)
+	?DisableL@CMceMessageSink@@UAEXXZ @ 405 NONAME ; void CMceMessageSink::DisableL(void)
+	?CloneL@CMceMsrpCodec@@UBEPAVCMceMessageCodec@@XZ @ 406 NONAME ; class CMceMessageCodec * CMceMsrpCodec::CloneL(void) const
+	?SetMaxPTime@CMceMsrpCodec@@UAEHI@Z @ 407 NONAME ; int CMceMsrpCodec::SetMaxPTime(unsigned int)
+	?SetInformationAttrL@CMceMsrpSource@@QAEXABVTDes8@@@Z @ 408 NONAME ; void CMceMsrpSource::SetInformationAttrL(class TDes8 const &)
+	?EnableL@CMceMessageSource@@UAEXXZ @ 409 NONAME ; void CMceMessageSource::EnableL(void)
+	?SetAcceptTypesL@CMceMsrpSource@@QAEXABVMDesC8Array@@@Z @ 410 NONAME ; void CMceMsrpSource::SetAcceptTypesL(class MDesC8Array const &)
+	?RemoveCodecL@CMceMessageStream@@QAEXAAVCMceMessageCodec@@@Z @ 411 NONAME ; void CMceMessageStream::RemoveCodecL(class CMceMessageCodec &)
+	?SetFileDispositionL@CMceMsrpSink@@QAEXABVTDes8@@@Z @ 412 NONAME ; void CMceMsrpSink::SetFileDispositionL(class TDes8 const &)
+	??1CMceMessageSource@@UAE@XZ @ 413 NONAME ; CMceMessageSource::~CMceMessageSource(void)
+	?SetCodecMode@CMceMsrpCodec@@UAEHI@Z @ 414 NONAME ; int CMceMsrpCodec::SetCodecMode(unsigned int)
+	?SetFileDispositionL@CMceMsrpSource@@QAEXABVTDes8@@@Z @ 415 NONAME ; void CMceMsrpSource::SetFileDispositionL(class TDes8 const &)
+	?SetAcceptWrappedTypesL@CMceMsrpSink@@QAEXABVTDes8@@@Z @ 416 NONAME ; void CMceMsrpSink::SetAcceptWrappedTypesL(class TDes8 const &)
+	?DisableL@CMceExternalSink@@UAEXXZ @ 417 NONAME ; void CMceExternalSink::DisableL(void)
+	?GetLocalMediaPortL@TMceSessionUtility@@SAXPAVCMceMediaStream@@AAI@Z @ 418 NONAME ; void TMceSessionUtility::GetLocalMediaPortL(class CMceMediaStream *, unsigned int &)
+	?EnableVAD@CMceMsrpCodec@@UAEHH@Z @ 419 NONAME ; int CMceMsrpCodec::EnableVAD(int)
+	?SetPathL@CMceMsrpSource@@QAEXABV?$RPointerArray@VTUriC8@@@@@Z @ 420 NONAME ; void CMceMsrpSource::SetPathL(class RPointerArray<class TUriC8> const &)
+	?NewLC@CMceMessageSource@@SAPAV1@AAVCMceManager@@@Z @ 421 NONAME ; class CMceMessageSource * CMceMessageSource::NewLC(class CMceManager &)
+	?SetPayloadType@CMceMsrpCodec@@UAEHE@Z @ 422 NONAME ; int CMceMsrpCodec::SetPayloadType(unsigned char)
+	?SetAllowedBitrates@CMceMsrpCodec@@UAEHI@Z @ 423 NONAME ; int CMceMsrpCodec::SetAllowedBitrates(unsigned int)
+	?ReuseMsrpConnectionL@CMceMessageStream@@QAEXH@Z @ 424 NONAME ; void CMceMessageStream::ReuseMsrpConnectionL(int)
+	?EnableFileTransferProgressNotifications@CMceMsrpSink@@QAEXH@Z @ 425 NONAME ; void CMceMsrpSink::EnableFileTransferProgressNotifications(int)
+	?SetAcceptTypesL@CMceMsrpSink@@QAEXABVMDesC8Array@@@Z @ 426 NONAME ; void CMceMsrpSink::SetAcceptTypesL(class MDesC8Array const &)
+	?AcceptWrappedTypesL@CMceMsrpSink@@QAEAAVTDes8@@XZ @ 427 NONAME ; class TDes8 & CMceMsrpSink::AcceptWrappedTypesL(void)
+	?AcceptWrappedTypesL@CMceMsrpSource@@QAEAAVTDes8@@XZ @ 428 NONAME ; class TDes8 & CMceMsrpSource::AcceptWrappedTypesL(void)
+	?SetFileTransferIdL@CMceMsrpSource@@QAEXAAVTDes8@@@Z @ 429 NONAME ; void CMceMsrpSource::SetFileTransferIdL(class TDes8 &)
+	?ConnectionSetUpL@CMceMessageStream@@QAEXW4TConnSetup@1@@Z @ 430 NONAME ; void CMceMessageStream::ConnectionSetUpL(enum CMceMessageStream::TConnSetup)
+	??1CMceMsrpCodec@@UAE@XZ @ 431 NONAME ; CMceMsrpCodec::~CMceMsrpCodec(void)
+	?SetInformationAttrL@CMceMsrpSink@@QAEXABVTDes8@@@Z @ 432 NONAME ; void CMceMsrpSink::SetInformationAttrL(class TDes8 const &)
+	??1CMceExternalSink@@UAE@XZ @ 433 NONAME ; CMceExternalSink::~CMceExternalSink(void)
+	?NewL@CMceMsrpSource@@SAPAV1@XZ @ 434 NONAME ; class CMceMsrpSource * CMceMsrpSource::NewL(void)
+	?NewL@CMceMsrpSink@@SAPAV1@XZ @ 435 NONAME ; class CMceMsrpSink * CMceMsrpSink::NewL(void)
+	?SetPTime@CMceMsrpCodec@@UAEHI@Z @ 436 NONAME ; int CMceMsrpCodec::SetPTime(unsigned int)
+	?SetFileSharingObserver@CMceManager@@QAEXPAVMMceFileSharingObserver@@@Z @ 437 NONAME ; void CMceManager::SetFileSharingObserver(class MMceFileSharingObserver *)
+	?NewL@CMceExternalSink@@SAPAV1@XZ @ 438 NONAME ; class CMceExternalSink * CMceExternalSink::NewL(void)
+	?Codecs@CMceMessageStream@@QAEABV?$RPointerArray@VCMceMessageCodec@@@@XZ @ 439 NONAME ; class RPointerArray<class CMceMessageCodec> const & CMceMessageStream::Codecs(void)
+	?SetPathToSaveReceivedFile@CMceMsrpSource@@QAEXABVTDesC16@@@Z @ 440 NONAME ; void CMceMsrpSource::SetPathToSaveReceivedFile(class TDesC16 const &)
+	?EnableL@CMceExternalSource@@UAEXXZ @ 441 NONAME ; void CMceExternalSource::EnableL(void)
+	?GetConnectionSetup@CMceMessageStream@@QAE?AW4TConnSetup@1@XZ @ 442 NONAME ; enum CMceMessageStream::TConnSetup CMceMessageStream::GetConnectionSetup(void)
+	?NewLC@CMceMsrpSource@@SAPAV1@XZ @ 443 NONAME ; class CMceMsrpSource * CMceMsrpSource::NewLC(void)
+	?NewL@CMceExternalSource@@SAPAV1@XZ @ 444 NONAME ; class CMceExternalSource * CMceExternalSource::NewL(void)
+	?DisableL@CMceMessageSource@@UAEXXZ @ 445 NONAME ; void CMceMessageSource::DisableL(void)
+	?NewL@CMceMessageSource@@SAPAV1@AAVCMceManager@@@Z @ 446 NONAME ; class CMceMessageSource * CMceMessageSource::NewL(class CMceManager &)
+	?SetSamplingFreq@CMceMsrpCodec@@UAEHI@Z @ 447 NONAME ; int CMceMsrpCodec::SetSamplingFreq(unsigned int)
+	?SendDataL@CMceMessageSource@@QAEXABVTDesC8@@@Z @ 448 NONAME ; void CMceMessageSource::SendDataL(class TDesC8 const &)
+	?NewL@CMceMessageStream@@SAPAV1@XZ @ 449 NONAME ; class CMceMessageStream * CMceMessageStream::NewL(void)
+	?GetLocalConnectionAddrL@TMceSessionUtility@@SAXPAVCMceSession@@AAVTInetAddr@@@Z @ 450 NONAME ; void TMceSessionUtility::GetLocalConnectionAddrL(class CMceSession *, class TInetAddr &)
+	?SupportedMessageCodecs@CMceManager@@QBEABV?$RPointerArray@$$CBVCMceMessageCodec@@@@XZ @ 451 NONAME ; class RPointerArray<class CMceMessageCodec const > const & CMceManager::SupportedMessageCodecs(void) const
+	?DisableL@CMceMsrpSource@@UAEXXZ @ 452 NONAME ; void CMceMsrpSource::DisableL(void)
+	?AcceptTypesL@CMceMsrpSink@@QAEXAAVCDesC8ArrayFlat@@@Z @ 453 NONAME ; void CMceMsrpSink::AcceptTypesL(class CDesC8ArrayFlat &)
+	?GetRemoteConnectionAddrL@TMceSessionUtility@@SAPAVHBufC8@@PAVCMceMediaStream@@@Z @ 454 NONAME ; class HBufC8 * TMceSessionUtility::GetRemoteConnectionAddrL(class CMceMediaStream *)
+	?EnableL@CMceMsrpSink@@UAEXXZ @ 455 NONAME ; void CMceMsrpSink::EnableL(void)
+	?AddCodecL@CMceMessageStream@@QAEXPAVCMceMessageCodec@@@Z @ 456 NONAME ; void CMceMessageStream::AddCodecL(class CMceMessageCodec *)
+	?SetAcceptWrappedTypesL@CMceMsrpSource@@QAEXABVTDes8@@@Z @ 457 NONAME ; void CMceMsrpSource::SetAcceptWrappedTypesL(class TDes8 const &)
+	?Path@CMceMsrpSink@@QAEAAV?$RPointerArray@VTUriC8@@@@XZ @ 458 NONAME ; class RPointerArray<class TUriC8> & CMceMsrpSink::Path(void)
+	?AcceptTypesL@CMceMsrpSource@@QAEXAAVCDesC8ArrayFlat@@@Z @ 459 NONAME ; void CMceMsrpSource::AcceptTypesL(class CDesC8ArrayFlat &)
+	?NewL@CMceMessageSink@@SAPAV1@AAVCMceManager@@@Z @ 460 NONAME ; class CMceMessageSink * CMceMessageSink::NewL(class CMceManager &)
+	?ReplaceCodecsL@CMceMessageStream@@QAEXPAV?$RPointerArray@VCMceMessageCodec@@@@@Z @ 461 NONAME ; void CMceMessageStream::ReplaceCodecsL(class RPointerArray<class CMceMessageCodec> *)
+	?NewLC@CMceMessageStream@@SAPAV1@XZ @ 462 NONAME ; class CMceMessageStream * CMceMessageStream::NewLC(void)
+	?NewLC@CMceExternalSink@@SAPAV1@XZ @ 463 NONAME ; class CMceExternalSink * CMceExternalSink::NewLC(void)
+	?SetDataSinkObserver@CMceManager@@QAEXPAVMMceDataSinkObserver@@@Z @ 464 NONAME ; void CMceManager::SetDataSinkObserver(class MMceDataSinkObserver *)
+	??1CMceMessageStream@@UAE@XZ @ 465 NONAME ; CMceMessageStream::~CMceMessageStream(void)
+	?DisableL@CMceMsrpSink@@UAEXXZ @ 466 NONAME ; void CMceMsrpSink::DisableL(void)
+	?NewLC@CMceExternalSource@@SAPAV1@XZ @ 467 NONAME ; class CMceExternalSource * CMceExternalSource::NewLC(void)
+	?DisableL@CMceExternalSource@@UAEXXZ @ 468 NONAME ; void CMceExternalSource::DisableL(void)
+	??1CMceMessageSink@@UAE@XZ @ 469 NONAME ; CMceMessageSink::~CMceMessageSink(void)
+	?EnableFileTransferProgressNotifications@CMceMsrpSource@@QAEXH@Z @ 470 NONAME ; void CMceMsrpSource::EnableFileTransferProgressNotifications(int)
+	?SetFileSelectorL@CMceMsrpSink@@QAEXABVTDesC16@@ABVTDesC8@@I@Z @ 471 NONAME ; void CMceMsrpSink::SetFileSelectorL(class TDesC16 const &, class TDesC8 const &, unsigned int)
+	?SetBitrate@CMceMsrpCodec@@UAEHI@Z @ 472 NONAME ; int CMceMsrpCodec::SetBitrate(unsigned int)
+	??1CMceMsrpSource@@UAE@XZ @ 473 NONAME ; CMceMsrpSource::~CMceMsrpSource(void)
+
--- a/multimediacommsengine/mmcecli/group/mceclient.mmp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/group/mceclient.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -81,6 +81,18 @@
 SOURCE          mcesecureinsession.cpp
 SOURCE          mcesecureoutsession.cpp
 SOURCE          staticdllentry.cpp
+SOURCE			mcemessagestream.cpp
+SOURCE			mceexternalsink.cpp
+SOURCE			mceexternalsource.cpp
+SOURCE			mcemsrpsink.cpp
+SOURCE			mcemsrpsource.cpp
+SOURCE			mcesessionutility.cpp
+SOURCE			mcemessagesink.cpp
+SOURCE			mcemessagesource.cpp
+SOURCE 			mcemessagecodec.cpp 
+SOURCE			mcemsrpcodec.cpp
+SOURCE			mcedatasender.cpp
+SOURCE			mcedatareceiver.cpp
 
 SOURCEPATH      ../../mmceshared/src
 SOURCE          mcecomsession.cpp
@@ -117,6 +129,15 @@
 SOURCE          mceserial.cpp
 SOURCE          mceevents.cpp
 SOURCE          mcecomserializationcontext.cpp
+SOURCE			mcecomexternalsink.cpp
+SOURCE			mcecomexternalsource.cpp
+SOURCE			mcecommessagestream.cpp
+SOURCE			mcecommsrpsource.cpp
+SOURCE			mcecommsrpsink.cpp
+SOURCE			mcecommessagesource.cpp
+SOURCE			mcecommessagesink.cpp
+SOURCE			mcecommsrpcodec.cpp
+SOURCE			mcecommessagecodec.cpp
 
 
 
@@ -137,5 +158,6 @@
 LIBRARY         charconv.lib
 LIBRARY         flogger.lib
 LIBRARY         efsrv.lib
-
+LIBRARY 		inetprotutil.lib
+LIBRARY 		sdpcodec.lib
 PAGED
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/inc/mcedatareceiver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,64 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef MCEDATARECEIVER_H
+#define MCEDATARECEIVER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+#include "mcedatasinkobserver.h"
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccDataReceiver class declaration
+*/
+class CMceDataReceiver : public CActive
+	{
+    public:
+    
+	    static CMceDataReceiver* NewL( MMceDataSinkObserver& aObserver );
+		
+	    ~CMceDataReceiver(); 
+		
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMceDataReceiver( MMceDataSinkObserver& aObserver );
+	    void ConstructL(); // second construction phase
+        TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+	    TBool iReady;
+		RMsgQueue<TQueueBuffer> iSendMsgQueue;		
+	    RMsgQueue<TQueueBuffer> iSendMsgQueue1;    
+	    RMsgQueue<TQueueBuffer> iSendMsgQueue2;
+		MMceDataSinkObserver* iObserver;
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/inc/mcedatasender.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,67 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef MCEDATASENDER_H
+#define MCEDATASENDER_H
+#include <E32Base.h>
+#include <e32msgqueue.h>
+
+
+typedef TBuf8<50> TQueueBuffer;
+
+// CLASS DECLARATION
+
+/**
+*  CMccPeriodicRunner class declaration
+*/
+class CMceDataSender : public CActive
+	{
+    public:
+    
+	    static CMceDataSender* NewL();
+		
+	    ~CMceDataSender(); 
+		
+	public:
+	 
+	 	void Send( const TDesC8& aData );
+	 	
+    public: // From CActive
+
+		void DoCancel();
+		void RunL();
+		TInt RunError(TInt aError);	
+
+    private:
+        CMceDataSender();
+	    void ConstructL(); // second construction phase
+	    TInt AssignNameToMessageQueueL(const TDes16 &aMessageBuffer);
+
+    private:
+	    
+	    TBool iReady;
+		RMsgQueue<TQueueBuffer> iMsgQueue;
+	    RMsgQueue<TQueueBuffer> iMsgQueue1;    
+	    RMsgQueue<TQueueBuffer> iMsgQueue2;
+		TQueueBuffer iBuffer;
+		 
+    };
+
+
+#endif
\ No newline at end of file
--- a/multimediacommsengine/mmcecli/inc/mcefactory.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/inc/mcefactory.h	Mon Sep 06 17:32:13 2010 +0530
@@ -33,6 +33,7 @@
 #include "mcedefs.h"
 #include "mceclientserver.h"
 #include "mcecomserializationcontext.h"
+#include "mcemessagecodec.h"
 
 class CMceMediaSource;
 class CMceMediaSink;
@@ -104,6 +105,21 @@
 
 	};
 
+class TMceMessageCodecFactory
+	{
+
+public:
+    
+    CMceMessageCodec* CreateL( TBuf8<KMceMaxSdpNameLength> aSdpName );	
+    
+    CMceMessageCodec* CreateLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
+
+    CMceMessageCodec* CreateLC( MMceComSerializationContext& aSerCtx );	
+
+	};
+
+
+
 class TMceFactory
     {
     
@@ -146,7 +162,13 @@
     inline TMceVideoCodecFactory VideoCodecFactory()
         {
         return TMceVideoCodecFactory();
-        }   
+        }
+    
+    inline TMceMessageCodecFactory MessageCodecFactory()
+        {
+        return TMceMessageCodecFactory();
+        }    
+
    	TInt iDummy; 
     };
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcedatareceiver.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,150 @@
+/*
+* 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:    
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "mceclilogs.h"
+#include "mcedatareceiver.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::CMceDataReceiver
+// -----------------------------------------------------------------------------
+//
+CMceDataReceiver::CMceDataReceiver( MMceDataSinkObserver& aObserver )
+    : CActive( EPriorityStandard ), iReady( EFalse ), iObserver( &aObserver )
+    {
+    CActiveScheduler::Add(this);
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceDataReceiver::ConstructL()
+    {
+    MCECLI_DEBUG("CMceDataReceiver::ConstructL, Entry");
+    
+    TBuf16<30> aMessageBuffer(_L("SendQueueForMCCMSRP"));
+    
+    TInt aNo = AssignNameToMessageQueueL(aMessageBuffer);
+    aMessageBuffer.AppendNum(aNo);
+    
+    User::LeaveIfError( iSendMsgQueue.OpenGlobal(aMessageBuffer));
+        
+    iSendMsgQueue.NotifyDataAvailable( iStatus );
+    SetActive();
+    }
+
+
+TInt CMceDataReceiver::AssignNameToMessageQueueL(const TDes16 &aMessageBuffer)
+    {
+    MCECLI_DEBUG( "CMccDataReceiver::AssignNameToMessageQueueL" )
+            
+    
+    // queue to be opened for Sending Data
+    for(TInt i=1; i<=10; i++)
+        {
+        TBuf16<30> tempMessage1 = aMessageBuffer;
+        tempMessage1.AppendNum(i);
+        TInt err1 = iSendMsgQueue1.CreateGlobal(tempMessage1, 5, EOwnerProcess );
+        if(err1 == KErrAlreadyExists)
+            {
+            TBuf16<30> tempMessage2 = aMessageBuffer;
+            tempMessage2.AppendNum(i+1);
+            TInt err2 = iSendMsgQueue2.CreateGlobal(tempMessage2, 5, EOwnerProcess );
+            if(err2 == KErrNone)
+                {
+                iSendMsgQueue2.Close();
+                MCECLI_DEBUG_DVALUE( "CMccDataReceiver::AssignNameToMessageQueueL" , i )
+                return i;
+                }
+            }
+        else
+            {
+            iSendMsgQueue1.Close();
+            }
+        }
+    return 0;
+            
+
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::NewL
+// -----------------------------------------------------------------------------
+//
+CMceDataReceiver* CMceDataReceiver::NewL( MMceDataSinkObserver& aObserver )
+    {
+    MCECLI_DEBUG("CMceDataReceiver::NewL, Entry");
+    CMceDataReceiver* self = 
+        new ( ELeave ) CMceDataReceiver( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::~CMceDataReceiver
+// -----------------------------------------------------------------------------
+//
+CMceDataReceiver::~CMceDataReceiver()
+    {
+    MCECLI_DEBUG("CMceDataReceiver::~CMceDataReceiver, Entry");
+    Cancel();
+    iSendMsgQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMceDataReceiver::DoCancel()
+    {
+    MCECLI_DEBUG("CMceDataReceiver::DoCancel, Entry");
+    iSendMsgQueue.CancelDataAvailable();    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::RunL
+// -----------------------------------------------------------------------------
+//  
+void CMceDataReceiver::RunL()
+    {
+    MCECLI_DEBUG("CMceDataReceiver::RunL, Entry");
+    CMceMediaStream* dummy1 = NULL;
+    CMceMediaSink* dummy2 = NULL;
+    TQueueBuffer buffer;
+    iSendMsgQueue.Receive( buffer );
+    iObserver->DataReceived( *dummy1, *dummy2, buffer );
+    iSendMsgQueue.NotifyDataAvailable( iStatus );
+    SetActive();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataReceiver::RunError
+// -----------------------------------------------------------------------------
+//  
+TInt CMceDataReceiver::RunError(TInt /*aError*/)
+    {
+    MCECLI_DEBUG("CMceDataReceiver::RunError, Entry");
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcedatasender.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,159 @@
+/*
+* 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:    
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "mceclilogs.h"
+#include "mcedatasender.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::CMceDataSender
+// -----------------------------------------------------------------------------
+//
+CMceDataSender::CMceDataSender( )
+	: CActive( EPriorityStandard ), iReady( EFalse )
+	{
+	CActiveScheduler::Add(this);
+	}
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceDataSender::ConstructL()
+    {
+    MCECLI_DEBUG("CMceDataSender::ConstructL, Entry");
+    
+    TBuf16<30> aMessageBuffer(_L("RecvQueueForMCCMSRP"));
+    
+    TInt aNo = AssignNameToMessageQueueL(aMessageBuffer);
+    aMessageBuffer.AppendNum(aNo);
+    
+    User::LeaveIfError(iMsgQueue.OpenGlobal(aMessageBuffer));
+    MCECLI_DEBUG("CMceDataSender::ConstructL, Exit");
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::NewL
+// -----------------------------------------------------------------------------
+//
+CMceDataSender* CMceDataSender::NewL( )
+    {
+    CMceDataSender* self = 
+    	new ( ELeave ) CMceDataSender();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::Send
+// -----------------------------------------------------------------------------
+//
+void CMceDataSender::Send( const TDesC8& aData )
+	{	
+	TQueueBuffer buffer( aData );
+	
+    TInt err = iMsgQueue.Send( buffer );
+    
+    if ( err == KErrOverflow )
+        {
+        if ( !IsActive() )
+            {
+            iBuffer.Copy( aData );            
+            iMsgQueue.NotifySpaceAvailable( iStatus );    
+    	    SetActive();
+            }
+        else
+            {
+            // TODO
+            // BUFFER OR DROP
+            }
+        }
+	}
+
+TInt CMceDataSender::AssignNameToMessageQueueL(const TDes16 &aMessageBuffer)
+    {
+    MCECLI_DEBUG("CMceDataSender::AssignNameToMessageQueueL, Entry");
+    // queue to be opened for Sending Data
+    for(TInt i=1; i<=10; i++)
+        {
+        TBuf16<30> tempMessage1 = aMessageBuffer;
+        tempMessage1.AppendNum(i);
+        TInt err1 = iMsgQueue1.CreateGlobal(tempMessage1, 5, EOwnerProcess );
+        if(err1 == KErrAlreadyExists)
+            {
+            TBuf16<30> tempMessage2 = aMessageBuffer;
+            tempMessage2.AppendNum(i+1);
+            TInt err2 = iMsgQueue2.CreateGlobal(tempMessage2, 5, EOwnerProcess );
+            if(err2 == KErrNone)
+                {
+                iMsgQueue2.Close();
+                MCECLI_DEBUG_DVALUE("CMceDataSender::AssignNameToMessageQueueL, Entry", i);
+                return i;
+                }
+            }
+        else
+            {
+            iMsgQueue1.Close();
+            }
+        }
+    return 0;
+    }
+	
+// -----------------------------------------------------------------------------
+// CMceDataSender::~CMceDataSender
+// -----------------------------------------------------------------------------
+//
+CMceDataSender::~CMceDataSender()
+    {
+    Cancel();
+	iMsgQueue.Close();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CMceDataSender::DoCancel()
+	{
+	iMsgQueue.CancelSpaceAvailable();	
+	}
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::RunL
+// -----------------------------------------------------------------------------
+//	
+void CMceDataSender::RunL()
+	{
+    iMsgQueue.Send( iBuffer );
+    iBuffer.Zero();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceDataSender::RunError
+// -----------------------------------------------------------------------------
+//	
+TInt CMceDataSender::RunError(TInt /*aError*/)
+	{
+	return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mceexternalsink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,117 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mceexternalsink.h"
+#include "mcecomexternalsink.h"
+#include "mcesession.h"
+#include "mceclilogs.h"
+#include "mcemanager.h"
+
+#define _FLAT_DATA static_cast<CMceComExternalSink*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CMceExternalSink::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSink* CMceExternalSink::NewL()
+    {
+    
+    CMceExternalSink* self = CMceExternalSink::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceExternalSinke::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSink* CMceExternalSink::NewLC()
+    {
+    
+    CMceExternalSink* self = new (ELeave) CMceExternalSink();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    
+    }
+	
+
+// -----------------------------------------------------------------------------
+// CMceExternalSink::CMceExternalSink
+// -----------------------------------------------------------------------------
+//
+CMceExternalSink::CMceExternalSink()
+	: CMceMediaSink()
+    {    
+    
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceExternalSink::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceExternalSink::ConstructL()
+    {    
+	CMceComExternalSink *sink = CMceComExternalSink::NewLC();
+	CMceMediaSink::ConstructL( sink );
+	CleanupStack::Pop(sink);
+    }
+
+    
+// -----------------------------------------------------------------------------
+// CMceExternalSink::~CMceExternalSink
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSink::~CMceExternalSink()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMicSource::EnableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceExternalSink::EnableL()
+    {
+    MCECLI_DEBUG("CMceExternalSink::EnableL, Entry");
+    
+    //CMceMediaSource::DoEnableL(); // Not required for Signalling purpose    
+    
+    MCECLI_DEBUG("CMceExternalSink::EnableL, Exit");
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceExternalSink::Disable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceExternalSink::DisableL()
+    {
+    MCECLI_DEBUG("CMceExternalSink::DisableL, Entry");
+    
+    //CMceMediaSource::DoDisableL();  // Not required for Signalling purpose
+
+    MCECLI_DEBUG("CMceExternalSink::DisableL, Exit");
+    
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mceexternalsource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,115 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mceexternalsource.h"
+#include "mcecomexternalsource.h"
+#include "mcesession.h"
+#include "mcemediastream.h"
+#include "mceitcsender.h"
+#include "mceclilogs.h"
+#include "mcemanager.h"
+
+#define _FLAT_DATA static_cast<CMceComExternalSource*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// Cmceexternalsource::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSource* CMceExternalSource::NewL()
+    {    
+    CMceExternalSource* self = CMceExternalSource::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceExternalSource::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSource* CMceExternalSource::NewLC()
+    {    
+    CMceExternalSource* self = new (ELeave) CMceExternalSource();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceExternalSink::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceExternalSource::ConstructL()
+    {    
+	CMceComExternalSource *source = CMceComExternalSource::NewLC();
+	CMceMediaSource::ConstructL( source );
+	CleanupStack::Pop(source);
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceExternalSource::~CMceExternalSource
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceExternalSource::~CMceExternalSource()
+    {
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceExternalSource::~CMceExternalSource
+// -----------------------------------------------------------------------------
+//
+CMceExternalSource::CMceExternalSource()
+	:CMceMediaSource()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMicSource::EnableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceExternalSource::EnableL()
+    {
+    MCECLI_DEBUG("CMceExternalSource::EnableL, Entry");
+    
+    //CMceMediaSource::DoEnableL(); // Not required for Signalling purpose    
+    
+    MCECLI_DEBUG("CMceExternalSource::EnableL, Exit");
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceExternalSource::Disable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceExternalSource::DisableL()
+    {
+    MCECLI_DEBUG("CMceExternalSource::DisableL, Entry");
+    
+    //CMceMediaSource::DoDisableL();  // Not required for Signalling purpose
+
+    MCECLI_DEBUG("CMceExternalSource::DisableL, Exit");
+    
+    }
--- a/multimediacommsengine/mmcecli/src/mcefactory.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/src/mcefactory.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -19,6 +19,7 @@
 
 
 #include <s32buf.h>
+#include <mcedefs.h>
 
 #include "mceinsession.h"
 #include "mceoutsession.h"
@@ -48,6 +49,15 @@
 #include "mcestreambundle.h"
 #include "mceavsink.h"
 #include "mceavccodec.h"
+#include "mcemessagestream.h"
+#include "mcemsrpsource.h"
+#include "mcemsrpsink.h"
+#include "mceexternalsource.h"
+#include "mceexternalsink.h"
+#include "mcemsrpcodec.h"
+#include "mcemessagesource.h"
+#include "mcemessagesink.h"
+
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -254,7 +264,12 @@
             {
             stream = CMceVideoStream::NewLC();
             break;
-            }            
+            }
+        case KMceMessage:
+            {
+            stream = CMceMessageStream::NewLC();
+            break;
+            }
         default:
             {
             break;
@@ -324,6 +339,21 @@
             source = CMceFileSource::NewLC();
             break;
             }
+        case KMceMSRPSource:
+            {
+            source = CMceMsrpSource::NewLC();
+            break;
+            }
+        case KMceExternalSource:
+            {
+            source = CMceExternalSource::NewLC();
+            break;
+            }
+        case KMceMessageSource:
+            {
+            source = CMceMessageSource::NewLC();
+            break;
+            }     
         default:
             {
             break;
@@ -388,6 +418,21 @@
             sink = CMceFileSink::NewLC();
             break;
             }
+        case KMceMSRPSink:
+            {
+            sink = CMceMsrpSink::NewLC();
+            break;
+            }
+        case KMceExternalSink:
+            {
+            sink = CMceExternalSink::NewLC();
+            break;
+            }
+        case KMceMessageSink:
+            {
+            sink = CMceMessageSink::NewLC();
+            break;
+            }
         default:
             {
             break;
@@ -598,3 +643,58 @@
     return codec;    
     }
 
+
+// -----------------------------------------------------------------------------
+// TMceMessageCodecFactory::CreateLC
+// -----------------------------------------------------------------------------
+//
+CMceMessageCodec* TMceMessageCodecFactory::CreateLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceMessageCodec* codec = CreateL( aSdpName );
+    CleanupStack::PushL( codec );
+	return codec;     
+    }
+    
+// -----------------------------------------------------------------------------
+// TMceMessageCodecFactory::CreateL
+// -----------------------------------------------------------------------------
+//
+CMceMessageCodec* TMceMessageCodecFactory::CreateL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceMessageCodec* codec = NULL;
+    if( !aSdpName.CompareF(KMceSDPNameMsrp) )
+        {
+        codec = CMceMsrpCodec::NewL( aSdpName );
+        } 
+    //else if( !aSdpName.CompareF(KMceSDPNameRED) )
+    //    {
+    //    codec = CMceRedCodec::NewL( aSdpName );
+    //    } 
+    else
+        {
+        User::Leave( KErrNotSupported );
+        }
+	return codec;
+	        
+    }
+
+// -----------------------------------------------------------------------------
+// TMceMessageCodecFactory::CreateLC
+// -----------------------------------------------------------------------------
+//
+CMceMessageCodec* TMceMessageCodecFactory::CreateLC( MMceComSerializationContext& aSerCtx )
+    {
+    RReadStream& readStream = aSerCtx.ReadStream();
+    
+    MStreamBuf* streamBuf = readStream.Source();
+    TStreamPos pos = streamBuf->TellL( MStreamBuf::ERead );
+    TBuf8<KMceMaxSdpNameLength> sdpName;
+    MceSerial::DecodeL( sdpName, readStream );
+    
+    streamBuf->SeekL( MStreamBuf::ERead, pos );
+    
+    CMceMessageCodec* codec = CreateL( sdpName );
+    CleanupStack::PushL( codec );
+    codec->InternalizeL( aSerCtx );
+    return codec;    
+    }
--- a/multimediacommsengine/mmcecli/src/mcemanager.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/src/mcemanager.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -30,6 +30,7 @@
 #include "mceinsession.h"
 #include "mceaudiocodec.h"
 #include "mcevideocodec.h"
+#include "mcemessagecodec.h"
 #include "mcefilesource.h"
 #include "mceevent.h"
 #include "mcerefer.h"
@@ -42,6 +43,9 @@
 #include "mceevents.h"
 #include "mceclilogs.h"
 #include "mcecomfilesource.h"
+#include "mcemessagecodec.h"
+#include "mcemsrpcodec.h"
+#include "mcedatasinkobserver.h"
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -90,7 +94,7 @@
     
     iSupportedAudioCodecs.ResetAndDestroy();
     iSupportedVideoCodecs.ResetAndDestroy();
-    
+    iSupportedMessageCodecs.ResetAndDestroy();
     iTranscodingFiles.Reset();
     iTranscodingFiles.Close();
     
@@ -222,6 +226,29 @@
 	iDtmfObserver = aDtmfObserver;	
 	}
 
+//Implement Observer for MSRP messages 
+// -----------------------------------------------------------------------------
+// CMceManager::SetDataSinkObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceManager::SetDataSinkObserver(
+			 MMceDataSinkObserver* aDataObserver )
+	{
+	iDataSinkObserver = aDataObserver;	
+	}
+
+//Implement Observer for MSRP file sharing callbacks 
+// -----------------------------------------------------------------------------
+// CMceManager::SetFileSharingObserver
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceManager::SetFileSharingObserver(
+                MMceFileSharingObserver* aFileSharingObserver )
+    {
+    iFileSharingObserver = aFileSharingObserver;
+    }
+
+
 // -----------------------------------------------------------------------------
 // CMceManager::SupportedAudioCodecs
 // -----------------------------------------------------------------------------
@@ -241,6 +268,16 @@
     {
     return iSupportedVideoCodecs;
     }
+
+// -----------------------------------------------------------------------------
+// CMceManager::SupportedMessageCodecs
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const RPointerArray<const CMceMessageCodec>&
+CMceManager::SupportedMessageCodecs() const
+    {
+    return iSupportedMessageCodecs;
+    }
     
 // -----------------------------------------------------------------------------
 // CMceManager::Sessions
@@ -570,6 +607,15 @@
     }
     
         
+//Implement Observer for MSRP messages 
+// -----------------------------------------------------------------------------
+// CMceEventManager::DataSinkObserver
+// -----------------------------------------------------------------------------
+//    
+MMceDataSinkObserver* CMceManager::DataSinkObserver() const
+    {
+    return iDataSinkObserver;
+    }
 
 // -----------------------------------------------------------------------------
 // CMceEventManager::DtmfObserver
@@ -579,6 +625,16 @@
     {
     return iDtmfObserver;
     }
+
+//Implement Observer for MSRP file sharing callbacks 
+// -----------------------------------------------------------------------------
+// CMceManager::SetFileSharingObserver
+// -----------------------------------------------------------------------------
+//
+MMceFileSharingObserver* CMceManager::FileSharingObserver( ) const
+    {
+    return iFileSharingObserver;
+    }
     
 // -----------------------------------------------------------------------------
 // CMceManager::ServerSession
@@ -1007,6 +1063,8 @@
     
     ReceiveSupportedAudioCodecsL();
     ReceiveSupportedVideoCodecsL();
+    ReceiveSupportedMessageCodecsL();
+    
     	                           
     User::LeaveIfError( iServerSession->SendClientUid( iAppUid ) );
 
@@ -1083,6 +1141,21 @@
     MCECLI_DEBUG("CMceManager::ReceiveSupportedVideoCodecsL, Exit");
     }
     
+// -----------------------------------------------------------------------------
+// CMceManager::ReceiveSupportedMessageCodecsL
+// -----------------------------------------------------------------------------
+//
+void CMceManager::ReceiveSupportedMessageCodecsL() 
+    {
+    MCECLI_DEBUG("CMceManager::ReceiveSupportedMessageCodecsL, Entry");
+    
+    CMceMsrpCodec* codec = CMceMsrpCodec::NewLC( KMceSDPNameMsrp() );            
+    iSupportedMessageCodecs.AppendL( codec );
+    CleanupStack::Pop( codec );
+    
+    MCECLI_DEBUG("CMceManager::ReceiveSupportedMessageCodecsL, Exit");
+    } 
+
     
 // -----------------------------------------------------------------------------
 // CMceManager::NextMediaId
--- a/multimediacommsengine/mmcecli/src/mcemediastream.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/src/mcemediastream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -29,6 +29,7 @@
 #include "mceevents.h"
 #include "mceclilogs.h"
 #include "mcesessionobserver.h"
+#include "mcefilesharingobserver.h"
 
 #define _FLAT_DATA static_cast<CMceComMediaStream*>( iFlatData )
 #define FLAT_DATA( data ) _FLAT_DATA->data
@@ -952,17 +953,101 @@
             }
         status = KMceEventConsumed;
         }
-    else if ( aEvent.Action() == EMceItcLinkCreated )
+    else if (aEvent.Action() == EMceItcFileSendCompleted )
         {
-        MCECLI_DEBUG("CMceMediaStream::HandleEvent, link created");
-        _FLAT_DATA->SetLocalMediaPort( aEvent.ActionData() );
+        // state will be changed automatically so send state change event
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, media state changed");
+        SetState( static_cast<CMceMediaStream::TState>( aEvent.ActionData() ) );
+            
+        if ( !HandleMediaError( FLAT_DATA( iState ), 
+                FLAT_DATA( iIsEnabled ), 
+                aEvent.Id().iStatus ) )
+            {
+            Updated();
+            }
+    
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, EMceItcFileSendCompleted  received");
+        MMceFileSharingObserver* observer = iSession->Manager().FileSharingObserver();
+        if (observer )
+            {
+            observer->SendFileCompleted(aEvent.Id().iStatus);
+            }
+        status = KMceEventConsumed;
+        }
+    else if (aEvent.Action() == EMceFileSendInProgress )
+        {
+        // state will be changed automatically so send state change event
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, media state changed");
+        SetState( static_cast<CMceMediaStream::TState>( aEvent.ActionData() ) );
+                         
+        if ( !HandleMediaError( FLAT_DATA( iState ), 
+                FLAT_DATA( iIsEnabled ), 
+                aEvent.Id().iStatus ) )
+            {
+            Updated();
+            }        
+        
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, EMceFileSendInProgress  received");
+        MMceFileSharingObserver* observer = iSession->Manager().FileSharingObserver();
+        if (observer )
+            {
+            observer->SendFileProgressNotification(aEvent.Id().iSpare1, aEvent.Id().iSpare2);
+            }
         status = KMceEventConsumed;
         }
-    else
+    else if (aEvent.Action() == EMceItcFileReceiveCompleted )
         {
-        //NOP
-        MCECLI_DEBUG("CMceMediaStream::HandleEvent, not consumed");
-        }    
+        // state will be changed automatically so send state change event
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, media state changed");
+        SetState( static_cast<CMceMediaStream::TState>( aEvent.ActionData() ) );
+                                    
+        if ( !HandleMediaError( FLAT_DATA( iState ), 
+                FLAT_DATA( iIsEnabled ), 
+                aEvent.Id().iStatus ) )
+            {
+            Updated();
+            }
+        
+        MCECLI_DEBUG("CMceMediaStream::HandleEvent, EMceItcFileReceiveCompleted  received");
+        MMceFileSharingObserver* observer = iSession->Manager().FileSharingObserver();
+        if (observer )
+            {
+            observer->ReceiveFileCompleted(aEvent.Id().iStatus);
+            }
+        status = KMceEventConsumed;
+        }
+        else if (aEvent.Action() == EMceFileReceiveInProgress )
+            {
+            // state will be changed automatically so send state change event
+            MCECLI_DEBUG("CMceMediaStream::HandleEvent, media state changed");
+            SetState( static_cast<CMceMediaStream::TState>( aEvent.ActionData() ) );
+                                
+            if ( !HandleMediaError( FLAT_DATA( iState ), 
+                    FLAT_DATA( iIsEnabled ), 
+                    aEvent.Id().iStatus ) )
+                {
+                Updated();
+                }
+            
+            MCECLI_DEBUG("CMceMediaStream::HandleEvent, EMceFileReceiveInProgress  received");
+            MMceFileSharingObserver* observer = iSession->Manager().FileSharingObserver();
+            if (observer )
+                {
+                observer->ReceiveFileProgressNotification(aEvent.Id().iSpare1, aEvent.Id().iSpare2);
+                }
+            status = KMceEventConsumed;
+            }
+        else if ( aEvent.Action() == EMceItcLinkCreated )
+            {
+            MCECLI_DEBUG("CMceMediaStream::HandleEvent, link created");
+            _FLAT_DATA->SetLocalMediaPort( aEvent.ActionData() );
+            status = KMceEventConsumed;
+            }
+        else
+            {
+            //NOP
+            MCECLI_DEBUG("CMceMediaStream::HandleEvent, not consumed");
+            }    
         
     MCECLI_DEBUG_DVALUE("CMceMediaStream::HandleEvent, Exit. status", status );
     
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemessagecodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,116 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mcemessagecodec.h"
+#include "mcesession.h"
+#include "mcemanager.h"
+#include "mcemediastream.h"
+#include "mcecommessagecodec.h"
+#include "mceclientserver.h"
+#include "mcefactory.h"
+#include "mceevents.h"
+
+
+#define _FLAT_DATA static_cast<CMceComMessageCodec*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageCodec::InitializeL( CMceMediaStream& aParent )
+    {
+    CMceCodec::InitializeL( aParent );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::~CMceMessageCodec
+// -----------------------------------------------------------------------------
+//
+CMceMessageCodec::~CMceMessageCodec()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::SamplingFreq
+// -----------------------------------------------------------------------------
+//
+TUint CMceMessageCodec::SamplingFreq() const
+    {
+    return FLAT_DATA( iSamplingFreq );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::VAD
+// -----------------------------------------------------------------------------
+//
+TBool CMceMessageCodec::VAD() const
+    {
+    return FLAT_DATA( iEnableVAD );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::PTime
+// -----------------------------------------------------------------------------
+//
+TUint CMceMessageCodec::PTime() const        
+    {
+    return FLAT_DATA( iPTime );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::MaxPTime
+// -----------------------------------------------------------------------------
+//
+TUint CMceMessageCodec::MaxPTime() const        
+    {
+    return FLAT_DATA( iMaxPTime );
+    }
+            
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::CMceMessageCodec
+// -----------------------------------------------------------------------------
+//
+CMceMessageCodec::CMceMessageCodec() :
+    CMceCodec()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageCodec::ConstructL( CMceComMessageCodec* aFlatData )
+    {
+    CMceCodec::ConstructL( aFlatData );
+    }
+            
+
+// -----------------------------------------------------------------------------
+// CMceMessageCodec::Factory
+// -----------------------------------------------------------------------------
+//
+/*TMceMessageCodecFactory CMceMessageCodec::Factory()
+    {
+    return TMceMessageCodecFactory();
+    }*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemessagesink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,171 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mcemessagesink.h"
+#include "mcecommessagesink.h"
+#include "mcesession.h"
+#include "mceclilogs.h"
+#include "mcemediastream.h"
+#include "mcemanager.h"
+#include "mceclilogs.h"
+#include "mcedatareceiver.h"
+#include "mcedatasinkobserver.h"
+
+#define _FLAT_DATA static_cast<CMceComMessageSink*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSink::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSink* CMceMessageSink::NewL( CMceManager& aManager )
+    {
+    MCECLI_DEBUG("CMceMessageSink::NewL, Entry");
+    CMceMessageSink* self = CMceMessageSink::NewLC( aManager );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSinke::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSink* CMceMessageSink::NewLC( CMceManager& aManager )
+    {
+    MCECLI_DEBUG("CMceMessageSink::NewLC, Entry");
+    CMceMessageSink* self = new (ELeave) CMceMessageSink();
+    CleanupStack::PushL( self );
+    self->ConstructL( &aManager );
+    return self;
+    }
+
+    
+// -----------------------------------------------------------------------------
+// CMceMessageSink::~CMceMessageSink
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSink::~CMceMessageSink()
+    {
+    MCECLI_DEBUG("CMceMessageSink::~CMceMessageSink, Entry");
+    delete iReceiver;
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageSink::EnableL()
+    {
+    MCECLI_DEBUG("CMceMessageSink::EnableL, Entry");
+    
+    iReceiver = CMceDataReceiver::NewL( *this );    
+    CMceMediaSink::DoEnableL();
+
+    MCECLI_DEBUG("CMceMessageSink::EnableL, Exit");
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageSink::DisableL()
+    {
+    MCECLI_DEBUG("CMceMessageSink::DisableL, Entry");
+    
+    delete iReceiver;
+    iReceiver = 0;
+    CMceMediaSink::DoDisableL();
+
+    MCECLI_DEBUG("CMceMessageSink::DisableL, Exit");
+    
+    }
+	    
+	    
+        
+// -----------------------------------------------------------------------------
+// Factory method for inner usage
+// -----------------------------------------------------------------------------
+//
+CMceMessageSink* CMceMessageSink::NewL()
+    {
+    MCECLI_DEBUG("CMceMessageSink::NewL, Entry");
+    CMceMessageSink* self = CMceMessageSink::NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Factory method for inner usage
+// -----------------------------------------------------------------------------
+//
+CMceMessageSink* CMceMessageSink::NewLC()
+    {
+    MCECLI_DEBUG("CMceMessageSink::NewLC, Entry");
+    CMceMessageSink* self = new (ELeave) CMceMessageSink();
+    CleanupStack::PushL( self );
+    self->ConstructL( NULL );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// 
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSink::DataReceived( CMceMediaStream& /*aStream*/, CMceMediaSink& /*aSink*/,
+    const TDesC8& aData )
+    {
+    MCECLI_DEBUG("CMceMessageSink::DataReceived, Entry");
+    MMceDataSinkObserver* observer =
+        iStream->Session()->Manager().DataSinkObserver();
+    
+    observer->DataReceived( *iStream, *this, aData );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSink::CMceMessageSink
+// -----------------------------------------------------------------------------
+//
+CMceMessageSink::CMceMessageSink()
+	: CMceMediaSink()
+    { 
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceMessageSink::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSink::ConstructL( CMceManager* /*aManager*/ )
+    {    
+    MCECLI_DEBUG("CMceMessageSink::ConstructL, Entry");
+	CMceComMessageSink *sink = CMceComMessageSink::NewLC();
+	CMceMediaSink::ConstructL( sink );
+	CleanupStack::Pop(sink);
+    
+	//iReceiver = CMceDataReceiver::NewL( *this, iIsexits );
+    
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemessagesource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,197 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mcemessagesource.h"
+#include "mcecommessagesource.h"
+#include "mcesession.h"
+#include "mcemediastream.h"
+#include "mceitcsender.h"
+#include "mceclilogs.h"
+#include "mcemanager.h"
+#include "mce.h"
+#include "mceserial.h"
+#include "mcedatasender.h"
+
+
+#define _FLAT_DATA static_cast<CMceComMessageSource*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CmceMessagesource::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSource* CMceMessageSource::NewL( CMceManager& aManager )
+    {  
+    MCECLI_DEBUG("CMceMessageSource::NewL(aManager), Entry");
+    CMceMessageSource* self = CMceMessageSource::NewLC(aManager);
+    CleanupStack::Pop( self );
+    MCECLI_DEBUG("CMceMessageSource::NewL(aManager), Exit");
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSource::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSource* CMceMessageSource::NewLC( CMceManager& aManager )
+    {    
+    MCECLI_DEBUG("CMceMessageSource::NewLC(aManager), Entry");
+    CMceMessageSource* self = new (ELeave) CMceMessageSource();
+    CleanupStack::PushL( self );
+    self->ConstructL( &aManager);
+    MCECLI_DEBUG("CMceMessageSource::NewLC(aManager), Exit");
+    return self;
+    }
+	
+// -----------------------------------------------------------------------------
+// CMceMessageSource::~CMceMessageSource
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageSource::~CMceMessageSource()
+    {
+    MCECLI_DEBUG("CMceMessageSource::~CMceMessageSource");
+    delete iDataSender;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMicSource::EnableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageSource::EnableL()
+    {
+    MCECLI_DEBUG("CMceMessageSource::EnableL, Entry");
+    
+    iDataSender = CMceDataSender::NewL();
+    CMceMediaSource::DoEnableL(); // Not required for Signalling purpose    
+
+    MCECLI_DEBUG("CMceMessageSource::EnableL, Exit");
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSource::Disable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageSource::DisableL()
+    {
+    MCECLI_DEBUG("CMceMessageSource::DisableL, Entry");
+    
+    delete iDataSender;
+    iDataSender = 0;
+    CMceMediaSource::DoDisableL();  // Not required for Signalling purpose
+    
+    MCECLI_DEBUG("CMceMessageSource::DisableL, Exit");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSource::SendDataL
+// -----------------------------------------------------------------------------
+//      
+EXPORT_C void CMceMessageSource::SendDataL( const TDesC8& aData )
+    {
+    MCECLI_DEBUG("CMceMessageSource::SendDataL, Entry");
+    __ASSERT_ALWAYS( iDataSender, User::Leave( KErrNotReady ) );
+    
+    iDataSender->Send( aData);
+    MCECLI_DEBUG("CMceMessageSource::SendDataL, Exit");
+    }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSource::InitializeL( CMceManager* aManager )
+    {
+    __ASSERT_ALWAYS( aManager, User::Leave( KErrArgument ) );
+    
+    }
+// -----------------------------------------------------------------------------
+// Factory method to inner usage
+// -----------------------------------------------------------------------------
+//
+CMceMessageSource* CMceMessageSource::NewL()
+    {
+    MCECLI_DEBUG("CMceMessageSource::NewL, Entry");
+    CMceMessageSource* self = CMceMessageSource::NewLC();
+    CleanupStack::Pop( self );
+    MCECLI_DEBUG("CMceMessageSource::NewL, Exit");
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// Factory method to inner usage
+// -----------------------------------------------------------------------------
+//
+CMceMessageSource* CMceMessageSource::NewLC()
+    {
+    MCECLI_DEBUG("CMceMessageSource::NewLC, Entry");
+    CMceMessageSource* self = new (ELeave) CMceMessageSource();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    MCECLI_DEBUG("CMceMessageSource::NewLC, Entry");
+    return self;
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceMessageSource::~CMceMessageSource
+// -----------------------------------------------------------------------------
+//
+CMceMessageSource::CMceMessageSource()
+	:CMceMediaSource()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSink::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSource::ConstructL( CMceManager* /*aManager*/ )
+    {    
+    MCECLI_DEBUG("CMceMessageSource::ConstructL, Entry");
+	CMceComMessageSource *source = CMceComMessageSource::NewLC();
+	CMceMediaSource::ConstructL( source );
+	CleanupStack::Pop(source);
+	
+	//iDataSender = CMceDataSender::NewL();
+	MCECLI_DEBUG("CMceMessageSource::ConstructL, Exit");
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSink::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSource::ConstructL()
+    {    
+    MCECLI_DEBUG("CMceMessageSource::ConstructL, Entry");
+    CMceComMessageSource *source = CMceComMessageSource::NewLC();
+    CMceMediaSource::ConstructL( source );
+    CleanupStack::Pop(source);
+    
+     //iDataSender = CMceDataSender::NewL();
+     MCECLI_DEBUG("CMceMessageSource::ConstructL, Exit");
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemessagestream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,366 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mcemessagestream.h"
+#include "mcecommessagestream.h"
+#include "mcemanager.h"
+#include "mcemessagecodec.h"
+#include "mcecommessagestream.h"
+#include "mceserial.h"
+#include "mcemessagecodec.h"
+#include "mcecommessagestream.h"
+#include "mceclilogs.h"
+
+#define _FLAT_DATA static_cast<CMceComMessageStream*>( iFlatData )
+#define FLAT_DATA( data ) (_FLAT_DATA->data)
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceAudioStream::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageStream* CMceMessageStream::NewL()
+    {
+    CMceMessageStream* self = CMceMessageStream::NewLC();
+    CleanupStack::Pop( self );
+    return self; 
+    }
+   
+// -----------------------------------------------------------------------------
+// CMceAudioStream::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageStream* CMceMessageStream::NewLC()
+    {
+    CMceMessageStream* self = new (ELeave) CMceMessageStream();
+    CleanupStack::PushL( self );
+    self->ConstructL();    
+    return self;    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::~CMceMessageStream
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageStream::~CMceMessageStream()
+    {
+    iCodecs.ResetAndDestroy();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::Codecs
+// -----------------------------------------------------------------------------
+//
+EXPORT_C const RPointerArray<CMceMessageCodec>& CMceMessageStream::Codecs()
+    {
+    return iCodecs;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::AddCodecL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageStream::AddCodecL(CMceMessageCodec* aCodec)
+    {
+    __ASSERT_ALWAYS(aCodec, User::Leave(KErrArgument));
+    iCodecs.AppendL(aCodec);
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::RemoveCodecL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageStream::RemoveCodecL(CMceMessageCodec& aCodec)
+    {
+    RemoveCodecL( aCodec, Binder() );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::ReplaceCodecsL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageStream::ReplaceCodecsL(
+    RPointerArray<CMceMessageCodec>* /*aCodecs*/ )
+    {
+    User::Leave( KErrNotSupported );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::CMceMessageStream
+// -----------------------------------------------------------------------------
+//
+CMceMessageStream::CMceMessageStream()
+    :CMceMediaStream()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::ConstructL()
+    {    
+	CMceComMessageStream *stream = CMceComMessageStream::NewLC();
+	CMceMediaStream::ConstructL( stream );
+	CleanupStack::Pop(stream);
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::InitializeL( CMceSession& aParent )
+    {
+    
+    CMceMediaStream::InitializeL( aParent, 0 );
+            
+    for( TInt i = 0; i < iCodecs.Count(); i++ )
+        {
+        iCodecs[i]->InitializeL( *this );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::InitializeL( CMceManager* aManager, CMceSession& aSession )
+    {
+    
+    __ASSERT_ALWAYS( aManager, User::Leave( KErrArgument ) );
+    
+    CMceMediaStream::InitializeL( aManager, aSession );
+    
+    if ( iCodecs.Count() == 0 )
+        {
+        const RPointerArray<const CMceMessageCodec>& supportedCodes = 
+                                      aManager->SupportedMessageCodecs();
+                                      
+        for( TInt i = 0; i < supportedCodes.Count(); i++ )
+            {
+            CMceMessageCodec* codec = supportedCodes[i]->CloneL();
+            CleanupStack::PushL( codec );
+            iCodecs.AppendL( codec );
+            CleanupStack::Pop( codec );
+            MCECLI_DEBUG_SVALUE("CMceMessageStream::InitializeL, \
+Added supported codec", codec->SdpName() );
+            }
+                                      
+        }
+        
+    }
+    
+
+void CMceMessageStream::SynchronizeWithFileL( CMceFileSource& /*aFile*/ )
+	{
+	}
+        
+CMceCodec* CMceMessageStream::FindCodec( CMceCodec& aCodec )
+    {
+    const RPointerArray<CMceCodec>& codecs = 
+        reinterpret_cast<const RPointerArray<CMceCodec>&>( Codecs() );
+    return CMceMediaStream::FindCodec( codecs, aCodec );
+    }
+        
+void CMceMessageStream::ReorderCodecsByPreferenceL( TBool /*aDiscardUnusedCodecs*/ )
+	{
+	}        
+     
+const RPointerArray<CMceCodec>& CMceMessageStream::BaseCodecs()
+	{
+    const RPointerArray<CMceCodec>& codecs = 
+        reinterpret_cast<const RPointerArray<CMceCodec>&>( Codecs() );
+    return codecs;
+	}
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::RemoveCodecL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::RemoveCodecL( CMceMessageCodec& aCodec, TBool aBinderOriginated )
+    {
+    MCECLI_DEBUG_SVALUE( "CMceMessageStream::RemoveCodecL, sdp name:", aCodec.SdpName() )
+    
+    TBool removed( EFalse );
+    for(int i = 0; i < iCodecs.Count() && !removed; i++ )
+        {
+        if( iCodecs[i] == &aCodec || 
+            iCodecs[i]->SdpName().CompareF( aCodec.SdpName() ) == 0 )
+            {
+            MCECLI_DEBUG( "CMceMessageStream::RemoveCodecL, removing" )
+            
+            TBool commandBound = aBinderOriginated ? ( Binder() ) : ( !Binder() );
+            if ( BoundStream() && commandBound )
+                {
+                static_cast<CMceMessageStream*>( 
+                    iLinkedStream )->RemoveCodecL( aCodec, aBinderOriginated );
+                }
+                
+            delete iCodecs[i];
+            iCodecs.Remove( i );
+            removed = ETrue;
+            }
+        }
+        
+    MCECLI_DEBUG( "CMceMessageStream::RemoveCodecL, Exit" )
+    }
+        
+// -----------------------------------------------------------------------------
+// CMceMessageStream::InternalizeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::InternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+    CMceMediaStream::InternalizeL( aSerCtx );
+    
+    TMceMessageStreamSerializer<CMceMessageStream> serial( *this );
+    serial.InternalizeL( aSerCtx );
+
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMessageStream::ExternalizeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::ExternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+    CMceMediaStream::ExternalizeL( aSerCtx );
+
+    TMceMessageStreamSerializer<CMceMessageStream> serial( *this );
+    serial.ExternalizeL( aSerCtx );
+    
+    }
+
+
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::EventReceivedL
+// -----------------------------------------------------------------------------
+//
+TInt CMceMessageStream::EventReceivedL( TMceEvent& aEvent )
+    {
+
+    TInt status = CMceMediaStream::EventReceivedL( aEvent );
+    if ( status != KMceEventNotConsumed )
+        {
+        return status;
+        }
+
+    //try codecs
+    if ( aEvent.Id().IsCodecId() )
+        {
+        TInt codecStatus = status;
+        TInt j = 0;
+        while ( codecStatus != KMceEventConsumed && j < iCodecs.Count() )
+            {
+            CMceMessageCodec* codec = iCodecs[j]; 
+            codecStatus = codec->EventReceivedL( aEvent );
+            if ( codecStatus == KMceEventUpdate )
+                {
+                MCECLI_DEBUG("CMceMessageStream::EventReceivedL, \
+update codec by replacing old version with new one");
+                CMceMsgObject<CMceMessageCodec>* updateMsg = 
+                    static_cast<CMceMsgObject<CMceMessageCodec>*>( aEvent.Message() );
+                CMceMessageCodec* updateCodec = updateMsg->Object();
+                CleanupStack::PushL( updateCodec );
+                iCodecs.Remove( j );
+                delete codec;
+                updateCodec->InitializeL( *this );
+                iCodecs.AppendL( updateCodec );
+                CleanupStack::Pop( updateCodec );
+                updateCodec->Updated();
+                codecStatus = KMceEventConsumed;
+                }
+            j++;                
+            }
+        status = codecStatus == KMceEventNotOwner ? KMceEventNotConsumed : codecStatus;
+        }
+
+    return status;
+
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::ConnectionSetUpL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMessageStream::ConnectionSetUpL(TConnSetup  aSetup)
+    {
+    // create media level setup SDP a-line and add to localmediasdp lines
+    
+    CDesC8Array* LocalMediaSDPLines = new (ELeave) CDesC8ArrayFlat( KMceArrayGranularity );
+    CDesC8Array* CurrMediaSdpLines = FlatData()->iLocalMediaSDPLines;
+    CleanupStack::PushL(LocalMediaSDPLines);
+    // prepare setup adp attribute line
+    _LIT8(KSetupAttr, "a=setup:");
+    // Retain the current media level attributes and keep adding to these
+    for(TInt i=0; i<CurrMediaSdpLines->MdcaCount(); i++)
+        {
+        if (CurrMediaSdpLines->MdcaPoint(i).Find(KSetupAttr) != KErrNotFound)
+            {
+            User::Leave(KErrAlreadyExists);
+            }
+        LocalMediaSDPLines->AppendL(CurrMediaSdpLines->MdcaPoint(i));
+        }   
+    CleanupStack::Pop(LocalMediaSDPLines);
+
+    TBuf8<25> setupAttr(KSetupAttr);
+    switch(aSetup)
+        {
+        case CMceMessageStream::EActive:
+            setupAttr.Append(_L8("active\r\n"));
+            break;
+        case CMceMessageStream::EActpass:
+            setupAttr.Append(_L8("actpass\r\n"));
+            break;
+        case CMceMessageStream::EPassive:
+            setupAttr.Append(_L8("passive\r\n"));
+            break;
+        default: User::Leave(KErrNotSupported);
+        }
+     // Append the accepttype attribute line to Media level attribute list
+    LocalMediaSDPLines->AppendL(setupAttr);
+    SetMediaAttributeLinesL(LocalMediaSDPLines );
+    FLAT_DATA(iConnSetup) = aSetup;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::GetConnectionSetup
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageStream::TConnSetup CMceMessageStream::GetConnectionSetup()
+    {
+    return FLAT_DATA(iConnSetup);
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageStream::ReuseMsrpConnection
+// -----------------------------------------------------------------------------
+//
+void CMceMessageStream::ReuseMsrpConnectionL(TBool aReUse)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iMsrpConnUsage) = aReUse;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemsrpcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,203 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include "mcemsrpcodec.h"
+#include "mcecommsrpcodec.h"
+#include "mcemessagestream.h"
+
+
+#define _FLAT_DATA static_cast<CMceComMessageCodec*>( iFlatData )
+#define FLAT_DATA( data ) _FLAT_DATA->data
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::~CMceMsrpCodec
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpCodec::~CMceMsrpCodec()
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::CloneL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMessageCodec* CMceMsrpCodec::CloneL() const
+    {
+    CMceMsrpCodec* clone = CMceMsrpCodec::NewLC( FLAT_DATA( iSdpName ) );
+    
+    CMceComMessageCodec* cloneFlatData = 
+        static_cast<CMceComMessageCodec*>( clone->iFlatData );
+    
+    cloneFlatData->iID = FLAT_DATA( iID );
+    cloneFlatData->SetFmtpAttributeL( *(FLAT_DATA( iFmtpAttr )) );
+    cloneFlatData->iEnableVAD = FLAT_DATA( iEnableVAD );
+	cloneFlatData->iSamplingFreq = FLAT_DATA( iSamplingFreq );
+	cloneFlatData->iPTime = FLAT_DATA( iPTime );
+	cloneFlatData->iMaxPTime = FLAT_DATA( iMaxPTime );
+	cloneFlatData->iBitrate = FLAT_DATA( iBitrate );
+	cloneFlatData->iAllowedBitrates = FLAT_DATA( iAllowedBitrates );
+	cloneFlatData->iPayloadType = FLAT_DATA( iPayloadType );
+	cloneFlatData->iCodecMode = FLAT_DATA( iCodecMode );
+	cloneFlatData->iFourCC = FLAT_DATA( iFourCC );
+	cloneFlatData->iFrameSize = FLAT_DATA( iFrameSize ); 
+	
+	CleanupStack::Pop( clone );
+	
+	return clone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::EnableVAD
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::EnableVAD( TBool aEnableVAD )
+    {
+    FLAT_DATA( iEnableVAD ) = aEnableVAD;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetBitrate
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetBitrate(TUint /*aBitrate*/)
+    {
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetAllowedBitrates
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetAllowedBitrates(TUint /*aBitrates*/)
+    {
+    return KErrNone;
+    }
+    
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetSamplingFreq
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetSamplingFreq(TUint aSamplingFreq)
+    {
+    FLAT_DATA( iSamplingFreq ) = aSamplingFreq;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetPTime
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetPTime(TUint aPTime)
+    {
+    FLAT_DATA( iPTime ) = aPTime;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetMaxPTime
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetMaxPTime(TUint aMaxPTime)
+    {
+    FLAT_DATA( iMaxPTime ) = aMaxPTime;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetPayloadType
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetPayloadType(TUint8 aPayloadType)
+    {
+    FLAT_DATA( iPayloadType ) = aPayloadType;
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetCodecMode
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CMceMsrpCodec::SetCodecMode( TUint /*aCodecMode*/ )
+    {
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::NewL
+// -----------------------------------------------------------------------------
+//
+CMceMsrpCodec* CMceMsrpCodec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceMsrpCodec* self = NewLC( aSdpName );
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::NewL
+// -----------------------------------------------------------------------------
+//
+CMceMsrpCodec* CMceMsrpCodec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceMsrpCodec* self = new (ELeave) CMceMsrpCodec();
+    CleanupStack::PushL( self );
+    self->ConstructL( aSdpName );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::CMceMsrpCodec
+// -----------------------------------------------------------------------------
+//
+CMceMsrpCodec::CMceMsrpCodec()
+ : CMceMessageCodec()
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpCodec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec* codec = CMceComMsrpCodec::NewLC( aSdpName );
+    CMceMessageCodec::ConstructL( codec );
+
+    CleanupStack::Pop( codec );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpCodec::SetSdpNameL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpCodec::SetSdpNameL( const TDesC8& aSdpName )
+    {
+    __ASSERT_ALWAYS( aSdpName.Length() <= KMceMaxSdpNameLength, 
+                     User::Leave( KErrArgument ) );
+    FLAT_DATA( iSdpName ).Copy( aSdpName );
+    }
+    
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemsrpsink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,338 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include <uricommon.h>
+#include <uri8.h>
+#include <uriutils.h>
+#include<e32cmn.h>
+#include<e32const.h>
+#include <f32file.h>
+
+#include "mcemsrpsink.h"
+#include <mcertpsource.h>
+#include <mcemsrpsource.h>
+#include "mcecommsrpsink.h"
+#include "mcesession.h"
+#include "mcemediastream.h"
+#include "mceclilogs.h"
+#include "mcemanager.h"
+#include "mcecommediastream.h"
+#include <e32cmn.h>
+#include <e32const.h>
+#include <f32file.h>
+
+#define _FLAT_DATA static_cast<CMceComMsrpSink*>( iFlatData )
+#define FLAT_DATA( data ) (_FLAT_DATA->data)
+
+#define _FLAT_ARRAY_DATA static_cast<CMceComMsrpSink*>(iFlatData)
+#define FLAT_ARRAY_DATA(iArray,data) (_FLAT_ARRAY_DATA)->iArray.AppendL(data)
+
+#define _FLAT_PTRARRAY_DATA static_cast<CMceComMsrpSink*>(iFlatData)
+#define FLAT_PTRARRAY_DATA(iArray,data) (_FLAT_PTRARRAY_DATA)->iArray->AppendL(data)
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSink* CMceMsrpSink::NewL()
+    {    
+    CMceMsrpSink* self = CMceMsrpSink::NewLC();    
+	CleanupStack::Pop(self);
+    return self;   
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSink* CMceMsrpSink::NewLC()
+    {    
+    CMceMsrpSink* self = new (ELeave) CMceMsrpSink(); 
+	CleanupStack::PushL(self);
+	self->ConstructL();
+    return self;   
+    }   
+
+	
+// -----------------------------------------------------------------------------
+// CMceMsrpSinke::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpSink::ConstructL()
+    { 
+    CMceComMsrpSink *sink = CMceComMsrpSink::NewLC();
+    CMceMediaSink::ConstructL(sink);		
+	CleanupStack::Pop(sink);
+    }
+       
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSinke::~CMceMsrpSinke
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSink::~CMceMsrpSink()
+    {
+    }	
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::CMceMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMceMsrpSink::CMceMsrpSink()
+    :CMceMediaSink()
+    {
+    }
+	
+// -----------------------------------------------------------------------------
+// CMceMicSource::EnableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::EnableL()
+    {
+    MCECLI_DEBUG("CMceMsrpSink::EnableL, Entry");
+    
+    CMceMediaSink::DoEnableL(); 
+    
+    MCECLI_DEBUG("CMceMsrpSink::EnableL, Exit");
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::Disable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::DisableL()
+    {
+    MCECLI_DEBUG("CMceMsrpSink::DisableL, Entry");
+
+    CMceMediaSink::DoDisableL();
+    
+    MCECLI_DEBUG("CMceMsrpSink::DisableL, Exit");
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSinke::Path
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C RPointerArray<TUriC8>& CMceMsrpSink::Path()
+    {
+    return FLAT_DATA(iPath);
+    }
+
+ 
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSinke::SetPath
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetPathL( const RPointerArray<TUriC8>& aMsrpPath )
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    // destroy the existing MSRP path entries
+    static_cast<CMceComMsrpSink*>(iFlatData)->iPath.ResetAndDestroy();
+    for(int i=0;i<aMsrpPath.Count();i++)
+        {        
+        TUriParser8* parser = new (ELeave) TUriParser8;
+        CleanupStack::PushL(parser);
+        User::LeaveIfError( parser->Parse(aMsrpPath[i]->UriDes()));
+        FLAT_ARRAY_DATA(iPath, parser);
+        CleanupStack::Pop(parser);
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::AcceptTypesL
+// -----------------------------------------------------------------------------
+//
+
+void CMceMsrpSink::AcceptTypesL(CDesC8ArrayFlat& aAcceptTypes)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    
+    for (TInt i=0; i< FLAT_DATA(iAcceptTypes).Count();i++)
+        {
+        aAcceptTypes.AppendL(FLAT_DATA(iAcceptTypes)[i]);
+        }
+    }
+  
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetAcceptTypesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetAcceptTypesL( const MDesC8Array& aAcceptTypes )
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    // reset the existing entries
+    static_cast<CMceComMsrpSink*>(iFlatData)->iAcceptTypes.Reset();
+    for(int i=0; i<aAcceptTypes.MdcaCount();i++)
+        {       
+        FLAT_ARRAY_DATA(iAcceptTypes, aAcceptTypes.MdcaPoint(i));        
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::AcceptWrappedTypes
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C TDes8& CMceMsrpSink::AcceptWrappedTypesL()
+    {
+    return FLAT_DATA(iAcceptWrappedTypes);
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetAcceptTypesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetAcceptWrappedTypesL( const TDes8& aAcceptWrappedTypes )
+    {
+    MCECLI_DEBUG(" \n CMceMsrpSink::SetAcceptWrappedTypesL : Entry");
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iAcceptWrappedTypes) = aAcceptWrappedTypes;
+    FLAT_DATA(iWrappedTypes) = ETrue;
+    MCECLI_DEBUG(" \n CMceMsrpSink::SetAcceptWrappedTypesL : Entry");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetFileSelector
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetFileSelectorL(const TDesC& aName, const TDesC8& aFileType, TUint aFileSize )
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iFileShare) = ETrue;
+    if (FLAT_DATA(iFileName) !=NULL )
+        {
+        delete FLAT_DATA(iFileName);
+        FLAT_DATA(iFileName) = NULL;
+        }
+    FLAT_DATA(iFileName) = aName.Alloc();
+    FLAT_DATA(iFileSize) = aFileSize;
+    if (FLAT_DATA(iFileType) !=NULL )
+        {
+        delete FLAT_DATA(iFileType);
+        FLAT_DATA(iFileType) = NULL;
+        }
+    FLAT_DATA(iFileType) = aFileType.Alloc();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetFileDisposition
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetFileDispositionL (const TDes8& aDispositionValue)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iDispositionValue) = aDispositionValue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetFileTransferId
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetFileTransferIdL(TDes8& aId)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    //Set Current time as transferid (Which is unique)
+    TTime transferId;
+    transferId.HomeTime();
+    aId.AppendNum(transferId.Int64());
+    FLAT_DATA(iFileTransferid) = aId;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::SetInformationAttr
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSink::SetInformationAttrL(const TDes8& aInfo)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    static_cast<CMceComMsrpSink*>(iFlatData)->iSessInfo = aInfo.AllocL();
+    }
+
+void CMceMsrpSink::InitializeL( CMceMediaStream& aParent )
+    {
+    MCECLI_DEBUG(" \n CMceMsrpSink::InitializeL : Entry");
+    CMceMediaSink::InitializeL(aParent);
+    
+    RPointerArray<TUriC8>& msrpPath= Path();
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSink::InitializeL: Msrp path count is: ", msrpPath.Count());
+    if (msrpPath.Count() > 0 )
+        {
+        SetPortFromPathAttrL(* (msrpPath[msrpPath.Count()-1]) ,
+                static_cast<CMceMessageStream&> (aParent) );
+        }
+    MCECLI_DEBUG("\n CMceMsrpSink::InitializeL : Exit");
+    }
+
+
+void CMceMsrpSink::SetPortFromPathAttrL(TUriC8& aMsrpUri, CMceMessageStream& aStream)
+    {
+    __ASSERT_ALWAYS(aStream.Type() == KMceMessage, User::Leave(KErrArgument));
+    
+    MCECLI_DEBUG("\n CMceMsrpSink::SetPortFromPathAttr : Entry");
+    TUriParser8 parser;
+    TInt parseValue = parser.Parse(aMsrpUri.UriDes()); 
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSink::SetPortFromPathAttr: Parsed return value for MSRP URI: ",
+            parseValue);
+        
+    TBuf8<50> host = parser.Extract(EUriHost);
+    TBuf8<10> portBuf = parser.Extract(EUriPort);
+    TInt Port;
+        
+    TBuf16<10> portBuf16;
+    portBuf16.Copy(portBuf);
+    TLex lex(portBuf16);
+    lex.Val(Port);  // returns the port value 
+    // Set media port
+    aStream.SetLocalMediaPortL(Port);
+	if (aStream.BoundStream())
+		{
+		aStream.BoundStreamL().SetLocalMediaPortL(Port);
+		}
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSink::SetPortFromPathAttr: Media port is : ", 
+                Port);
+    MCECLI_DEBUG("\n CMceMsrpSink::SetPortFromPathAttr : Exit");
+    }
+
+
+EXPORT_C void CMceMsrpSink::SetPathToSaveReceivedFile(const TDesC16& aFilePath)
+    {
+    if ( FLAT_DATA(iFilePath) != NULL)
+        {
+        delete FLAT_DATA(iFilePath);
+        FLAT_DATA(iFilePath) = NULL;
+        }
+    FLAT_DATA(iFilePath) = aFilePath.Alloc();
+    }
+
+EXPORT_C void CMceMsrpSink::EnableFileTransferProgressNotifications(TBool enableFlag)
+    {
+    FLAT_DATA(iFTProgressNotification) = enableFlag;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcemsrpsource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,347 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#include <uricommon.h>
+#include <uri8.h>
+#include <uriutils.h>
+
+#include "mcemsrpsource.h"
+#include <mcertpsource.h>
+#include "mcecommsrpsource.h"
+#include "mcesession.h"
+#include "mcemediastream.h"
+#include "mceclilogs.h"
+#include "mcemanager.h"
+#include "mcemessagestream.h"
+#include "mcecommediastream.h"
+
+#define _FLAT_DATA static_cast<CMceComMsrpSource*>( iFlatData )
+#define FLAT_DATA( data ) (_FLAT_DATA->data)
+
+#define _FLAT_ARRAY_DATA static_cast<CMceComMsrpSource*>(iFlatData)
+#define FLAT_ARRAY_DATA(iArray,data) (_FLAT_ARRAY_DATA)->iArray.AppendL(data)
+
+#define _FLAT_PTRARRAY_DATA static_cast<CMceComMsrpSource*>(iFlatData)
+#define FLAT_PTRARRAY_DATA(iArray,data) (_FLAT_PTRARRAY_DATA)->iArray->AppendL(data)
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::NewL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSource* CMceMsrpSource::NewL()
+    {    
+    CMceMsrpSource* self = NewLC();    
+	CleanupStack::Pop(self);
+    return self;   
+    }
+	
+	
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::NewLC
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSource* CMceMsrpSource::NewLC()
+    {    
+    CMceMsrpSource* self = new (ELeave) CMceMsrpSource(); 
+	CleanupStack::PushL(self);
+	self->ConstructL();
+    return self;   
+    }   
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSourcee::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpSource::ConstructL()
+    {    
+	CMceComMsrpSource *source = CMceComMsrpSource::NewLC();
+	CMceMediaSource::ConstructL(source);
+	CleanupStack::Pop(source);
+    }
+       
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSourcee::~CMceMsrpSourcee
+// -----------------------------------------------------------------------------
+//
+EXPORT_C CMceMsrpSource::~CMceMsrpSource()
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSink::CMceMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMceMsrpSource::CMceMsrpSource()
+    :CMceMediaSource()
+    {
+    }
+	
+// -----------------------------------------------------------------------------
+// CMceMicSource::EnableL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::EnableL()
+    {
+    MCECLI_DEBUG("CMceMsrpSource::EnableL, Entry");
+    
+    CMceMediaSource::DoEnableL();
+    
+    MCECLI_DEBUG("CMceMsrpSource::EnableL, Exit");
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::Disable
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::DisableL()
+    {
+    MCECLI_DEBUG("CMceMsrpSource::DisableL, Entry");
+
+    CMceMediaSource::DoDisableL();
+    
+    MCECLI_DEBUG("CMceMsrpSource::DisableL, Exit");
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSinke::Path
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C RPointerArray<TUriC8>& CMceMsrpSource::Path()
+    {
+    return FLAT_DATA(iPath);
+    }
+
+ 
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetPath
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetPathL( const RPointerArray<TUriC8>& aMsrpPath )
+    { 
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    // destroy the existing entries
+    static_cast<CMceComMsrpSource*>(iFlatData)->iPath.ResetAndDestroy(); 
+    for(int i=0;i<aMsrpPath.Count();i++)
+        {        
+        TUriParser8* parser = new (ELeave) TUriParser8;
+        CleanupStack::PushL(parser);
+        User::LeaveIfError( parser->Parse(aMsrpPath[i]->UriDes()) );
+        FLAT_ARRAY_DATA(iPath, parser);
+        CleanupStack::Pop(parser);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::AcceptTypes
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C void CMceMsrpSource::AcceptTypesL(CDesC8ArrayFlat& aAcceptTypes)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    for (TInt i=0; i< FLAT_DATA(iAcceptTypes).Count();i++)
+        {
+        aAcceptTypes.AppendL(FLAT_DATA(iAcceptTypes)[i]);
+        }
+    }
+    
+
+EXPORT_C void CMceMsrpSource::SetAcceptTypesL( const MDesC8Array& aAcceptTypes )
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    // reset the existing entries
+    static_cast<CMceComMsrpSource*>(iFlatData)->iAcceptTypes.Reset();
+    for(int i=0; i<aAcceptTypes.MdcaCount();i++)
+        {       
+        FLAT_ARRAY_DATA(iAcceptTypes, aAcceptTypes.MdcaPoint(i));        
+        }       
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::AcceptTypes
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C TDes8& CMceMsrpSource::AcceptWrappedTypesL()
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    return FLAT_DATA(iAcceptWrappedTypes);
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetAcceptTypesL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetAcceptWrappedTypesL( const TDes8& aAcceptWrappedTypes )
+    {
+    MCECLI_DEBUG(" \n CMceMsrpSource::SetAcceptWrappedTypesL : Entry");
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    MCECLI_DEBUG_SVALUE("CMceMsrpSource::SetAcceptWrappedTypesL:", aAcceptWrappedTypes)
+    FLAT_DATA(iAcceptWrappedTypes) = aAcceptWrappedTypes;
+    FLAT_DATA(iWrappedTypes) = ETrue;
+    MCECLI_DEBUG(" \n CMceMsrpSource::SetAcceptWrappedTypesL : Exit");
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetFileSelector
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetFileSelectorL(const TDesC& aName, const TDesC8& aFileType, TUint aFileSize )
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iFileShare) = ETrue;
+    if (FLAT_DATA(iFileName) !=NULL )
+        {
+        delete FLAT_DATA(iFileName);
+        FLAT_DATA(iFileName) = NULL;
+        }
+    FLAT_DATA(iFileName) = aName.Alloc();
+    
+    FLAT_DATA(iFileSize) = aFileSize;
+    
+    if (FLAT_DATA(iFileType) !=NULL )
+        {
+        delete FLAT_DATA(iFileType);
+        FLAT_DATA(iFileType) = NULL;
+        }
+    FLAT_DATA(iFileType) = aFileType.Alloc();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetFileDisposition
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetFileDispositionL (const TDes8& aDispositionValue)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    FLAT_DATA(iDispositionValue) = aDispositionValue;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetFileTransferId
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetFileTransferIdL(TDes8& aId)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    //Set Current time as transferid (Which is unique)
+    TTime transferId;
+    transferId.HomeTime();
+    aId.AppendNum(transferId.Int64());
+    FLAT_DATA(iFileTransferid) = aId;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::SetInformationAttr
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetInformationAttrL(const TDes8& aInfo)
+    {
+    __ASSERT_ALWAYS(iFlatData!=NULL, User::Leave(KErrArgument));
+    if (static_cast<CMceComMsrpSource*>(iFlatData)->iSessInfo != NULL)
+        {
+        delete static_cast<CMceComMsrpSource*>(iFlatData)->iSessInfo;
+        static_cast<CMceComMsrpSource*>(iFlatData)->iSessInfo = NULL;
+        }
+    static_cast<CMceComMsrpSource*>(iFlatData)->iSessInfo = aInfo.Alloc();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpSource::InitializeL( CMceMediaStream& aParent )
+    {
+    MCECLI_DEBUG(" \n CMceMsrpSource::InitializeL : Entry");
+    CMceMediaSource::InitializeL(aParent);
+    
+    RPointerArray<TUriC8>& msrpPath= Path();
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSource::InitializeL: Msrp path count is: ", msrpPath.Count());
+    if (msrpPath.Count() > 0 )
+        {
+        SetPortFromPathAttrL(* (msrpPath[msrpPath.Count()-1]) ,
+                static_cast<CMceMessageStream&> (aParent) );
+        }
+    MCECLI_DEBUG("\n CMceMsrpSource::InitializeL : Exit");
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::InitializeL
+// -----------------------------------------------------------------------------
+//
+void CMceMsrpSource::SetPortFromPathAttrL(TUriC8& aMsrpUri, CMceMessageStream& aStream)
+    {
+    __ASSERT_ALWAYS(aStream.Type() == KMceMessage, User::Leave(KErrArgument));
+    
+    MCECLI_DEBUG("\n CMceMsrpSource::SetHostAddrPortFromPathAttr : Entry");
+    TUriParser8 parser;
+    TInt parseValue = parser.Parse(aMsrpUri.UriDes()); 
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSource::SetHostAddrPortFromPathAttr: Parsed return value for MSRP URI: ",
+            parseValue);
+        
+    TBuf8<50> host = parser.Extract(EUriHost);
+    TBuf8<10> portBuf = parser.Extract(EUriPort);
+    TInt Port;
+        
+    TBuf16<10> portBuf16;
+    portBuf16.Copy(portBuf);
+    TLex lex(portBuf16);
+    lex.Val(Port);  // returns the port value 
+    // Set media port
+    aStream.SetLocalMediaPortL(Port);
+	if (aStream.BoundStream())
+		{
+		aStream.BoundStreamL().SetLocalMediaPortL(Port);
+		}
+    MCECLI_DEBUG_DVALUE("\n CMceMsrpSource::SetHostAddrPortFromPathAttr: Media port is : ", 
+                Port);
+    MCECLI_DEBUG("\n CMceMsrpSource::SetHostAddrPortFromPathAttr : Exit");
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::InitializeL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::SetPathToSaveReceivedFile(const TDesC16& aFilePath)
+    {
+    if (FLAT_DATA(iFilePath) != NULL )
+        {
+        delete FLAT_DATA(iFilePath);
+        FLAT_DATA(iFilePath) = NULL;
+        }
+    FLAT_DATA(iFilePath) = aFilePath.Alloc();
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMsrpSource::InitializeL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CMceMsrpSource::EnableFileTransferProgressNotifications(TBool enableFlag)
+    {
+    FLAT_DATA(iFTProgressNotification) = enableFlag;
+    }
--- a/multimediacommsengine/mmcecli/src/mcesession.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcecli/src/mcesession.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -1561,6 +1561,15 @@
     }
 
 // -----------------------------------------------------------------------------
+// CMceSession::FlatData
+// -----------------------------------------------------------------------------
+//
+const CMceComSession* CMceSession::FlatData()
+    {
+    return iFlatData;
+    }
+
+// -----------------------------------------------------------------------------
 // CMceSession::SendRequestL
 // -----------------------------------------------------------------------------
 //
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcecli/src/mcesessionutility.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,492 @@
+/*
+* 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:  
+*
+*/
+
+
+
+#include <badesca.h>
+#include <mcesession.h>
+#include <uri8.h>
+#include <sdpcodecstringpool.h>
+#include <SdpAttributeField.h>
+#include <sdpdocument.h>
+#include "mceclilogs.h"
+#include "mcecomsession.h"
+#include "mcecommediastream.h"
+#include "mcesessionutility.h"
+#include <SdpCodecStringPool.h>
+#include <stringpool.h>
+#include "mcecommediastream.h"
+#include <mcertpsource.h>
+#include <mcemsrpsource.h>
+#include <sdpconnectionfield.h>
+#include <sdpbandwidthfield.h>
+#include <mcertpsource.h>
+
+//# define _OPEN_SDPCODEC_STRINGPOOL  SdpCodecStringPool::OpenL()
+
+#define _CLOSE_SDPCODEC_STRINGPOOL   SdpCodecStringPool::Close();
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::getSessionSdPLineL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* TMceSessionUtility::getSessionSdPLineL(CMceSession* aSession, 
+        TSDPLineName aSdpLineName)
+    {
+    __ASSERT_ALWAYS(aSession, User::Leave(KErrArgument));    
+    
+    // Ownership is tranferred to us for sessionLines
+    CDesC8Array* sessionLines = static_cast<CDesC8Array*> (aSession->SessionSDPLinesL());
+    
+    if (sessionLines->MdcaCount() == 0)
+        {
+        MCECLI_DEBUG("TMceSessionUtility::getSessionSdPLineL: No session attributes set in the passed session \n");
+        sessionLines->Reset();
+        delete sessionLines;
+        return NULL;
+        }
+    
+    // Open SIP coec string pool
+    TRAPD(error, SdpCodecStringPool::OpenL());
+    if (error != KErrAlreadyExists && error != KErrNone)
+        {
+        delete sessionLines;
+        User::Leave(error);
+        }
+    CSdpDocument* sdpDoc = NULL;
+    CleanupStack::PushL(sessionLines);
+    ConstructSdpDocumentL(sessionLines, sdpDoc); 
+    CleanupStack::Pop(sessionLines);
+    
+    HBufC8* retValue = NULL;
+    switch(aSdpLineName)
+        {
+        case EVersion:
+            {
+            TInt value = sdpDoc->SdpVersion();
+            TBuf8<10> tmp;
+            tmp.Num(value);
+            retValue = tmp.AllocL();
+            }
+            break;
+         
+        case ESession:
+            retValue = sdpDoc->SessionName().AllocL();
+            break;
+            
+        case EInfo:
+            retValue = sdpDoc->Info().AllocL();
+            break;
+            
+        case EUri:
+            {
+            // Ownership will not be transferred to us so shouldn't delete the pointer
+            CUri8* uri = sdpDoc->Uri();
+            if (uri != NULL)
+                {
+                retValue = uri->Uri().UriDes().AllocL();
+                }
+            }
+            break;
+            
+        case EZone:
+            retValue = sdpDoc->ZoneAdjustments().AllocL();
+            break;
+            
+        default:
+            sessionLines->Reset();
+            delete sessionLines;
+            delete sdpDoc;
+            _CLOSE_SDPCODEC_STRINGPOOL;
+            User::Leave(KErrNotSupported);
+        }
+    sessionLines->Reset();
+    delete sessionLines;
+    delete sdpDoc;
+    
+    if (error == KErrNone)
+        _CLOSE_SDPCODEC_STRINGPOOL;
+    __ASSERT_ALWAYS(retValue!=NULL, User::Leave(KErrArgument));
+    return retValue;
+    }
+        
+
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::getRemoteMediaSDPAttrL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* TMceSessionUtility::getRemoteMediaSDPAttrL(CMceMediaStream* aStream,
+                const TDesC8& aAttrName)
+    {
+    __ASSERT_ALWAYS(aStream, User::Leave(KErrArgument));
+    // Ownership is not transferred to us
+    CMceSession* session = aStream->Session();
+    __ASSERT_ALWAYS(session, User::Leave(KErrArgument));
+    
+	if ( (session->State() >= CMceSession::ECancelling) || 
+		(session->State() <= CMceSession::EIdle) )
+        {
+        MCECLI_DEBUG(" Session state shouldn't be idle Or shouldn't be either in cancelling, terminating , terminated  \n");
+        User::Leave(KErrArgument);
+        }
+    
+    CDesC8Array* mediaAttrs = NULL; 
+    mediaAttrs = aStream->FlatData()->iRemoteMediaSDPLines;
+    
+    if (mediaAttrs == NULL || mediaAttrs->MdcaCount() == 0)
+        {
+        if (aStream->BoundStream())
+			{
+			mediaAttrs = aStream->BoundStreamL().FlatData()->iRemoteMediaSDPLines;		
+			}
+		}
+		
+	if (mediaAttrs == NULL || mediaAttrs->MdcaCount() == 0)
+		{
+		// Look for the another staream of same type to extract the remote media sdp attributes
+        CMceMediaStream* tempStrm;
+        for(TInt i=0; i<session->Streams().Count(); i++)
+            {
+            tempStrm = session->Streams()[i];
+            if (tempStrm != aStream && (tempStrm->Type() == aStream->Type()) )
+                {
+                mediaAttrs = tempStrm->FlatData()->iRemoteMediaSDPLines;
+                }
+            }
+        if (mediaAttrs == NULL || mediaAttrs->MdcaCount() == 0)
+            {
+            MCECLI_DEBUG("TMceSessionUtility::getRemoteMediaSDPAttrL: No Remote Media SDP attributes set to the streams \n");
+            return NULL;
+            }
+        }
+    //_OPEN_SDPCODEC_STRINGPOOL;
+    TRAPD(error, SdpCodecStringPool::OpenL());
+    if (error != KErrAlreadyExists && error != KErrNone)
+        {
+        User::Leave(error);
+        }
+    // If the attribute is found then the value will be in aValue.
+    HBufC8* value = NULL;
+    value = FindAttributeL(mediaAttrs, aAttrName);
+    if (error == KErrNone)
+        _CLOSE_SDPCODEC_STRINGPOOL;
+    return value;
+    }
+        
+ 
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::GetLocalConnectionAddrL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMceSessionUtility::GetLocalConnectionAddrL(CMceSession* aSess, TInetAddr& aAddr)
+    {
+    __ASSERT_ALWAYS(aSess, User::Leave(KErrArgument));
+    aAddr = aSess->FlatData()->iLocalIpAddress;
+    }
+
+ 
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::GetRemoteConnectionAddrL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C HBufC8* TMceSessionUtility::GetRemoteConnectionAddrL(CMceMediaStream* aStream/*, TDesC8* hostAddr*/)
+    {
+    CMceSession* session = aStream->Session();
+    __ASSERT_ALWAYS(session, User::Leave(KErrArgument));
+    if ( (session->State() >= CMceSession::ECancelling) || 
+            (session->State() <= CMceSession::EIdle) )
+        {
+        MCECLI_DEBUG("TMceSessionUtility::GetRemoteConnectionAddrL: Session state shouldn't be idle Or shouldn't be either in cancelling, terminating , terminated");
+        User::Leave(KErrArgument);
+        }
+    TBuf8<10> attrName;
+    
+    if (aStream->Type() == KMceMessage)
+        {
+        // Get the remote end's path attribute and extracts the host number from that
+        //ownership willbe transferred to us so have to free up later
+        HBufC8* pathValue = NULL;
+        attrName.Zero();
+        attrName.Copy(_L8("path"));
+        pathValue = TMceSessionUtility::getRemoteMediaSDPAttrL(aStream, attrName);
+        if (NULL!=pathValue)
+            {
+            TUriParser8 parser;
+            TInt parseValue = parser.Parse(*pathValue); 
+                    
+            MCECLI_DEBUG_DVALUE("\n CMceMessageSdpCodec::SetHostAddrPortFromPathAttr: Parsed return value for MSRP URI: ", 
+                    parseValue);
+                
+            User::LeaveIfError(parseValue);
+            //TBuf8<50> host = parser.Extract(EUriHost);
+            HBufC8* hostAddr = parser.Extract(EUriHost).AllocL();
+            delete pathValue;
+            return hostAddr;
+            }
+        }
+    
+    // check if c line exists for the m-line correspands to this stream
+    attrName.Zero();
+    attrName.Copy(_L8("c"));
+    HBufC8* hostAddr = NULL;
+    hostAddr = TMceSessionUtility::getRemoteMediaSDPAttrL(aStream, attrName);
+    if (hostAddr!=NULL)
+        return hostAddr;
+    else
+        {
+        TBuf<32> addr;
+        session->FlatData()->iRemoteIpAddress.Output(addr);
+        TBuf8<32> value;
+        value.Copy(addr);
+        return value.AllocL();
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::GetLocalMediaPortL   
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMceSessionUtility::GetLocalMediaPortL(CMceMediaStream* aStream, TUint& aMediaPort )
+    {
+    MCECLI_DEBUG("TMceSessionUtility::GetLocalMediaPortL: Entry ");
+    __ASSERT_ALWAYS(aStream!=NULL, User::Leave(KErrArgument));
+
+	if ( (aStream->Session()->State() >= CMceSession::ECancelling) || 
+			(aStream->Session()->State() <= CMceSession::EIdle) )
+        {
+        MCECLI_DEBUG("TMceSessionUtility::GetRemoteConnectionAddrL :  Session state shouldn't be idle Or shouldn't be either in cancelling, terminating , terminated");
+        User::Leave(KErrArgument);
+        }
+    
+	aMediaPort = aStream->FlatData()->LocalMediaPort();
+	MCECLI_DEBUG_DVALUE("TMceSessionUtility::GetLocalMediaPortL : ", aMediaPort)
+	MCECLI_DEBUG("TMceSessionUtility::GetLocalMediaPortL: Exit ");
+    }
+         
+
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::GetRemoteMediaPortL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void TMceSessionUtility::GetRemoteMediaPortL(CMceMediaStream* aStream, 
+        TUint& aMediaPort )
+    {
+    MCECLI_DEBUG("TMceSessionUtility::GetRemoteMediaPortL: Entry ");
+    __ASSERT_ALWAYS(aStream!=NULL, User::Leave(KErrArgument));
+    CMceSession* session = aStream->Session();
+    __ASSERT_ALWAYS(session, User::Leave(KErrArgument));
+    if ( (session->State() >= CMceSession::ECancelling) || 
+            (session->State() <= CMceSession::EIdle) )
+        {
+        MCECLI_DEBUG("TMceSessionUtility::GetRemoteConnectionAddrL :  Session state shouldn't be idle Or shouldn't be either in cancelling, terminating , terminated");
+        User::Leave(KErrArgument);
+        }
+    if (aStream->Type() == KMceMessage)
+        {
+        TBuf8<10> aAttrName(_L8("path"));
+    
+        // Get the remote end's path attribute and extracts the port number from that
+        //ownership willbe transferred to us so have to free up later
+        HBufC8* pathValue = NULL;
+        pathValue = TMceSessionUtility::getRemoteMediaSDPAttrL(aStream, aAttrName);
+    
+        if (pathValue == NULL)
+            {
+            aMediaPort = aStream->FlatData()->RemoteMediaPort();
+            return;
+            }
+        // 
+        TUriParser8 parser;
+        TInt parseValue = parser.Parse(pathValue->Des()); 
+        MCECLI_DEBUG_DVALUE("\n CMceMsrpSource::SetHostAddrPortFromPathAttr: Parsed return value for MSRP URI: ",
+                parseValue);
+            
+        TBuf8<10> portBuf = parser.Extract(EUriPort);
+            
+        TBuf16<10> portBuf16;
+        portBuf16.Copy(portBuf);
+        TLex iLex(portBuf16);
+        iLex.Val(aMediaPort);  // returns the port value
+        delete pathValue;
+        return;
+        }
+    else
+        {
+        // Get send streams  and use remotemediaport
+        if ( aStream->Source()->Type() == KMceRTPSource)
+            {
+            // find the send stream and get the remote media port
+            if (aStream->BoundStream() && 
+                    aStream->BoundStreamL().Source() != NULL &&
+                    aStream->BoundStreamL().Source()->Type() != KMceRTPSource)
+                {
+                aMediaPort = aStream->BoundStreamL().FlatData()->RemoteMediaPort();
+                return;
+                }
+            // if the streams are not binded then find the send stream aong the session streams
+            for (TInt i=0; i<session->Streams().Count(); i++)
+                {
+                if (session->Streams()[i]!=NULL && (session->Streams()[i]!=aStream) &&
+                        session->Streams()[i]->Type() == aStream->Type())
+                    {
+                    if (session->Streams()[i]->Source()->Type()!=KMceRTPSource)
+                        {
+                        aMediaPort = session->Streams()[i]->FlatData()->RemoteMediaPort();
+                        return;
+                        }
+                    } // inside if
+                } // For loop
+            } // 
+        }
+    aMediaPort = aStream->FlatData()->RemoteMediaPort();
+    MCECLI_DEBUG_DVALUE("TMceSessionUtility::GetRemoteMediaPortL : ", aMediaPort)
+    MCECLI_DEBUG("TMceSessionUtility::GetRemoteMediaPortL: Exit ");
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::FindAttributeL
+// -----------------------------------------------------------------------------
+//
+HBufC8* TMceSessionUtility::FindAttributeL(CDesC8Array* asdpLines , const TDesC8& aAttrName)
+    {
+    // Put all those session level names in single DesC8 object and pass that to CSdpDocument
+    TBool attrFound = EFalse; 
+    CSdpAttributeField* attr=NULL;
+    RStringF searchAttr = SdpCodecStringPool::StringPoolL().OpenFStringL(aAttrName);
+    HBufC8* retValue = NULL;
+    for (TInt i=0; i< asdpLines->MdcaCount()&& !attrFound; i++)
+        {
+        TBuf8<200> attrText(asdpLines->MdcaPoint(i));
+        
+        // media attrivutes can also contain 'b' &'c' lines so skip them 
+        _LIT8( KMceSdpConnectionLineMarker, "c=" );
+        _LIT8( KMceSdpBandwidthLineMarker, "b=" );
+        
+        // Look for media specific conneciton(c= ) line
+        if ( (attrText.Find(KMceSdpConnectionLineMarker) >= 0) )
+            {
+            if (attrText.Find(aAttrName) >= 0) 
+                {
+                // get the conneciton filed value 
+                CSdpConnectionField* conn = NULL;
+                TRAPD(err, conn = CSdpConnectionField::DecodeL(attrText));
+                if (err != KErrNone)
+                    {
+                    searchAttr.Close();
+                    _CLOSE_SDPCODEC_STRINGPOOL;
+                    User::Leave(err);
+                    }
+                __ASSERT_ALWAYS(conn!=NULL, User::Leave(KErrArgument));
+                retValue = conn->Address().Alloc();
+                attrFound = ETrue;
+                delete conn; // Free the memory for conn pointer
+                }
+            }
+        // Look for media specific bandwidth(b= ) line
+        else if ( (attrText.Find(KMceSdpBandwidthLineMarker) >= 0) )
+            {
+            if ((attrText.Find(aAttrName) >= 0))
+                {
+                // get the bandwidth filed and return the value
+                CSdpBandwidthField* bandWidth = NULL;
+                TRAPD(err, bandWidth = CSdpBandwidthField::DecodeL(attrText));
+                if (err != KErrNone)
+                    {
+                    searchAttr.Close();
+                    _CLOSE_SDPCODEC_STRINGPOOL;
+                    User::Leave(err);
+                    }
+                __ASSERT_ALWAYS(bandWidth!=NULL, User::Leave(KErrArgument));
+                TBuf8<20> value;
+                value.Num(bandWidth->Value());
+                retValue = value.Alloc();
+                attrFound = ETrue;
+                delete bandWidth;
+                }
+            }
+        else
+            // Look for media specific attribute(a= ) lines
+            {
+            // Have to free up later point of time
+            TRAPD(err, attr = CSdpAttributeField::DecodeL(attrText));
+            if (err != KErrNone)
+                {
+                searchAttr.Close();
+                _CLOSE_SDPCODEC_STRINGPOOL;
+                User::Leave(err);
+                }
+            if (attr == NULL)
+                {
+                MCECLI_DEBUG("TMceSessionUtility::FindAttributeL: Error in decoding the media attribute : ");
+                searchAttr.Close();
+                _CLOSE_SDPCODEC_STRINGPOOL;
+                User::Leave(KErrArgument);
+                }
+            if (attr->Attribute() ==  searchAttr && !attrFound)
+                {
+                retValue = attr->Value().Alloc();
+                attrFound = ETrue;
+                }
+            delete attr;
+            }
+        }
+    if (attrFound == EFalse)
+        {
+        retValue = NULL;
+        }
+    searchAttr.Close();
+    return retValue;
+    }
+
+
+// -----------------------------------------------------------------------------
+// TMceSessionUtility::ConstructSdpDocumentL
+// -----------------------------------------------------------------------------
+//
+void TMceSessionUtility::ConstructSdpDocumentL(CDesC8Array* asdpLines, CSdpDocument*& asdpDoc)
+    {
+    if (asdpDoc)
+        {
+        delete asdpDoc;
+        asdpDoc = NULL;
+        }
+    TBuf8<1000> text; 
+    for(TInt i=0; i<asdpLines->MdcaCount(); i++)
+        {
+        TBuf8<200> temp(asdpLines->MdcaPoint(i));
+        text.Append( temp );
+        }
+    TInt leaveValue = KErrNone;
+    // Ownership for sdpDoc is tranferred to us.. 
+    TRAP(leaveValue, asdpDoc = CSdpDocument::DecodeL(text));
+    
+    if (leaveValue != KErrNone)
+        {
+        MCECLI_DEBUG_DVALUE("TMceSessionUtility::ConstructSdpDocument: Error in decoding the SdpDocument text : %d", leaveValue);
+        SdpCodecStringPool::Close();
+        User::Leave(leaveValue);
+        }    
+    }
--- a/multimediacommsengine/mmceshared/inc/mceclientserver.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mceclientserver.h	Mon Sep 06 17:32:13 2010 +0530
@@ -77,7 +77,11 @@
     EMceItcDtmfSendError = 18,
     EMceItcLinkCreated = 19, 
     EMceItcResponseReceived = 20,
-    EMceItcRequestReceived = 21
+    EMceItcRequestReceived = 21,
+    EMceItcFileSendCompleted=22,
+    EMceItcFileReceiveCompleted=23, 
+    EMceFileSendInProgress=24,
+    EMceFileReceiveInProgress=25
     };
 
 
--- a/multimediacommsengine/mmceshared/inc/mcecomaudiocodec.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mcecomaudiocodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -171,6 +171,18 @@
                                 const CMceSrvStream& aStream,
                                 const CMccCodecInformation& aMccCurentCodec, 
                                 const CMccCodecInformation& aMccUpdateCodec ) const;
+    
+    /**
+    * Checks, if signalling is required
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    TInt DoMccRequireSignalling( 
+                                const CMceSrvStream& aOldStream,
+                                const CMceSrvStream& aCurrentStream,
+                                const CMccCodecInformation& aMccCurentCodec, 
+                                const CMccCodecInformation& aMccUpdateCodec ) const;
 
     /**
     * Creates server stream(s) for this codec
--- a/multimediacommsengine/mmceshared/inc/mcecomcodec.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mcecomcodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -308,6 +308,18 @@
                         const CMceSrvStream& aStream,
                         const CMccCodecInformation& aMccCurentCodec, 
                         const CMccCodecInformation& aMccUpdateCodec ) const;
+    
+    /**
+    * Checks, if signalling is required - MSRP Capabilities check
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    TInt MccRequireSignalling( 
+                        const CMceSrvStream& aOldStream,
+                        const CMceSrvStream& aNewStream,
+                        const CMccCodecInformation& aMccCurentCodec, 
+                        const CMccCodecInformation& aMccUpdateCodec ) const;
    
     /**
     * Sets state of codec based on event
@@ -396,6 +408,18 @@
     * Set default fmtp line
     */                                    
     virtual void DoSetDefaultFmtpAttributeL() = 0;
+    
+    /**
+    * Checks, if signalling is required - MSRP capabilities Check
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    virtual TInt DoMccRequireSignalling( 
+                                const CMceSrvStream& aOldStream,
+                                const CMceSrvStream& aCurrentStream,
+                                const CMccCodecInformation& aMccCurentCodec, 
+                                const CMccCodecInformation& aMccUpdateCodec ) const = 0;
         
     /**
     * Encodes common values from mcc codec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecomexternalsink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,100 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMEXTERNALSINK_H
+#define CMCECOMEXTERNALSINK_H
+
+#include <e32std.h>  
+#include "mcecomexternalsource.h"
+#include "mcecommediasink.h"
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComExternalSink: public CMceComMediaSink
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Constructor
+    */
+    static CMceComExternalSink* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComExternalSink* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComExternalSink();
+
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+       * Clones this object
+       * @return the cloned object
+       */
+    CMceComMediaSink* CloneL();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();
+    
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+
+#endif//MCE_COMMON_SERVER_SIDE
+    
+
+protected:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComExternalSink();
+        
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecomexternalsource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,99 @@
+/*
+* 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:    
+*
+*/
+
+
+
+#ifndef CMCECOMEXTERNALSOURCE_H
+#define CMCECOMEXTERNALSOURCE_H
+
+#include <e32std.h>  
+#include "mcecommediasource.h"
+#include "mcemediasource.h"
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComExternalSource: public CMceComMediaSource
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Constructor
+    */
+    static CMceComExternalSource* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComExternalSource* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComExternalSource();
+
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+       * Clones this object
+       * @return the cloned object
+       */
+    CMceComMediaSource* CloneL();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();
+    
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+
+#endif//MCE_COMMON_SERVER_SIDE
+    
+
+protected:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComExternalSource();
+        
+    };
+
+
+#endif
--- a/multimediacommsengine/mmceshared/inc/mcecomfactory.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mcecomfactory.h	Mon Sep 06 17:32:13 2010 +0530
@@ -39,6 +39,7 @@
 class CMceMsgBase;
 class CMceComStreamBundle;
 class MMceComSerializable;
+class CMceComMessageCodec;
 
 class TMceComMediaStreamFactory
 	{
@@ -112,6 +113,27 @@
 
 	};
 
+class TMceComMessageCodecFactory
+    {
+
+public:
+    
+    //might leave KErrNotSupported
+    CMceComMessageCodec* CreateLC( const TBuf8<KMceMaxSdpNameLength> aSdpName  );  
+
+    CMceComMessageCodec* CreateLC( MMceComSerializationContext& aSerCtx ); 
+    
+    //return NULL, if codec cannot been created
+    CMceComMessageCodec* CreateCodecLC( const TBuf8<KMceMaxSdpNameLength> aSdpName  ); 
+
+    //return NULL, if codec cannot been created
+    CMceComMessageCodec* CreateCodecLC( TUint aPayload );
+    
+    TInt iDummy;
+
+
+    };
+
 class TMceComFactory
     {
     
@@ -157,6 +179,11 @@
         return TMceComVideoCodecFactory();
         }
     
+    inline TMceComMessageCodecFactory MessageCodecFactory()
+        {
+        return TMceComMessageCodecFactory();
+        }
+    
     TInt iDummy;
     
     };
--- a/multimediacommsengine/mmceshared/inc/mcecommediastream.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mcecommediastream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -343,6 +343,12 @@
     */
 	void SetRemoteMediaPort( TUint aPort );
 	
+    /**
+    * Sets remote msrp path
+    * @param aPort remote msrp path
+    */
+    void SetRemoteMsrpPath( TDes8& aremoteMsrpPath, TDes8& aConnStatus  );
+	
 	/**
     * Sets remote rtcp media address
     * @param aAddr remote rtcp media address
@@ -454,6 +460,12 @@
     void SetLinkId( TUint32 aLinkId );
     
     /**
+     * Sets Local MSRP Path
+     */
+    
+    void SetLocalMsrpPath( TDesC8& aLocalMsrpPath );
+    
+    /**
     * Gets direction
     * @return direction
     */
@@ -593,7 +605,13 @@
      */
     TBool iIsEnabled;
     
-	/**
+    /**
+     * Local MSRP Path
+     */
+    
+    TBuf8<256> iLocalMsrpPath;
+
+    /**
     * Local port
     */
 	TUint iLocalMediaPort;
@@ -602,6 +620,15 @@
     * Remote port
     */
 	TUint iRemoteMediaPort;
+	
+	/**
+     * Remote MSRP Path
+     */
+    
+    TBuf8<256> iRemoteMsrpPath;
+    
+    TBuf8<10> iConnStatus;
+
     
     /**
     * Remote RTCP IP-address (IPv4 or IPv6)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommessagecodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,244 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMESSAGECODEC_H
+#define CMCECOMMESSAGECODEC_H
+
+//  INCLUDES
+#include "mcecomcodec.h"
+#include "mcecommessagestream.h"
+    
+    
+// FUNCTION PROTOTYPES
+
+// CLASS DECLARATION
+/**
+*  Container class for the codec information.
+*
+*  @lib 
+*  @since
+*/
+class CMceComMessageCodec : public CMceComCodec
+    {
+		
+public:  // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    * @param aSdpName sdp name
+    */
+    static CMceComMessageCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName );
+    
+    /**
+    * Two-phased constructor.
+    * @param aSdpName sdp name
+    */
+    static CMceComMessageCodec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
+    
+    /**
+    * Destructor.
+    */
+    ~CMceComMessageCodec();
+
+
+public: // from CMceComCodec
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+    * Updates this object
+    * @param aUpdate object updates this
+    */
+    void UpdateL( CMceComCodec& aCodec );
+    
+public: //new functions 
+
+    /**
+    * Clones
+    */
+    virtual CMceComMessageCodec* CloneL();
+
+    /**
+    * Factory
+    * @return factory
+    */
+    static TMceComMessageCodecFactory Factory();
+     
+    static TInt CompareSdpIndex( const CMceComMessageCodec& aIndex1, 
+                                 const CMceComMessageCodec& aIndex2 );
+                                                                      
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Assigns mcc codec
+    * @param aMccCodec mcc codec
+    * @return assigned codecs
+    */
+    CMceComCodec& operator=( CMccCodecInformation& aMccCodec );
+
+    /**
+    * Decodes to mcc codec
+    * @param aMccCodec mcc codec
+    */
+    void DoMccDecodeL( CMccCodecInformation& aMccCodec );
+
+    /**
+    * Encodes from mcc codec
+    * @param aMccCodec mcc codec
+    * @param aStream stream
+    */
+    void DoMccEncodeL( CMccCodecInformation& aMccCodec,
+                       CMceSrvStream& aStream );
+    
+    /**
+    * Validates codec values based on mcc codec
+    * @param aMccCodec mcc codec
+    * @param aStream stream
+    * @param aRole role
+    */
+    CMceComCodec* DoMccValidateL( CMccCodecInformation& aMccCodec,
+                                  CMceSrvStream& aStream,
+                                  TMceNegotiationRole aRole );
+                               
+    /**
+    * Adjust codec values based on mcc codec
+    * @param aMccCodec mcc codec
+    * @param aStream stream
+    */
+    void DoMccAdjustL( CMccCodecInformation& aMccCodec, 
+                               CMceSrvStream& aStream );
+                             
+    /**
+    * Checks, if signalling is required
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    TInt DoMccRequireSignalling( 
+                                const CMceSrvStream& aStream,
+                                const CMccCodecInformation& aMccCurentCodec, 
+                                const CMccCodecInformation& aMccUpdateCodec ) const;
+    
+    
+    /**
+    * Checks, if signalling is required - MSRP capabilities
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    TInt DoMccRequireSignalling( 
+                                const CMceSrvStream& aOldStream,
+                                const CMceSrvStream& aCurrentStream,
+                                const CMccCodecInformation& aMccCurentCodec, 
+                                const CMccCodecInformation& aMccUpdateCodec ) const;
+    
+    /**
+    * Populates mcc codec
+    * @param aMccCodec mcc codec
+    * @param aStream stream
+    * @param aRole role
+    */
+    void MccPopulateL( CMccCodecInformation& aMccCodec, 
+                       CMceSrvStream& aStream,
+                       TMceNegotiationRole aRole );
+    
+    /**
+    * Updates codec based on mcc codec
+    * @param aMccCodec mcc codec
+    */
+    void UpdateL( CMccCodecInformation& aMccCodec );
+
+protected: // from CMceComCodec
+    
+    /**
+    * Set default fmtp line
+    */                                    
+    void DoSetDefaultFmtpAttributeL();    
+
+    
+    
+#endif//MCE_COMMON_SERVER_SIDE
+    
+protected:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComMessageCodec();
+    
+     /**
+     * second-phase copy constructor
+     */
+	void ConstructL( CMceComMessageCodec& aCodec );
+    
+    
+    /**
+     * second-phase copy constructor
+     */
+	void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName );
+    
+        
+        
+public:  // Owned serialized Data
+
+
+    
+    /**
+    * Enables or disables VAD
+    */
+    TBool iEnableVAD;
+
+	/**
+    * Sampling frequency used with codec
+    */
+	TUint iSamplingFreq;
+
+	/**
+    * Stream's packet time
+    */
+	TUint iPTime;
+	
+	/**
+    * Stream's max packet time
+    */
+	TUint iMaxPTime;
+	
+	
+	TInt iRedCount;
+	
+	TUint iRedPayloadType;
+	
+    };
+
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommessagesink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,100 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMESSAGESINK_H
+#define CMCECOMMESSAGESINK_H
+
+#include <e32std.h>  
+#include "mcecomexternalsource.h"
+#include "mcecommediasink.h"
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComMessageSink: public CMceComMediaSink
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageSink* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageSink* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComMessageSink();
+
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+       * Clones this object
+       * @return the cloned object
+       */
+    CMceComMediaSink* CloneL();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();
+    
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+
+#endif//MCE_COMMON_SERVER_SIDE
+    
+
+protected:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComMessageSink();
+        
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommessagesource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,100 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMESSAGESOURCE_H
+#define CMCECOMMESSAGESOURCE_H
+
+#include <e32std.h>  
+#include "mcecommediasource.h"
+#include "mcemediasource.h"
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComMessageSource: public CMceComMediaSource
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageSource* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageSource* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComMessageSource();
+
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+       * Clones this object
+       * @return the cloned object
+       */
+    CMceComMediaSource* CloneL();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();
+    
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+
+#endif//MCE_COMMON_SERVER_SIDE
+    
+
+protected:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComMessageSource();
+        
+    };
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommessagestream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,222 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMESSAGESTREAM_H
+#define CMCECOMMESSAGESTREAM_H
+
+#include <e32std.h>         
+#include "mcecommediastream.h"
+#include <mcemessagestream.h>
+
+
+class CMceComMessageCodec;
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComMessageStream : public CMceComMediaStream
+    {
+
+public: // Constructors and destructor
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageStream* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComMessageStream* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComMessageStream();
+
+public: // Functions
+
+
+    /**
+    * Removes codec from the stream.
+    * @param aCodec codec to be added to the stream.
+    *        Ownership is transferred.
+    */
+    void RemoveCodecL( CMceComCodec* aCodec );
+    
+	/**
+	* Clears list of codecs and deletes each codec in it.
+	*/
+    void DestroyCodecs();    
+    /**
+    * Searches for codec matching with input codec instance or sdp name
+    * @param aCodec the search term
+    * @return matching codec or NULL if not found
+    */
+    CMceComCodec* FindCodecL( CMceComCodec& aCodec );
+    
+    /**
+    * Adds codec to the stream.
+    * @param aCodec codec to be added to the stream.
+    *        Ownership is transferred.
+    */    
+     void AddCodecL( CMceComCodec* aCodec);
+
+    
+    /**
+    * Returns the available codecs to the session.
+    * @return codecs available for the session.
+    */
+    RPointerArray<CMceComMessageCodec>& Codecs();
+    void ReorderCodecs();
+    
+    /**
+    * Return pointer to codec from the list of codecs.
+    * aIndex index of codec to get.
+    */
+    CMceComMessageCodec* CodecL( TInt aIndex ) const;
+    
+    /**
+    * Returns number of codecs in the stream.
+    */
+    TInt CodecCount() const;
+
+
+public: // from CMceComMediaStream
+
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+    
+    /**
+    * Internalizes
+    * @param aReadStream read stream
+    */
+    void InternalizeL( MMceComSerializationContext& aSerCtx );
+    
+    /**
+    * Externalizes
+    * @param aWriteStream write stream
+    */
+    void ExternalizeL( MMceComSerializationContext& aSerCtx );
+
+
+public://from CMceComMediaStream
+
+
+    /**
+    * Initializes 
+    * @param aParent the parent
+    */
+    void InitializeL( CMceComSession& aParent );
+
+    /**
+    * Updates 
+    * @param aStream new stream
+    */
+    void UpdateL( CMceComMediaStream& aStream );
+
+    /**
+    * Clones
+    */
+    CMceComMediaStream* CloneL();
+    
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Synchronizes stream's codecs
+    * @param aRoleAnswerer is answerer
+    */
+    void SynchronizeL( TBool aRoleAnswerer );
+    
+    /**
+    * Update default codec to reflect current negotiation
+    */
+    void UpdateDefaultCodecL();
+
+    /**
+    * Prepares stream for offer/answer
+    */
+    void PrepareL();
+   
+    /**
+    * Return mcc stream type
+    * @return mcc stream type
+    */
+    TInt MccStreamType() const;
+
+    /**
+    * Return mcc link type
+    * @return mcc link type
+    */
+    TInt MccLinkType() const;
+
+
+#endif//MCE_COMMON_SERVER_SIDE
+    
+public:
+    TBool iUseMsrpPathAttrForHostAddrAndPort;
+    CMceMessageStream::TConnSetup iConnSetup;
+    TBool iMsrpConnUsage;
+    
+protected: // Functions
+
+    /**
+    * Constructor
+    */
+    CMceComMessageStream();
+    
+    
+    /**
+    * second-phase constructor
+    */
+    void ConstructL();
+    
+    /**
+     * second-phase copy constructor
+     */
+    void ConstructL( CMceComMessageStream& aStream );    
+    
+
+protected: // Owned data
+
+    /**
+     * codecs
+     */
+    //The data path will not be handled in MCC for message type streams
+    RPointerArray<CMceComMessageCodec> iCodecs;
+
+    };
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommsrpcodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,144 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMSRPCODEC_H
+#define CMCECOMMSRPCODEC_H
+
+//  INCLUDES
+#include "mcecommessagecodec.h"
+#include "mcedefs.h"
+
+
+
+// CLASS DECLARATION
+/**
+*  Container class for the codec information.
+*
+*  @lib 
+*/
+class CMceComMsrpCodec : public CMceComMessageCodec
+    {
+public:  // Constructors and destructor
+
+    /**
+    * Two-phased constructor.
+    * @param aSdpName sdp name
+    */
+    static CMceComMsrpCodec* NewL( TBuf8<KMceMaxSdpNameLength> aSdpName );
+    
+    /**
+    * Two-phased constructor.
+    * @param aSdpName sdp name
+    */
+    static CMceComMsrpCodec* NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName );
+    
+    /**
+    * Destructor.
+    */
+    ~CMceComMsrpCodec();
+
+public: // from CMceComCodec
+
+    /**
+    * Sets bitrate used with codec for encoding.
+    * @param aBitrate bitrate value for encoding
+    * @return KErrNotSupported if codec doesn't support bitrate
+    *         value issued
+    */
+    TInt SetBitrate( TUint aBitrate );
+    
+    /**
+    * Sets bitrates allowed with codec.
+    * @param aBitrates allowed bitrate values
+    * @return KErrNotSupported if codec doesn't support bitrate
+    *         values issued
+    */
+    TInt SetAllowedBitrates( TUint aBitrates );
+
+    /**
+    * Returns max bit rate
+    * @return max bit rate
+    */
+    TUint GetMaxBitRate();
+    
+    /**
+    * Resolve allowed bitrates based on given bitrate value.
+    * @param aBitrate
+    * @param aAllowedBitrates, on return contains allowed bitrates
+    * @return error code
+    */
+    TInt ResolveAllowedBitrates( TUint aBitrate, TUint& aAllowedBitrates );
+
+#ifdef MCE_COMMON_SERVER_SIDE
+    
+    /**
+    * Validates codec values based on mcc codec
+    * @param aMccCodec mcc codec
+    * @param aStream stream
+    * @param aRole role
+    */
+    CMceComCodec* DoMccValidateL( CMccCodecInformation& aMccCodec,
+                                  CMceSrvStream& aStream,
+                                  TMceNegotiationRole aRole );
+                                  
+protected: // from CMceComCodec
+    
+    /**
+    * Set default fmtp line
+    */                                    
+    void DoSetDefaultFmtpAttributeL();
+
+#endif
+
+public: // serialization etc
+
+    /**
+    * Clones
+    */
+    CMceComMessageCodec* CloneL();
+
+private:
+
+    /**
+    * C++ default constructor.
+    */
+    CMceComMsrpCodec();
+
+    /**
+    * By default Symbian 2nd phase constructor is private.
+    */
+    void ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName);
+
+    /**
+     * second-phase copy constructor
+     */
+    void ConstructL( CMceComMsrpCodec& aCodec );
+
+    
+    #ifdef EUNIT_TEST
+        friend class UT_CMceComMsrpCodec;
+    #endif
+    
+    };
+
+
+#endif     
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommsrpsink.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,148 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMSRPSINK_H
+#define CMCECOMMSRPSINK_H
+
+#include <e32std.h>
+#include "mcecommediasink.h"
+#include<e32cmn.h>
+#include<uri8.h>
+#include<badesca.h>
+
+//FORWARD DECLARATIONS
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComMsrpSink: public CMceComMediaSink
+    {
+
+public: // Constructors and destructor
+
+
+    /**
+    * Constructor
+    */
+    static CMceComMsrpSink* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComMsrpSink* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComMsrpSink();
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+
+    /**
+    * Clones this object
+    * @return the cloned object
+    */
+    CMceComMediaSink* CloneL();
+    
+    /**
+     * Updates this object
+     */
+    
+    void UpdateFileShareAttrL( CMceComMsrpSink& aUpdate );
+    
+    /**
+    * Updates this object
+    * @param aUpdate object updates this
+    */
+    void UpdateL( CMceComMediaSink& aUpdate );
+    
+    /**
+     * Should not use RTCP for msrp sessions
+     * return EFalse, if not required
+     */
+    TBool UseRTCP();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();
+        
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+    
+
+#endif//MCE_COMMON_SERVER_SIDE
+ 
+public:
+    RPointerArray <TUriC8> iPath;    
+    HBufC8* iSessInfo;
+    CDesC8ArrayFlat iAcceptTypes; 
+    TBuf8<50> iAcceptWrappedTypes;
+    TBool iWrappedTypes;
+    TBool iFileShare;
+    HBufC* iFileName;
+    TUint      iFileSize;
+    HBufC8*  iFileType;
+    TBuf8<32>      iFileTransferid;
+    TBuf8<25>  iDispositionValue;
+    TBool iSecureConnection;
+    HBufC*    iFilePath;
+    TBool iFTProgressNotification;
+
+protected:
+
+    /**
+    * C++ default constructor.
+    * @param type of source
+    */
+    CMceComMsrpSink();
+    
+    void ConstructL(CMceComMsrpSink &aObj);
+    
+    void ConstructL();
+    
+    #ifdef EUNIT_TEST
+    friend class UT_CMceComMsrpSink;
+    #endif
+
+
+    };
+
+
+#endif 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/inc/mcecommsrpsource.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,147 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#ifndef CMCECOMMSRPSOURCE_H
+#define CMCECOMMSRPSOURCE_H
+
+#include <e32std.h>
+#include "mcecommediasource.h"
+#include<e32cmn.h>
+#include<uri8.h>
+#include<badesca.h>
+
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceComMsrpSource: public CMceComMediaSource
+    {
+
+public: // Constructors and destructor
+
+
+    /**
+    * Constructor
+    */
+    static CMceComMsrpSource* NewL();
+
+    /**
+    * Constructor
+    */
+    static CMceComMsrpSource* NewLC();
+
+    /**
+    * Destructor.
+    */
+    ~CMceComMsrpSource();
+
+public: // from CMceComMediaSource
+
+    /**
+    * Internalizes flat data
+    * @param aReadStream read stream
+    */
+    void InternalizeFlatL( RReadStream& aReadStream );
+
+    /**
+    * Externalizes flat data
+    * @param aWriteStream write stream
+    */
+    void ExternalizeFlatL( RWriteStream& aWriteStream );
+
+    /**
+    * Clones this object
+    * @return the cloned object
+    */
+    CMceComMediaSource* CloneL();
+    
+    /**
+     * Updates this object
+     */
+    
+    void UpdateFileShareAttrL( CMceComMsrpSource& aUpdate );
+    
+    /**
+     * Updates this object
+     * @param aUpdate object updates this
+     */
+    void UpdateL( CMceComMediaSource& aUpdate );
+    
+    /**
+     * Should not use RTCP for msrp sessions
+     * return EFalse, if not required
+     */
+    TBool UseRTCP();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+    /**
+    * Returns mcc type for mcc endpoint
+    * @return mcc type
+    */
+    const TUid MccType();   
+
+    
+    /**
+    * Prepares this endpoint
+    */
+    void PrepareL();
+    
+
+#endif//MCE_COMMON_SERVER_SIDE
+ 
+public:
+    RPointerArray <TUriC8>  iPath;
+    HBufC8*                 iSessInfo;
+    CDesC8ArrayFlat         iAcceptTypes;
+    TBuf8<50>               iAcceptWrappedTypes;
+    TBool                   iWrappedTypes;
+    TBool                   iFileShare;
+    HBufC*                  iFileName;
+    TUint                   iFileSize;
+    HBufC8*                 iFileType;
+    TBuf8<32>               iFileTransferid;
+    TBuf8<25>               iDispositionValue;
+    TBool                   iSecureConnection;
+    HBufC*                  iFilePath;
+    TBool                   iFTProgressNotification;
+
+private:
+
+    /**
+    * C++ default constructor.
+    * @param type of source
+    */
+    CMceComMsrpSource();
+    
+    void ConstructL(CMceComMsrpSource& aSource );
+    
+    void ConstructL();
+        
+    #ifdef EUNIT_TEST
+    friend class UT_CMceComMsrpSource;
+    #endif
+
+    };
+
+
+#endif // CMCEMSRPSOURCE_H
--- a/multimediacommsengine/mmceshared/inc/mcecomvideocodec.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mcecomvideocodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -174,6 +174,18 @@
                                 const CMccCodecInformation& aMccCurentCodec, 
                                 const CMccCodecInformation& aMccUpdateCodec ) const;
     
+    /**
+    * Checks, if signalling is required
+    * @param aStream stream
+    * @param aMccCurentCodec current mcc codec
+    * @param aMccUpdateCodec to be used mcc codec
+    */
+    TInt DoMccRequireSignalling( 
+                                const CMceSrvStream& aOldStream,
+                                const CMceSrvStream& aCurrentStream,
+                                const CMccCodecInformation& aMccCurentCodec, 
+                                const CMccCodecInformation& aMccUpdateCodec ) const;
+    
 protected: // from CMceComCodec
     
     /**
--- a/multimediacommsengine/mmceshared/inc/mceevents.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mceevents.h	Mon Sep 06 17:32:13 2010 +0530
@@ -245,7 +245,9 @@
                   iStream( NULL ),
                   iItcEvent( EMceItcNotAssigned ),
                   iItcData( KMceNotAssigned ),
-                  iItcDataDesC( NULL )
+                  iItcDataDesC( NULL ),
+                  iEventData1(KMceNotAssigned),
+                  iEventData2(KMceNotAssigned)
                     {
                     }
 
@@ -270,7 +272,9 @@
                   iStream( NULL ),
                   iItcEvent( EMceItcNotAssigned ),
                   iItcData( KMceNotAssigned ),
-                  iItcDataDesC( NULL )
+                  iItcDataDesC( NULL ),
+                  iEventData1(KMceNotAssigned),
+                  iEventData2(KMceNotAssigned)
                     {
                     }
 
@@ -291,7 +295,9 @@
                   iStream( NULL ),
                   iItcEvent( EMceItcNotAssigned ),
                   iItcData( KMceNotAssigned ),
-                  iItcDataDesC( NULL )
+                  iItcDataDesC( NULL ),
+                  iEventData1(KMceNotAssigned),
+                  iEventData2(KMceNotAssigned)
                     {
                     }
                   
@@ -320,7 +326,8 @@
     TMceItcCallBack iItcEvent;
     TUint32 iItcData;
     const TDesC8* iItcDataDesC;
-         
+    TUint32 iEventData1;
+    TUint32 iEventData2;
     };
 	
 	
--- a/multimediacommsengine/mmceshared/inc/mceserial.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mceserial.h	Mon Sep 06 17:32:13 2010 +0530
@@ -25,6 +25,8 @@
 #include <s32strm.h>
 #include <s32mem.h>
 #include <e32des8.h>
+#include <uri8.h>
+#include <e32cmn.h>
 
 #include "mcerefer.h"
 #include "mcecomsession.h"
@@ -88,6 +90,15 @@
     **/
     static void EncodeL( const TDesC8& aString, RWriteStream& aWriteStream );
     
+    
+    /**
+    * Encodes descriptor to stream
+    * @param aString string to be encoded to stream
+    * @param aWriteStream stream to which string is encoded
+    **/
+    static void EncodeL( const TDesC16& aString, RWriteStream& aWriteStream );
+    
+    
     /**
      * Encodes string buffer to stream. If buffer is NULL empty string is encoded
      * @param aString string buffer to be encoded to stream
@@ -96,11 +107,27 @@
     static void EncodeL( HBufC8* aString, RWriteStream& aWriteStream );
     
     /**
+     * Encodes string buffer to stream. If buffer is NULL empty string is encoded
+     * @param aString string buffer to be encoded to stream
+     * @param aWriteStream stream to which string is encoded
+     **/
+    static void EncodeL( HBufC16* aString, RWriteStream& aWriteStream );
+    
+    /**
      * Decodes string buffer from stream
      * @param aBuffer placeholder for data to be read from stream
      * @param aReadStream stream from which data is decoded
      **/
     static void DecodeL( HBufC8*& aBuffer, RReadStream& aReadStream );
+    
+    
+    /**
+     * Decodes string buffer from stream
+     * @param aBuffer placeholder for data to be read from stream
+     * @param aReadStream stream from which data is decoded
+     **/
+    static void DecodeL( HBufC16*& aBuffer, RReadStream& aReadStream );
+        
 
     /**
      * Decodes descriptor array from stream
@@ -131,8 +158,14 @@
     static void EncodeL( TMceMediaId aId, RWriteStream& aWriteStream );
 	
 	static void EncodeL( RArray<TMceCryptoContext>& aArray, RWriteStream& aWriteStream  );
+	static void EncodeL(TInetAddr& aAddr, RWriteStream& aWriteStream);
     
     static void DecodeL( RArray<TMceCryptoContext>& aArray, RReadStream& aReadStream );
+    
+    static void EncodeL( RPointerArray<TUriC8>& aArray, RWriteStream& aWriteStream  );
+        
+    static void DecodeL( RPointerArray<TUriC8>& aArray, RReadStream& aReadStream );
+    static void DecodeL(TInetAddr& aAddr, RReadStream& aReadStream);
     };
     
 
@@ -1051,6 +1084,46 @@
 
 
 
+	
+/**
+ * message stream serializer for Server and Client side stream
+ *
+ * @lib 
+ */
+template <class T>
+class TMceMessageStreamSerializer
+    {
+    
+public:
+
+    /**
+    * Constructor for internalization for server side
+    * @param aStream the stream
+    */
+    inline TMceMessageStreamSerializer( T& aStream );
+
+    /**
+    * Internalizes
+    * @param aSerCtx context for serialization
+    */
+    inline void InternalizeL( MMceComSerializationContext& aSerCtx );
+
+    /**
+    * Externalizes
+    * @param aSerCtx context for serialization
+    */
+    inline void ExternalizeL( MMceComSerializationContext& aSerCtx );
+
+
+private:
+
+      
+    /**
+    * Server / client side stream
+    */
+    T& iMessageStream;
+
+    };
 
 #include "mceserial.inl"
 
--- a/multimediacommsengine/mmceshared/inc/mceserial.inl	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/inc/mceserial.inl	Mon Sep 06 17:32:13 2010 +0530
@@ -597,4 +597,56 @@
         iVideoStream.Codecs()[i]->ExternalizeL( aSerCtx );
         }
     
+    }	
+
+// -----------------------------------------------------------------------------
+// TMceMEssageStreamSerializer::TMceMEssageStreamSerializer
+// -----------------------------------------------------------------------------
+//
+template <class T>
+inline TMceMessageStreamSerializer<T>::TMceMessageStreamSerializer( T& aStream )
+  : iMessageStream( aStream )
+    {
     }
+
+
+// -----------------------------------------------------------------------------
+// TMceMessageStreamSerializer::InternalizeL
+// -----------------------------------------------------------------------------
+//
+template <class T>
+inline void TMceMessageStreamSerializer<T>::InternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+
+    RReadStream& readStream = aSerCtx.ReadStream();
+    //codecs. presently the codec support for the message streams doesn't exist 
+    TUint32 codecCount = readStream.ReadUint32L();
+    for( TUint i=0;i<codecCount;i++)
+        {
+        // Presently there is no codec support for message streams
+        iMessageStream.AddCodecL( 
+            iMessageStream.BaseFactory().MessageCodecFactory().CreateLC( aSerCtx ) );
+            
+        CleanupStack::Pop();
+        }
+
+    }
+    
+// -----------------------------------------------------------------------------
+// TMceMessageStreamSerializer::ExternalizeL
+// -----------------------------------------------------------------------------
+//
+template <class T>
+inline void TMceMessageStreamSerializer<T>::ExternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+    RWriteStream& writeStream = aSerCtx.WriteStream();
+    
+    //codecs .. currently there is no codec support for Message type streams
+    TUint32 codecCount = iMessageStream.Codecs().Count();
+    writeStream.WriteUint32L( codecCount );
+   // Presently the codec support for message streams doesn't exist in MCE/MCC 
+   for( TUint i=0;i<codecCount;i++)
+        {
+        iMessageStream.Codecs()[i]->ExternalizeL( aSerCtx );
+        }
+    }
--- a/multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomamrwbcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -300,7 +300,7 @@
 //
 CMceComCodec* CMceComAMRWbCodec::DoMccValidateL( CMccCodecInformation& aMccCodec,
                                                CMceSrvStream& /*aStream*/,
-                                               TMceNegotiationRole aRole )
+                                               TMceNegotiationRole /*aRole*/ )
     {
     //if answerer mcc codec represents the received offer and codec the answer
     //if offerer codec represents the sent offer and mcc codec the answer
--- a/multimediacommsengine/mmceshared/src/mcecomaudiocodec.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomaudiocodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -429,6 +429,26 @@
     return action;
     
     }
+
+
+// -----------------------------------------------------------------------------
+// CMceComAudioCodec::DoMccRequireSignalling
+// -----------------------------------------------------------------------------
+//
+TInt CMceComAudioCodec::DoMccRequireSignalling( 
+    const CMceSrvStream& /*aOldStream*/,
+    const CMceSrvStream& /*aCurrentStream*/,
+    const CMccCodecInformation& /*aMccCurentCodec*/, 
+    const CMccCodecInformation& /*aMccUpdateCodec*/ ) const
+    {
+	// MSRP -	Chat Use case
+    TInt action = KMceNoSignalling;
+        
+    return action;
+    
+    }
+
+
     
 // -----------------------------------------------------------------------------
 // CMceComAudioCodec::DoMccAdjustL
--- a/multimediacommsengine/mmceshared/src/mcecomcodec.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -755,6 +755,26 @@
     return action;                
     }
 
+// -----------------------------------------------------------------------------
+// CMceComCodec::MccRequireSignalling
+// -----------------------------------------------------------------------------
+//
+TInt CMceComCodec::MccRequireSignalling( 
+    const CMceSrvStream& aOldStream,
+    const CMceSrvStream& aCurrentStream,
+    const CMccCodecInformation& aMccCurentCodec, 
+    const CMccCodecInformation& aMccUpdateCodec ) const
+    {
+    TInt action = KMceRequiresSignalling;
+
+    if ( !aMccCurentCodec.RequireSignalling( aMccUpdateCodec ) )
+        {
+        action = DoMccRequireSignalling( aOldStream, aCurrentStream, aMccCurentCodec, aMccUpdateCodec );
+        }
+        
+    return action;                
+    }
+
     
 // -----------------------------------------------------------------------------
 // CMceComCodec::SetState
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecomexternalsink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,132 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecomexternalsink.h"
+#include "mceexternalsink.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComAvSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSink* CMceComExternalSink::NewL()
+    {
+    CMceComExternalSink* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSink* CMceComExternalSink::NewLC()
+    {
+    CMceComExternalSink* self = new (ELeave) CMceComExternalSink();
+    CleanupStack::PushL( self );		
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::~CMceComExternalSink
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSink::~CMceComExternalSink()
+    {   
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::CMceComExternalSink
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSink::CMceComExternalSink()
+  : CMceComMediaSink( KMceExternalSink )
+    {
+    }
+	
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSink* CMceComExternalSink::CloneL()
+    {
+    CMceComExternalSink* copy = new (ELeave) CMceComExternalSink();
+    Mem::Copy( copy, this, sizeof(CMceComExternalSink) );
+    copy->Zero();    
+    return copy;
+        
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSink::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSink::InternalizeFlatL( aReadStream );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSink::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSink::ExternalizeFlatL( aWriteStream );
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::MccType
+// -----------------------------------------------------------------------------
+//
+const TUid CMceComExternalSink::MccType()
+    {
+    return KUidMccAnySink;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSink::PrepareL()
+    {
+    //NOP  // Not required as the data path for message stream will be handled by applications
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecomexternalsource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,128 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecomexternalsource.h"
+#include "mceexternalsource.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSource* CMceComExternalSource::NewL()
+    {
+    CMceComExternalSource* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSource* CMceComExternalSource::NewLC()
+    {
+    CMceComExternalSource* self = new (ELeave) CMceComExternalSource();
+    CleanupStack::PushL( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::~CMceComExternalSource
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSource::~CMceComExternalSource()
+    {   
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::CMceComExternalSource
+// -----------------------------------------------------------------------------
+//
+CMceComExternalSource::CMceComExternalSource()
+  : CMceComMediaSource( KMceExternalSource )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSource* CMceComExternalSource::CloneL()
+    {
+    CMceComExternalSource* copy = new (ELeave) CMceComExternalSource();
+    Mem::Copy( copy, this, sizeof(CMceComExternalSource) );
+    return copy;        
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSource::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSource::InternalizeFlatL( aReadStream );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSource::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSource::ExternalizeFlatL( aWriteStream );
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComExternalSource::MccType
+// -----------------------------------------------------------------------------
+//
+const TUid CMceComExternalSource::MccType()
+    {
+    return KUidMccAnySource;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComExternalSource::PrepareL()
+    {
+    //NOP  // Not required as the data path for message stream will be handled by applications
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- a/multimediacommsengine/mmceshared/src/mcecomfactory.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomfactory.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -61,8 +61,23 @@
 #include "mcecomavccodec.h"
 #include "mcecomamrwbcodec.h"
 #include "mceserial.h"
-
-
+#include "mcemessagestream.h"
+#include "mcecommessagestream.h"
+#include "mcemsrpsource.h"
+#include "mcecommsrpsource.h"
+#include "mcemsrpsink.h"
+#include "mcecommsrpsink.h"
+#include "mceexternalsink.h"
+#include "mcecomexternalsink.h"
+#include "mcecomexternalsource.h"
+#include "mcemessagesink.h"
+#include "mcemessagesource.h"
+#include "mcecommessagesink.h"
+#include "mcecommessagesource.h"
+#include "mceexternalsource.h"
+#include "mcemessagecodec.h"
+#include "mcecommessagecodec.h"
+#include "mcecommsrpcodec.h"
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -261,6 +276,11 @@
             stream = CMceComVideoStream::NewLC();
             break;
             }
+		case KMceMessage:
+			{
+			stream = CMceComMessageStream::NewLC();
+			break;
+			}
         default:
             {
             break;
@@ -329,6 +349,23 @@
             source = CMceComFileSource::NewLC();
             break;
             }
+		case KMceExternalSource:
+            {
+            source = CMceComExternalSource::NewLC();
+            break;
+            }
+            
+		case KMceMessageSource:
+		    {
+		    source = CMceComMessageSource::NewLC();
+		    break;
+		    }
+			
+		case KMceMSRPSource:
+            {
+            source = CMceComMsrpSource::NewLC();
+            break;
+            }
         default:
             {
             break;
@@ -394,6 +431,21 @@
             sink = CMceComFileSink::NewLC();
             break;
             }
+		case KMceExternalSink:
+			{
+			sink = CMceComExternalSink::NewLC();
+			break;
+			}
+		case KMceMessageSink:
+		    {
+		    sink = CMceComMessageSink::NewLC();
+		    break;
+		    }
+		case KMceMSRPSink:
+			{
+			sink = CMceComMsrpSink::NewLC();
+			break;
+			}
         default:
             {
             break;
@@ -635,3 +687,67 @@
     return codec;
     
     }
+
+// -----------------------------------------------------------------------------
+// TMceComMessageCodecFactory::CreateLC 
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* TMceComMessageCodecFactory::CreateLC( const TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec* codec = CreateCodecLC( aSdpName );
+    __ASSERT_ALWAYS( codec, User::Leave( KErrNotSupported ) );
+    
+    return codec;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// TMceComMessageCodecFactory::CreateCodecLC 
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* TMceComMessageCodecFactory::CreateCodecLC( const TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec* codec = NULL; 
+   	
+   	//plain codec 
+    if ( !aSdpName.CompareF(KMceSDPNameMsrp) )
+        {
+        codec = CMceComMsrpCodec::NewLC( aSdpName );
+        }
+   else
+        {
+        codec = NULL;
+        }
+    
+    return codec;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// TMceComMessageCodecFactory::CreateCodecLC 
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* TMceComMessageCodecFactory::CreateCodecLC( TUint /*aPayload*/ )
+    {
+    return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// TMceComMessageCodecFactory::CreateLC
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* TMceComMessageCodecFactory::CreateLC( MMceComSerializationContext& aSerCtx )
+    {
+    RReadStream& readStream = aSerCtx.ReadStream();
+    
+    MStreamBuf* streamBuf = readStream.Source();
+    TStreamPos pos = streamBuf->TellL( MStreamBuf::ERead );
+    TBuf8<KMceMaxSdpNameLength> sdpName;
+    MceSerial::DecodeL( sdpName, readStream );
+    streamBuf->SeekL( MStreamBuf::ERead, pos );
+    
+    CMceComMessageCodec* codec = CreateLC( sdpName );
+    codec->InternalizeL( aSerCtx );
+    return codec;
+    
+    }
--- a/multimediacommsengine/mmceshared/src/mcecommediastream.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecommediastream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -28,6 +28,10 @@
 #include "mcecomcodec.h"
 #include "cleanupresetanddestroy.h"
 #include "mceclient.pan"
+#include "mcemsrpsource.h"
+#include "mcemsrpsink.h"
+#include "mcemsrpsource.h"
+#include "mceclilogs.h"
 
 #ifdef MCE_COMMON_SERVER_SIDE
 
@@ -401,6 +405,7 @@
     iLinkId( KMceNotAssigned ),
     iDowngradedEnpoints( EFalse )
     {
+    iRemoteMsrpPath.Zero();
     }
 
 
@@ -630,7 +635,7 @@
     if ( iSource )
         {
         iSource->InitializeL( *this );
-        if ( iSource->iType == KMceRTPSource )
+        if ( iSource->iType == KMceRTPSource || iSource->iType == KMceMSRPSource)
             {
             iStreamType = BoundStream() ? EReceiveStream : EReceiveOnlyStream;
             }
@@ -641,7 +646,7 @@
         {
         iSinks[i]->InitializeL( *this );
         if ( iStreamType == ELocalStream && 
-             iSinks[i]->iType == KMceRTPSink )
+             (iSinks[i]->iType == KMceRTPSink || iSinks[i]->iType == KMceMSRPSink) )
             {
             iStreamType = BoundStream() ? ESendStream : ESendOnlyStream;
             }
@@ -685,6 +690,24 @@
     }    
 
 // -----------------------------------------------------------------------------
+// CMceComMediaStream::SetRemoteMsrpPath
+// -----------------------------------------------------------------------------
+//
+void CMceComMediaStream::SetRemoteMsrpPath(TDes8 &aremoteMsrpPath, TDes8 &aConnStatus)
+    {
+    
+    iRemoteMsrpPath = aremoteMsrpPath;
+    iConnStatus = aConnStatus;
+    
+    if ( BoundStream() )
+        {
+        iLinkedStream->iRemoteMsrpPath = aremoteMsrpPath;
+        iLinkedStream->iConnStatus = aConnStatus;
+        }
+        
+    }    
+
+// -----------------------------------------------------------------------------
 // CMceComMediaStream::SetRemoteRtcpMediaPort
 // -----------------------------------------------------------------------------
 //
@@ -1296,6 +1319,35 @@
                         session->MediaObserver().EventReceived( aEvent );
                         break;
                         }
+                    // file tranfer events
+                    case KMccFileSendCompleted:
+                        {
+                        aEvent.iItcEvent =EMceItcFileSendCompleted;
+                        aEvent.iItcData = iState;
+                        session->MediaObserver().EventReceived( aEvent );
+                        break;
+                        }
+                    case KMccFileSendProgressNotification:
+                        {
+                        aEvent.iItcEvent =EMceFileSendInProgress;
+                        aEvent.iItcData = iState;
+                        session->MediaObserver().EventReceived( aEvent );
+                        break;
+                        }
+                    case KMccFileReceiveCompleted:
+                        {
+                        aEvent.iItcEvent =EMceItcFileReceiveCompleted;
+                        aEvent.iItcData = iState;
+                        session->MediaObserver().EventReceived( aEvent );
+                        break;
+                        }
+                    case KMccFileReceiveProgressNotification:
+                        {
+                        aEvent.iItcEvent = EMceFileReceiveInProgress;
+                        aEvent.iItcData = iState;
+                        session->MediaObserver().EventReceived( aEvent );
+                        break;
+                        }
                     case KMccLinkCreated:
                         {
                         aEvent.iItcEvent = EMceItcLinkCreated;
@@ -1342,6 +1394,20 @@
             iState = CMceMediaStream::EStreaming;
             break;
             }
+        // For file transfer use cases
+        case KMccFileSendProgressNotification:
+            iState = CMceMediaStream::EFileSendInProgress;
+            break;
+            // For file transfer use cases    
+        case KMccFileReceiveProgressNotification:
+            iState = CMceMediaStream::EFileReceiveInProgress;
+            break;
+            
+        case KMccFileSendCompleted:
+        case KMccFileReceiveCompleted:
+            iState = CMceMediaStream::EFileTransferCompleted;
+            break;
+            
         case KMccStreamBuffering:
             {
             iState = CMceMediaStream::EBuffering;
@@ -1422,6 +1488,23 @@
         
     }
 
+
+// -----------------------------------------------------------------------------
+// CMceComMediaStream::SetLocalMsrpPath
+// -----------------------------------------------------------------------------
+//
+void CMceComMediaStream::SetLocalMsrpPath(TDesC8& aLocalMsrpPath)
+    {
+    
+    iLocalMsrpPath = aLocalMsrpPath;
+    
+    if ( BoundStream() )
+        {
+        iLinkedStream->iLocalMsrpPath = aLocalMsrpPath;
+        }
+        
+    }
+
 // -----------------------------------------------------------------------------
 // CMceComMediaStream::Direction
 // -----------------------------------------------------------------------------
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommessagecodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,472 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecommessagecodec.h"
+#include "mcemsrpcodec.h"  
+
+#include "mceserial.h"
+#include "mceevents.h" 
+
+#include "mcecomrtpsource.h"
+#include "mcertpsource.h"
+#include "mcecommsrpsource.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <MmccCodecInformation.h>
+#include "mcesrvstream.h"
+#include "mcesrvsource.h"
+#include "mcemsrpsource.h"
+#include "mcecommsrpsource.h"
+#include "mcemsrpsink.h"
+#include "mcecommsrpsink.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* CMceComMessageCodec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec* self = NewLC( aSdpName );
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* CMceComMessageCodec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec* self = new (ELeave) CMceComMessageCodec();
+    CleanupStack::PushL( self );
+    self->ConstructL( aSdpName );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::~CMceComMessageCodec
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec::~CMceComMessageCodec()
+    {
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::CMceComMessageCodec
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec::CMceComMessageCodec()
+  : CMceComCodec(),
+    iEnableVAD( EFalse ),
+    iSamplingFreq( 0 ),
+    iPTime( 0 ),
+    iMaxPTime( 0 )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* CMceComMessageCodec::CloneL()
+    {
+    CMceComMessageCodec* copy = new (ELeave) CMceComMessageCodec();
+    CleanupStack::PushL( copy );
+    copy->ConstructL( *this );
+    CleanupStack::Pop( copy );
+    return copy;
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComCodec::ConstructL( aSdpName );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::ConstructL( CMceComMessageCodec& aCodec )
+    {
+    CMceComCodec::ConstructL( aCodec );
+    
+    iEnableVAD = aCodec.iEnableVAD;
+	iSamplingFreq = aCodec.iSamplingFreq;	
+	iPTime = aCodec.iPTime;
+	iMaxPTime = aCodec.iMaxPTime;
+    
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComCodec::InternalizeFlatL( aReadStream );
+    
+    iEnableVAD = static_cast<TBool>( aReadStream.ReadUint8L() );
+	iSamplingFreq = aReadStream.ReadUint16L();
+	iPTime = aReadStream.ReadUint16L();
+	iMaxPTime = aReadStream.ReadUint16L();
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComCodec::ExternalizeFlatL( aWriteStream );
+    
+    aWriteStream.WriteUint8L( iEnableVAD );
+    aWriteStream.WriteUint16L( iSamplingFreq );
+    aWriteStream.WriteUint16L( iPTime );
+    aWriteStream.WriteUint16L( iMaxPTime );  
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::UpdateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::UpdateL( CMceComCodec& aUpdate )
+    {
+    CMceComCodec::UpdateL( aUpdate );
+
+    CMceComMessageCodec& update = static_cast<CMceComMessageCodec&>( aUpdate );
+
+    iEnableVAD = update.iEnableVAD;
+    iSamplingFreq = update.iSamplingFreq;
+    
+    
+    if ( IS_RECEIVESTREAM( iStream ) )
+        {
+        iPTime = update.iPTime;
+        iMaxPTime = update.iMaxPTime;
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::Factory
+// -----------------------------------------------------------------------------
+//
+TMceComMessageCodecFactory CMceComMessageCodec::Factory()
+    {
+    return TMceComMessageCodecFactory();
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::CompareSdpIndex
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageCodec::CompareSdpIndex( 
+    const CMceComMessageCodec& aIndex1, const CMceComMessageCodec& aIndex2 )
+    {
+    // NOTE: if zero (equals) is returned from here, order is strangely anyway
+    // changed. Returning positive value if indexes are equal is for avoiding
+    // this quirk.
+
+    if ( aIndex1.iCodecSdpIndex >= aIndex2.iCodecSdpIndex )
+        {
+        return (1);
+        }
+    else if ( aIndex1.iCodecSdpIndex < aIndex2.iCodecSdpIndex )
+        {
+        return (-1);
+        }
+    else
+        {
+        return (0);
+        }
+    } 
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::operator=
+// -----------------------------------------------------------------------------
+//
+CMceComCodec& CMceComMessageCodec::operator=( CMccCodecInformation& aMccCodec )
+    {
+
+	iPayloadType = aMccCodec.PayloadType();
+	iBitrate = aMccCodec.Bitrate();
+	iAllowedBitrates = aMccCodec.AllowedBitrates();
+	iCodecMode = aMccCodec.CodecMode();
+	iFourCC = aMccCodec.FourCC();
+	iFrameSize = aMccCodec.FrameSize();
+
+    iEnableVAD = aMccCodec.VAD();
+	iSamplingFreq = aMccCodec.SamplingFreq();
+	iPTime = aMccCodec.PTime();
+	iMaxPTime = aMccCodec.MaxPTime();
+
+    return *this;
+    
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccDecodeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::DoMccDecodeL( CMccCodecInformation& aMccCodec )
+    {
+    //copy values, which are not explicitely in SDP, from mcc codec
+	iSamplingFreq = aMccCodec.SamplingFreq();
+	
+	iBitrate = aMccCodec.Bitrate();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccEncodeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::DoMccEncodeL( CMccCodecInformation& aMccCodec,
+                                      CMceSrvStream& /*aStream*/ )
+    {
+	User::LeaveIfError( aMccCodec.SetSamplingFreq( iSamplingFreq ) );
+	User::LeaveIfError( aMccCodec.SetBitrate( iBitrate ) );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccValidateL
+// -----------------------------------------------------------------------------
+//
+CMceComCodec* CMceComMessageCodec::DoMccValidateL( CMccCodecInformation& aMccCodec,
+                                                 CMceSrvStream& /*aStream*/,
+                                                 TMceNegotiationRole aRole )
+    {
+    //if answerer mcc codec represents the received offer and codec the answer
+    //if offerer codec represents the sent offer and mcc codec the answer
+    TBool notValid = aRole == EMceRoleAnswerer ?
+                  ( iAllowedBitrates && aMccCodec.AllowedBitrates() == 0 ||
+	                iAllowedBitrates > aMccCodec.AllowedBitrates() ) :
+                  ( iAllowedBitrates && aMccCodec.AllowedBitrates() == 0 ||
+	                iAllowedBitrates < aMccCodec.AllowedBitrates() );
+	
+	User::LeaveIfError( notValid ? KErrNotSupported : KErrNone );
+	
+	return NULL;  
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccRequireSignalling
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageCodec::DoMccRequireSignalling( 
+    const CMceSrvStream& aStream,
+    const CMccCodecInformation& aMccCurentCodec, 
+    const CMccCodecInformation& aMccUpdateCodec ) const
+    {
+    TInt action = KMceNoSignalling;
+
+    if ( aStream.StreamType() == CMceComMediaStream::EReceiveStream ||
+         aStream.StreamType() == CMceComMediaStream::EReceiveOnlyStream )
+        {
+        if ( aMccCurentCodec.PTime() != aMccUpdateCodec.PTime() ||
+             aMccCurentCodec.MaxPTime() != aMccUpdateCodec.MaxPTime() )
+            {
+            action = KMceRequiresSignalling;
+            }
+        }
+        
+    return action;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccRequireSignalling
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageCodec::DoMccRequireSignalling( 
+    const CMceSrvStream& aOldStream,
+    const CMceSrvStream& aCurrentStream,
+    const CMccCodecInformation& /*aMccCurentCodec*/, 
+    const CMccCodecInformation& /*aMccUpdateCodec*/ ) const
+    {
+   TInt action = KMceNoSignalling;
+    
+    // Check for MSRP capabilities
+    
+    // Checking for Sink properties
+    RPointerArray<CMceComMediaSink> Oldsinks = aOldStream.Data().Sinks();
+    TBuf8<50> aOldAWtype;
+    TBuf8<50> aOldAcceptTypestemp;
+    for ( TInt i = 0; i < Oldsinks.Count(); i++ )
+        {
+        if(Oldsinks[i]->Type() == KMceMSRPSink)
+            {
+            aOldAWtype = static_cast<CMceComMsrpSink*>(Oldsinks[i])->iAcceptWrappedTypes;//Oldsinks[i]->iAcceptWrappedTypes;
+            TInt aPos = static_cast<CMceComMsrpSink*>(Oldsinks[i])->iAcceptTypes.MdcaCount();
+            if(aPos)
+                {
+                aOldAcceptTypestemp.Append(static_cast<CMceComMsrpSink*>(Oldsinks[i])->iAcceptTypes.MdcaPoint(aPos));
+                }
+            }
+        } 
+    
+    RPointerArray<CMceComMediaSink> Newsinks = aCurrentStream.Data().Sinks();
+    TBuf8<50> aNewAWtype;
+    TBuf8<50> aNewAcceptTypestemp;
+    for ( TInt i = 0; i < Newsinks.Count(); i++ )
+        {
+        if(Newsinks[i]->Type() == KMceMSRPSink)
+            {
+            aNewAWtype = static_cast<CMceComMsrpSink*>(Newsinks[i])->iAcceptWrappedTypes;
+            TInt aPos = static_cast<CMceComMsrpSink*>(Newsinks[i])->iAcceptTypes.MdcaCount();
+            if(aPos)
+                {
+                aNewAcceptTypestemp.Append(static_cast<CMceComMsrpSink*>(Newsinks[i])->iAcceptTypes.MdcaPoint(aPos));
+                }
+            
+            if (aOldAWtype.FindC(aNewAWtype) == KErrNotFound )
+                {
+                // Msrp/AcceptwrappedTypes change detected. requires signalling
+                action = KMceRequiresSipSignallingOnly;
+                }
+            if  (aOldAcceptTypestemp.FindC(aNewAcceptTypestemp) == KErrNotFound )
+                {
+                //Msrp/AcceptTypes change detected. requires signalling
+                action = KMceRequiresSipSignallingOnly;
+                }
+            }
+        }
+    
+    aOldAWtype.Zero();
+    aNewAWtype.Zero();
+    aOldAcceptTypestemp.Zero();
+    aNewAcceptTypestemp.Zero();
+   
+    // Checking for Source properties
+    CMceComMsrpSource* msrpOldSource = static_cast<CMceComMsrpSource*>(aOldStream.Data().Source());
+
+    if(msrpOldSource->Type() == KMceMSRPSource)
+        {
+        aOldAWtype = msrpOldSource->iAcceptWrappedTypes; //static_cast<CMceComMsrpSink*>( msrpOldSource->iFlatData )->iAcceptWrappedTypes;
+        TInt aPos = msrpOldSource->iAcceptTypes.MdcaCount();
+        for(TInt j=0; j<aPos; j++)
+            {
+            aOldAcceptTypestemp.Append(msrpOldSource->iAcceptTypes.MdcaPoint(j));
+            }
+        }
+    
+    CMceComMsrpSource* msrpNewSource = static_cast<CMceComMsrpSource*> (aCurrentStream.Data().Source());
+    if(msrpNewSource->Type() == KMceMSRPSource)
+        {
+    
+        aNewAWtype = msrpNewSource->iAcceptWrappedTypes;
+        TInt aPos = msrpNewSource->iAcceptTypes.MdcaCount();
+        for(TInt j=0; j<aPos; j++)
+            {
+            aNewAcceptTypestemp.Append(msrpNewSource->iAcceptTypes.MdcaPoint(j));
+            }
+        
+        if (aOldAWtype.FindC(aNewAWtype) == KErrNotFound )
+            {
+            // Msrp/AcceptwrappedTypes change detected. requires signalling
+            action = KMceRequiresSipSignallingOnly;
+            }
+        
+        if  (aOldAcceptTypestemp.FindC(aNewAcceptTypestemp) == KErrNotFound )
+            {
+            //Msrp/AcceptTypes change detected. requires signalling
+            action = KMceRequiresSipSignallingOnly;
+            }  
+        }
+
+    return action; 
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::MccPopulateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::MccPopulateL( CMccCodecInformation& aMccCodec,
+                                 CMceSrvStream& /*aStream*/,
+                                 TMceNegotiationRole aRole )
+    {
+    //MccEncodeL( aMccCodec, aStream );
+    if ( aRole == EMceRoleOfferer )
+        {
+        // Create fmtp
+        aMccCodec.CreateFmtpAttrListL();
+        }
+
+    UpdateL( aMccCodec );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComCodec::UpdateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::UpdateL( CMccCodecInformation& aMccCodec )
+    {
+    //SetFmtpAttributeL( aMccCodec.GetFmtpL() );
+    iSdpName = aMccCodec.SdpName();
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoMccAdjustL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::DoMccAdjustL( CMccCodecInformation& /*aMccCodec*/,
+                                      CMceSrvStream& /*aStream*/ )
+    {
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageCodec::DoSetDefaultFmtpAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageCodec::DoSetDefaultFmtpAttributeL()
+    {
+    // NOP
+    }
+    
+       
+#endif// MCE_COMMON_SERVER_SIDE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommessagesink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,133 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecommessagesink.h"
+#include "mcemessagesink.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+#include "mmccinterface.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComAvSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSink* CMceComMessageSink::NewL()
+    {
+    CMceComMessageSink* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSink* CMceComMessageSink::NewLC()
+    {
+    CMceComMessageSink* self = new (ELeave) CMceComMessageSink();
+    CleanupStack::PushL( self );		
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::~CMceComMessageSink
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSink::~CMceComMessageSink()
+    {   
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::CMceComMessageSink
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSink::CMceComMessageSink()
+  : CMceComMediaSink( KMceMessageSink )
+    {
+    }
+	
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSink* CMceComMessageSink::CloneL()
+    {
+    CMceComMessageSink* copy = new (ELeave) CMceComMessageSink();
+    Mem::Copy( copy, this, sizeof(CMceComMediaSink) );
+    copy->Zero();    
+    return copy;
+        
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSink::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSink::InternalizeFlatL( aReadStream );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSink::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSink::ExternalizeFlatL( aWriteStream );
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::MccType
+// -----------------------------------------------------------------------------
+//  
+const TUid CMceComMessageSink::MccType()
+    {
+    return KUidMccAnySink;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSink::PrepareL()
+    {
+    //NOP
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommessagesource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,130 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecommessagesource.h"
+#include "mcemessagesource.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+#include "mmccinterface.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSource* CMceComMessageSource::NewL()
+    {
+    CMceComMessageSource* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSource* CMceComMessageSource::NewLC()
+    {
+    CMceComMessageSource* self = new (ELeave) CMceComMessageSource();
+    CleanupStack::PushL( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::~CMceComMessageSource
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSource::~CMceComMessageSource()
+    {   
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::CMceComMessageSource
+// -----------------------------------------------------------------------------
+//
+CMceComMessageSource::CMceComMessageSource()
+  : CMceComMediaSource( KMceMessageSource )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSource* CMceComMessageSource::CloneL()
+    {
+    CMceComMessageSource* copy = new (ELeave) CMceComMessageSource();
+    Mem::Copy( copy, this, sizeof(CMceComMediaSource) );
+    return copy;        
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSource::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSource::InternalizeFlatL( aReadStream );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSource::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSource::ExternalizeFlatL( aWriteStream );
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComMessageSource::MccType
+// -----------------------------------------------------------------------------
+//
+const TUid CMceComMessageSource::MccType()
+    {
+    return KUidMccAnySource;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageSource::PrepareL()
+    {
+    //NOP  
+    // Not required as the data path for message stream will be handled by applications
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommessagestream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,552 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcemessagestream.h"
+#include "mcecommessagestream.h"
+#include "mcecommessagecodec.h"
+#include "mcecommediasource.h"
+#include "mcecommediasink.h"
+#include "mceserial.h"
+#include "mceevents.h"
+#include "cleanupresetanddestroy.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <MmccCodecInformationFactory.h>
+#include <MmccCodecInformation.h>
+
+    
+#endif//MCE_COMMON_SERVER_SIDE
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream* CMceComMessageStream::NewL()
+    {
+    CMceComMessageStream* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream* CMceComMessageStream::NewLC()
+    {
+    CMceComMessageStream* self = new (ELeave) CMceComMessageStream();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::~CMceComMessageStream
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream::~CMceComMessageStream()
+    {
+    iCodecs.ResetAndDestroy();
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::CMceComMessageStream
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream::CMceComMessageStream()
+    :CMceComMediaStream( KMceMessage ),
+    iUseMsrpPathAttrForHostAddrAndPort(ETrue),
+    iMsrpConnUsage(EFalse)
+    {
+    }
+
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::AddCodecL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::AddCodecL( CMceComCodec* aCodec)
+    {
+    iCodecs.AppendL( static_cast<CMceComMessageCodec*>(aCodec) );
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::RemoveCodecL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::RemoveCodecL( CMceComCodec* aCodec )
+    {
+    CMceComMessageCodec* codec = static_cast<CMceComMessageCodec*>( aCodec );
+    TInt index = Codecs().Find( codec );
+    User::LeaveIfError( index );
+    
+    Codecs().Remove( index );
+    delete aCodec;
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::RemoveCodecL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::DestroyCodecs( )
+    {
+    iCodecs.ResetAndDestroy();
+    } 
+
+// -----------------------------------------------------------------------------
+// CMceComAudioStream::CodecL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* CMceComMessageStream::CodecL( TInt aIndex ) const
+    {
+    __ASSERT_ALWAYS( aIndex >= 0 && aIndex < iCodecs.Count(),
+        User::Leave( KErrArgument ) );
+    
+    return iCodecs[aIndex];
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::CodecCount
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageStream::CodecCount() const
+    {
+    return iCodecs.Count();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::FindCodec
+// -----------------------------------------------------------------------------
+//
+
+CMceComCodec* CMceComMessageStream::FindCodecL( CMceComCodec& aCodec )
+    {
+    CMceComCodec* foundCodec = NULL;
+    CMceComMessageCodec* codec = static_cast<CMceComMessageCodec*>( &aCodec );
+    TInt index = Codecs().Find( codec );
+    if ( index == KErrNotFound )
+        {
+        for ( TInt i = 0; i < Codecs().Count() && !foundCodec; i++ )
+            {
+            if ( Codecs()[ i ]->iSdpName.CompareF( aCodec.iSdpName ) == 0 )
+                {
+                foundCodec = Codecs()[ i ];
+                }     
+            }
+        }
+    else
+        {
+        foundCodec = Codecs()[ index ];
+        }
+    return foundCodec;
+    }
+    
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::Codecs
+// -----------------------------------------------------------------------------
+//
+RPointerArray<CMceComMessageCodec>& CMceComMessageStream::Codecs()
+    {
+    return iCodecs;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaStream::InternalizeFlatL( aReadStream );
+    this->iUseMsrpPathAttrForHostAddrAndPort = aReadStream.ReadInt8L();
+    this->iMsrpConnUsage = aReadStream.ReadInt8L();
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaStream::ExternalizeFlatL( aWriteStream );
+    aWriteStream.WriteInt8L(this->iUseMsrpPathAttrForHostAddrAndPort);
+    aWriteStream.WriteInt8L(this->iMsrpConnUsage);
+    }
+
+  
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::InternalizeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::InternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+    CMceComMediaStream::InternalizeL( aSerCtx );
+    
+    TMceMessageStreamSerializer<CMceComMessageStream> serial( *this );
+    serial.InternalizeL( aSerCtx );
+        
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ExternalizeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::ExternalizeL( MMceComSerializationContext& aSerCtx )
+    {
+    CMceComMediaStream::ExternalizeL( aSerCtx );
+    
+    TMceMessageStreamSerializer<CMceComMessageStream> serial( *this );
+    serial.ExternalizeL( aSerCtx );
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaStream* CMceComMessageStream::CloneL()
+    {
+    CMceComMessageStream* copy = new (ELeave) CMceComMessageStream();
+    CleanupStack::PushL( copy );
+    copy->ConstructL( *this );
+    CleanupStack::Pop( copy );
+    return copy;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::ConstructL()
+    {
+    
+    CMceComMediaStream::ConstructL();
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::ConstructL( CMceComMessageStream& aStream )
+    {
+    CMceComMediaStream::ConstructL( aStream );
+    for (int i = 0; i<aStream.Codecs().Count();i++)
+        {
+        CMceComMessageCodec* codec = aStream.Codecs()[ i ]->CloneL();
+        CleanupStack::PushL( codec );
+        AddCodecL( codec );
+        CleanupStack::Pop( codec );
+        }
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::InitializeL( CMceComSession& aParent )
+    {
+    CMceComMediaStream::InitializeL( aParent );
+
+    for (int i = 0; i<Codecs().Count();i++)
+        {
+        Codecs()[i]->InitializeL( *this );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::UpdateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::UpdateL( CMceComMediaStream& aStream )
+    {  
+    CMceComMediaStream::UpdateL( aStream );
+
+    CMceComMessageStream* stream = static_cast<CMceComMessageStream*>( &aStream );
+	
+	
+    if (iUseMsrpPathAttrForHostAddrAndPort != stream->iUseMsrpPathAttrForHostAddrAndPort)
+    {
+    iUseMsrpPathAttrForHostAddrAndPort = stream->iUseMsrpPathAttrForHostAddrAndPort;
+    }
+    this->iMsrpConnUsage = stream->iMsrpConnUsage ;
+    
+    RPointerArray<CMceComMessageCodec> updated;
+    
+    MceCleanupResetAndDestroyPushL( updated );
+    
+    for( TInt i = 0; i < stream->Codecs().Count(); i++ )
+        {
+        CMceComMessageCodec* update = stream->Codecs()[i];
+        TBool isUpdated = EFalse;
+        TInt j = 0;
+        while( !isUpdated && j < Codecs().Count() )
+            {
+            CMceComMessageCodec* codec = Codecs()[j];
+            if ( codec->Id() == update->Id() )
+                {
+                codec->UpdateL( *update );
+                stream->Codecs().Remove( i );
+                delete update;
+                updated.AppendL( codec );
+                Codecs().Remove( j );
+                i--;
+                isUpdated = ETrue;
+                }
+            j++;                
+            }
+        }
+	this->iMsrpConnUsage = stream->iMsrpConnUsage ;        
+    if ( Codecs().Count() > 0 )//codecs have been removed
+        {
+        Session()->IsStructureChanged() = ETrue;
+        }
+        
+    iCodecs.ResetAndDestroy();
+    while( updated.Count() > 0 )
+        {
+        iCodecs.AppendL( updated[0] );
+        updated.Remove( 0 );
+        }
+        
+    CleanupStack::PopAndDestroy();//updated
+            
+    if ( stream->Codecs().Count() > 0 )//streams have been added
+        {
+        Session()->IsStructureChanged() = ETrue;
+            
+        while( stream->Codecs().Count() > 0 )
+            {
+            CMceComMessageCodec* add = stream->Codecs()[0];
+            iCodecs.AppendL( add );
+            stream->Codecs().Remove( 0 );
+            }
+        }
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::ReorderCodecs
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::ReorderCodecs()
+    {
+    // The data path will not be handled in MCC for message type streams hence no codecs.
+    TLinearOrder<CMceComMessageCodec> order( CMceComMessageCodec::CompareSdpIndex );
+    
+    iCodecs.Sort( order );
+    }
+
+
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::SynchronizeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::SynchronizeL( TBool aRoleAnswerer )
+    {
+    TInt codecIndex( 0 );
+// Presently there is no codecs support in MCE/MCC for message type streams
+    while ( codecIndex < Codecs().Count() )
+        {
+        CMceComCodec& codec = *Codecs()[ codecIndex ];
+        
+        //When role is offerer stream cannot remove codecs. 
+        //It will be done by mediamanager together with mcc
+        //if there is session update decoded there might be codecs
+        //which are not valid anymore, and thus, needed to be removed.
+        TBool remove( !codec.iIsNegotiated && aRoleAnswerer );
+        
+        if ( BoundStream() )
+            {
+            CMceComCodec* sync = BoundStreamL().FindCodecL( codec );
+            
+            if ( remove )
+                {
+                BoundStreamL().RemoveCodecL( sync );
+                }
+            else if ( sync )
+                {
+                sync->SynchronizeL( codec, aRoleAnswerer );
+                }
+            else if ( aRoleAnswerer )
+                {
+                //MCE_DEFINE_TEXT_CODEC( textCodec, codec );
+                CMceComMessageCodec& textCodec = static_cast<CMceComMessageCodec&>( codec );
+                CMceComMessageCodec* copy = textCodec.CloneL();
+                CleanupStack::PushL( copy );
+                copy->InitializeL( BoundStreamL() );
+                //MCE_TEXT( BoundStreamL() ).AddCodecL( copy );
+                (static_cast<CMceComMessageStream&>( BoundStreamL() )).AddCodecL( copy );
+                CleanupStack::Pop( copy );
+                }
+            else
+                {
+                //NOP
+                }
+            }
+            
+        if ( remove )
+            {
+            RemoveCodecL( &codec );
+            }
+        else
+            {
+            codecIndex++;
+            }
+        }
+
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::UpdateDefaultCodecL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::UpdateDefaultCodecL()
+    {
+    RPointerArray<CMceComMessageCodec>& messageCodecs = Codecs();
+    
+    if ( messageCodecs.Count() > 0 )
+        {
+        CMceComCodec& highestPriorityCodec = *messageCodecs[ 0 ];
+        
+        TBool defaultRemoved( highestPriorityCodec.iIsEnabled &&
+                              !highestPriorityCodec.iIsNegotiated );
+                              
+        TBool priorityChanged( !highestPriorityCodec.iIsEnabled && 
+                               highestPriorityCodec.iIsNegotiated );                
+        if ( defaultRemoved || priorityChanged )
+            {
+            TBool newDefaultCodecSet( EFalse );
+            for ( TInt i = 0; i < messageCodecs.Count(); i++ )
+                {
+                CMceComCodec& codec = *messageCodecs[ i ];
+                if ( codec.iIsNegotiated )
+                    {
+                    if ( newDefaultCodecSet )
+                        {
+                        codec.iIsEnabled = EFalse;
+                        }
+                    else
+                        {
+                        codec.iIsEnabled = ETrue;
+                        newDefaultCodecSet = ETrue;
+                        }
+                    }
+                }
+            }
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComMessageStream::PrepareL()
+    {
+// Data path will not be handled for Message type streams in MCE/MCC
+    //Hence not required to prepare the streams
+    RPointerArray<CMceComMessageCodec>& codecs = Codecs();
+    __ASSERT_ALWAYS ( codecs.Count() > 0, User::Leave( KErrArgument ) );
+
+    if ( BoundStream() )
+        {
+        CMceComMessageStream& boundStream = static_cast<CMceComMessageStream&>( BoundStreamL() );
+        __ASSERT_ALWAYS ( boundStream.Codecs().Count() > 0, User::Leave( KErrArgument ) );
+        }
+
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::MccStreamType
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageStream::MccStreamType() const
+    {
+    
+    // The data path will not be handled in MCC for message type streams
+    TInt type = KMccMessageLocalStream;
+    
+    if ( iStreamType == EReceiveStream || 
+         iStreamType == EReceiveOnlyStream )
+        {
+        type = KMccMessageDownlinkStream;
+        }
+    else if ( iStreamType == ESendStream || 
+              iStreamType == ESendOnlyStream )
+        {
+        type = KMccMessageUplinkStream;
+        }
+    else
+        {
+        type = KMccMessageLocalStream;
+        }
+        
+    return type;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMessageStream::MccStreamType
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMessageStream::MccLinkType() const
+    {
+// The data path will not be handled in MCC for message type streams
+    TInt type = KMccLinkMessage;
+    
+    if ( iStreamType == ELocalStream )
+        {
+        type = KMccLinkLocal;
+        }
+    if (iSession->iClientCryptoSuites.Count()>0)
+        {
+        type =KMccLinkSecure;
+        }
+    return type; 
+    }
+
+#endif//MCE_COMMON_SERVER_SIDE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommsrpcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,185 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcemsrpcodec.h"
+#include "mcecommsrpcodec.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <MmccCodecInformation.h>
+#include "mcesrvstream.h"
+#include "mcesrvsource.h"
+
+#include <MmccCodecInformationFactory.h>
+#include <MmccCodecInformation.h>
+
+//levels two redundancy is default
+_LIT8( KDefaultMsrpFmtp, "a=Message dummy codec" );
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpCodec* CMceComMsrpCodec::NewL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMsrpCodec* self = NewLC( aSdpName );
+    CleanupStack::Pop( self );
+    return self;
+    
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpCodec* CMceComMsrpCodec::NewLC( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMsrpCodec* self = new (ELeave) CMceComMsrpCodec();
+    CleanupStack::PushL( self );
+    self->ConstructL( aSdpName );
+    return self;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::~CMceComMsrpCodec
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpCodec::~CMceComMsrpCodec()
+    {
+    }
+    
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::CMceComMsrpCodec
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpCodec::CMceComMsrpCodec()
+ : CMceComMessageCodec()
+    {
+
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageCodec* CMceComMsrpCodec::CloneL()
+    {
+    CMceComMsrpCodec* copy = new (ELeave) CMceComMsrpCodec();
+    CleanupStack::PushL( copy );
+    copy->ConstructL( *this );
+    CleanupStack::Pop( copy );
+    return copy;
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpCodec::ConstructL( TBuf8<KMceMaxSdpNameLength> aSdpName )
+    {
+    CMceComMessageCodec::ConstructL( aSdpName );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpCodec::ConstructL( CMceComMsrpCodec& aCodec )
+    {
+    CMceComMessageCodec::ConstructL( aCodec );
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::SetBitrate
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMsrpCodec::SetBitrate( TUint /*aBitrate*/ )
+    {
+    return KErrNone;
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::SetAllowedBitrates
+// -----------------------------------------------------------------------------
+//
+TInt CMceComMsrpCodec::SetAllowedBitrates( TUint /*aBitrates*/ )
+    {
+    return KErrNone;	
+    }
+
+// ---------------------------------------------------------
+// CMceComMsrpCodec::GetMaxBitRate
+// ---------------------------------------------------------
+TUint CMceComMsrpCodec::GetMaxBitRate()
+	{
+    return 0;	
+	}
+	
+// ---------------------------------------------------------
+// CMceComMsrpCodec::ResolveAllowedBitrates
+// ---------------------------------------------------------
+//
+TInt CMceComMsrpCodec::ResolveAllowedBitrates( 
+    TUint /*aBitrate*/, TUint& /*aAllowedBitrates*/ )
+    {
+    return KErrNone;
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::DoMccValidateL
+// -----------------------------------------------------------------------------
+//
+CMceComCodec* CMceComMsrpCodec::DoMccValidateL( CMccCodecInformation& /*aMccCodec*/,
+                                               CMceSrvStream& /*aStream*/,
+                                               TMceNegotiationRole /*aRole*/ )
+    {	
+	return NULL;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpCodec::DoSetDefaultFmtpAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpCodec::DoSetDefaultFmtpAttributeL()
+    {
+    SetFmtpAttributeL( KDefaultMsrpFmtp );   
+    }
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommsrpsink.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,334 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecommsrpsink.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+#include "mcemsrpsink.h"
+#include "mceserial.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComAvSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSink* CMceComMsrpSink::NewL()
+    {
+    CMceComMsrpSink* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSink* CMceComMsrpSink::NewLC()
+    {
+    CMceComMsrpSink* self = new (ELeave) CMceComMsrpSink();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::~CMceComMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSink::~CMceComMsrpSink()
+    { 
+    iPath.ResetAndDestroy();
+    delete iFileName;
+    delete iSessInfo;
+    delete iFileType;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::CMceComMsrpSink
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSink::CMceComMsrpSink()
+  :CMceComMediaSink( KMceMSRPSink),
+  iPath(KMceArrayGranularity),
+  iSessInfo(NULL),
+  iAcceptTypes(KMceArrayGranularity),
+  iAcceptWrappedTypes (KMceAcceptWrappedTypes),
+  iWrappedTypes(EFalse),
+  iFileShare(EFalse),
+  iFileName(NULL)
+  
+    {
+    }
+
+void CMceComMsrpSink::ConstructL(CMceComMsrpSink& aSource )
+    { 
+    iPath.ResetAndDestroy();
+    for(int i=0;i<aSource.iPath.Count();i++)
+        {       
+        //TUriParser8 parser;
+        TUriParser8* parser = new (ELeave) TUriParser8;
+        parser->Parse(aSource.iPath[i]->UriDes());
+        CleanupStack::PushL(parser);
+        iPath.AppendL(parser);        
+        CleanupStack::Pop(parser);
+        }
+    if (iSessInfo!=NULL)
+        {
+        delete iSessInfo;
+        iSessInfo = NULL;
+        }
+    if (aSource.iSessInfo!=NULL)
+        {
+        iSessInfo = aSource.iSessInfo->Des().AllocL();
+        }
+    for(int i=0; i<aSource.iAcceptTypes.MdcaCount();i++)
+        {
+        iAcceptTypes.AppendL(aSource.iAcceptTypes.MdcaPoint(i) ); 
+        }
+    iAcceptWrappedTypes = aSource.iAcceptWrappedTypes;
+    iWrappedTypes = aSource.iWrappedTypes;
+    iFileShare = aSource.iFileShare;
+    if (iFileName!=NULL)
+        {
+        delete iFileName;
+        iFileName = NULL;
+        }
+    if (aSource.iFileName!=NULL)
+         {
+         iFileName = aSource.iFileName->Des().AllocL();
+         }
+    iFileSize = aSource.iFileSize;
+    iFileTransferid = aSource.iFileTransferid;
+    iDispositionValue = aSource.iDispositionValue;
+    iSecureConnection = aSource.iSecureConnection;
+    if (iFileType!=NULL)
+        {
+        delete iFileType;
+        iFileType = NULL;
+        }
+    if (aSource.iFileType!=NULL)
+        {
+        iFileType = aSource.iFileType->Des().AllocL();
+        }
+    iFTProgressNotification = aSource.iFTProgressNotification;
+    }
+        
+    
+void CMceComMsrpSink::ConstructL()
+    {
+    iFTProgressNotification = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSink* CMceComMsrpSink::CloneL()
+    {
+    CMceComMsrpSink* copy = CMceComMsrpSink::NewLC();
+    copy->ConstructL(*this);
+    CleanupStack::Pop(copy);
+    return copy;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSink::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSink::InternalizeFlatL( aReadStream );
+    MceSerial::DecodeL(this->iPath, aReadStream);
+    MceSerial::DecodeL(this->iSessInfo, aReadStream);
+    CDesC8Array* array = NULL;
+    MceSerial::DecodeL(array, aReadStream);
+    if (array)
+        {
+        this->iAcceptTypes.Reset();
+        for (TInt i=0;i<array->MdcaCount();i++)
+            {
+            
+            this->iAcceptTypes.AppendL(array->MdcaPoint(i)); 
+            
+            }
+        delete array; // free up the memory
+        }    
+    MceSerial::DecodeL(this->iAcceptWrappedTypes, aReadStream);
+    this->iWrappedTypes = aReadStream.ReadInt8L();
+    this->iFileShare = aReadStream.ReadInt8L();
+    MceSerial::DecodeL(this->iFileName, aReadStream);
+    this->iFileSize = aReadStream.ReadUint32L();
+    MceSerial::DecodeL(this->iFileType, aReadStream);
+    MceSerial::DecodeL(this->iFileTransferid, aReadStream);
+    MceSerial::DecodeL(this->iDispositionValue, aReadStream);
+    this->iSecureConnection = aReadStream.ReadInt8L(); 
+    MceSerial::DecodeL(this->iFilePath, aReadStream);
+    this->iFTProgressNotification = aReadStream.ReadInt8L();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSink::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSink::ExternalizeFlatL( aWriteStream );
+    
+    MceSerial::EncodeL(this->iPath, aWriteStream);
+    MceSerial::EncodeL(this->iSessInfo, aWriteStream);
+    MceSerial::EncodeL(&(this->iAcceptTypes), aWriteStream);
+    MceSerial::EncodeL(this->iAcceptWrappedTypes, aWriteStream);
+    aWriteStream.WriteInt8L(this->iWrappedTypes);
+    aWriteStream.WriteInt8L(this->iFileShare);
+    MceSerial::EncodeL(this->iFileName, aWriteStream);
+    aWriteStream.WriteUint32L(this->iFileSize);
+    MceSerial::EncodeL(this->iFileType, aWriteStream);
+    MceSerial::EncodeL(this->iFileTransferid, aWriteStream);
+    MceSerial::EncodeL(this->iDispositionValue, aWriteStream);
+    aWriteStream.WriteInt8L(this->iSecureConnection);
+    MceSerial::EncodeL(this->iFilePath, aWriteStream);
+    aWriteStream.WriteInt8L(this->iFTProgressNotification);
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::UpdateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSink::UpdateL( CMceComMediaSink& aUpdate )
+    {
+    CMceComMediaSink::UpdateL( aUpdate );
+    CMceComMsrpSink& update = static_cast<CMceComMsrpSink&>( aUpdate );
+    
+    //Set MSRP path member
+    
+    if (update.iPath.Count() > 0)
+        {
+        iPath.ResetAndDestroy();
+        for(int i=0;i<update.iPath.Count();i++)
+            {        
+            TUriParser8* parser = new (ELeave) TUriParser8;
+            CleanupStack::PushL(parser);
+            User::LeaveIfError(parser->Parse(update.iPath[i]->UriDes()) );
+            iPath.AppendL(parser);        
+            CleanupStack::Pop(parser);
+            }
+        }
+    
+    //Set Accept-types member
+    if (update.iAcceptTypes.MdcaCount() > 0)
+        {
+        iAcceptTypes.Reset();
+        for(int i=0; i<update.iAcceptTypes.MdcaCount();i++)
+            {       
+            iAcceptTypes.AppendL(update.iAcceptTypes.MdcaPoint(i));        
+            }    
+        }
+    
+    //Set secureconneciton member
+    if (iSecureConnection != update.iSecureConnection)
+        {
+        iSecureConnection = update.iSecureConnection;
+        }
+
+    if (update.iAcceptWrappedTypes.Size())
+        {
+        iAcceptWrappedTypes = update.iAcceptWrappedTypes;
+        iWrappedTypes = update.iWrappedTypes;
+        }
+    // look for the updaitons for file share attributes
+    this->UpdateFileShareAttrL(update);
+    if (update.iSessInfo != NULL )
+        {
+        delete iSessInfo ;
+        iSessInfo = NULL;
+        iSessInfo =  update.iSessInfo->Des().AllocL() ;
+        }
+    
+    iFTProgressNotification = update.iFTProgressNotification;
+    }
+
+void CMceComMsrpSink::UpdateFileShareAttrL(CMceComMsrpSink& aUpdate )
+	{
+	    //Set FileSharing Attributes
+	if(aUpdate.iFileShare || aUpdate.iFileTransferid.Length() || aUpdate.iDispositionValue.Size() )
+		{
+		iFileShare = aUpdate.iFileShare;
+        if (iFileName!=NULL )
+            {
+            delete iFileName;
+            iFileName = NULL;
+            }
+        iFileName = aUpdate.iFileName->Des().AllocL();
+		iFileSize = aUpdate.iFileSize;
+		if (iFileType!=NULL )
+		    {
+            delete iFileType;
+            iFileType = NULL;
+		    }
+		iFileType = aUpdate.iFileType->Des().AllocL();
+		//iFileType = aUpdate.iFileType;
+		iFileTransferid = aUpdate.iFileTransferid;
+		iDispositionValue = aUpdate.iDispositionValue;
+		}
+	}
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::UseRTCP
+// -----------------------------------------------------------------------------
+//
+TBool CMceComMsrpSink::UseRTCP()
+    {
+    return EFalse;
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::MccType
+// -----------------------------------------------------------------------------
+//
+const TUid CMceComMsrpSink::MccType()
+    {
+    return KUidMccMsrpSink;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSink::PrepareL()
+    {
+    //NOP  // Not required as the data path for message stream will be handled by applications
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmceshared/src/mcecommsrpsource.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,353 @@
+/*
+* 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:    
+*
+*/
+
+
+
+
+#include "mcecommsrpsource.h"
+#include "mcecommediastream.h"
+#include "mcecomsession.h"
+#include "mcemsrpsource.h"
+#include "e32const.h"
+#include <e32std.h>
+#include "mceserial.h"
+#include "mceclilogs.h"
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+#include <mmccInterface.h>
+#include "mcesdpsession.h"
+#include "mcemediamanager.h"
+#include "mcesrvlogs.h"
+
+
+#endif//MCE_COMMON_SERVER_SIDE
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+
+// -----------------------------------------------------------------------------
+// CMceComAvSink::NewL
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSource* CMceComMsrpSource::NewL()
+    {
+    CMceComMsrpSource* self = NewLC();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::NewLC
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSource* CMceComMsrpSource::NewLC()
+    {
+    CMceComMsrpSource* self = new (ELeave) CMceComMsrpSource();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::~CMceComMsrpSource
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSource::~CMceComMsrpSource()
+    { 
+    iPath.ResetAndDestroy();
+    delete iFileName;
+    delete iSessInfo;
+    delete iFileType;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::CMceComMsrpSource
+// -----------------------------------------------------------------------------
+//
+CMceComMsrpSource::CMceComMsrpSource()
+  :CMceComMediaSource( KMceMSRPSource ),
+  iPath(KMceArrayGranularity),
+  iSessInfo(NULL),
+  iAcceptTypes(KMceArrayGranularity),
+  iAcceptWrappedTypes (KMceAcceptWrappedTypes),
+  iWrappedTypes(EFalse),
+  iFileShare(EFalse),
+  iFileName(NULL)
+    {
+    }
+
+void CMceComMsrpSource::ConstructL(CMceComMsrpSource& aSource )
+    {    
+    iPath.ResetAndDestroy();
+    for(int i=0;i<aSource.iPath.Count();i++)
+        {       
+        TUriParser8* parser = new (ELeave) TUriParser8;
+        parser->Parse(aSource.iPath[i]->UriDes());
+         CleanupStack::PushL(parser);
+         iPath.AppendL(parser);
+         CleanupStack::Pop(parser);
+          }
+   
+    if (iSessInfo !=NULL)
+        {
+        delete iSessInfo;
+        iSessInfo = NULL;
+        }
+    if (aSource.iSessInfo!=NULL)
+        {
+        iSessInfo = aSource.iSessInfo->Des().AllocL();
+        }
+        
+    iAcceptTypes.Reset();  
+    for(int i=0; i<aSource.iAcceptTypes.MdcaCount();i++)
+        {
+        iAcceptTypes.AppendL(aSource.iAcceptTypes.MdcaPoint(i) ); 
+        }
+     iAcceptWrappedTypes = aSource.iAcceptWrappedTypes;
+     iWrappedTypes = aSource.iWrappedTypes;
+     iFileShare = aSource.iFileShare;
+     
+     if (iFileName!=NULL)
+         {
+         delete iFileName;
+         iFileName = NULL;
+         }
+     if (aSource.iFileName!=NULL)
+         {
+         iFileName = aSource.iFileName->Des().AllocL();
+         }
+     iFileSize = aSource.iFileSize;
+     iFileTransferid = aSource.iFileTransferid;
+     iDispositionValue = aSource.iDispositionValue;
+     iSecureConnection = aSource.iSecureConnection;
+     if (iFileType!=NULL)
+         {
+         delete iFileType;
+         iFileType = NULL;
+         }
+     if (aSource.iFileType!=NULL)
+         {
+         iFileType = aSource.iFileType->Des().AllocL();
+         }
+     iFTProgressNotification = aSource.iFTProgressNotification;
+    }
+        
+    
+void CMceComMsrpSource::ConstructL()
+    {
+    iFTProgressNotification = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::CloneL
+// -----------------------------------------------------------------------------
+//
+CMceComMediaSource* CMceComMsrpSource::CloneL()
+    {
+    CMceComMsrpSource* copy = CMceComMsrpSource::NewLC();
+    copy->ConstructL(*this);
+    CleanupStack::Pop(copy);
+    return copy;        
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::InternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSource::InternalizeFlatL( RReadStream& aReadStream )
+    {
+    CMceComMediaSource::InternalizeFlatL( aReadStream );
+    MceSerial::DecodeL(this->iPath, aReadStream);
+    MceSerial::DecodeL(this->iSessInfo, aReadStream);
+    CDesC8Array* array = NULL;
+    MceSerial::DecodeL(array, aReadStream);
+    if (array)
+        {
+        this->iAcceptTypes.Reset();
+        for (TInt i=0;i<array->MdcaCount();i++)
+            {
+            this->iAcceptTypes.AppendL(array->MdcaPoint(i)); 
+            }
+            delete array; // free up the memory
+            }    
+    MceSerial::DecodeL(this->iAcceptWrappedTypes, aReadStream);
+    this->iWrappedTypes = aReadStream.ReadInt8L();
+    
+#ifdef MCE_COMMON_SERVER_SIDE
+    MCESRV_DEBUG_SVALUE( "CMceComMsrpSource::InternalizeFlatL: accept-wrapped-types:",  this->iAcceptWrappedTypes)
+    MCESRV_DEBUG_DVALUE("CMceComMsrpSource::InternalizeFlatL: wrappedTypes", this->iWrappedTypes)
+    
+#else
+    MCECLI_DEBUG_DVALUE("CMceComMsrpSource::InternalizeFlatL: wrappedTypes value", this->iWrappedTypes)
+    MCECLI_DEBUG_SVALUE("CMceComMsrpSource::InternalizeFlatL: AcceptWrappedTypes", this->iAcceptWrappedTypes) 
+    
+#endif
+    this->iFileShare = aReadStream.ReadInt8L();
+    MceSerial::DecodeL(this->iFileName, aReadStream);
+    this->iFileSize = aReadStream.ReadUint32L();
+    MceSerial::DecodeL(this->iFileType, aReadStream);
+    MceSerial::DecodeL(this->iFileTransferid, aReadStream);
+    MceSerial::DecodeL(this->iDispositionValue, aReadStream);
+    this->iSecureConnection = aReadStream.ReadInt8L();  
+    MceSerial::DecodeL(this->iFilePath, aReadStream);
+    this->iFTProgressNotification = aReadStream.ReadInt8L();
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::ExternalizeFlatL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSource::ExternalizeFlatL( RWriteStream& aWriteStream )
+    {
+    CMceComMediaSource::ExternalizeFlatL( aWriteStream );
+    MceSerial::EncodeL(this->iPath, aWriteStream);
+    MceSerial::EncodeL(this->iSessInfo, aWriteStream);
+    MceSerial::EncodeL(&(this->iAcceptTypes), aWriteStream);
+    MceSerial::EncodeL(this->iAcceptWrappedTypes, aWriteStream);
+    aWriteStream.WriteInt8L(this->iWrappedTypes);
+    aWriteStream.WriteInt8L(this->iFileShare);
+    MceSerial::EncodeL(this->iFileName, aWriteStream);
+    aWriteStream.WriteUint32L(this->iFileSize);
+    MceSerial::EncodeL(this->iFileType, aWriteStream);
+    MceSerial::EncodeL(this->iFileTransferid, aWriteStream);
+    MceSerial::EncodeL(this->iDispositionValue, aWriteStream);
+    aWriteStream.WriteInt8L(this->iSecureConnection);
+    MceSerial::EncodeL(this->iFilePath, aWriteStream);
+    aWriteStream.WriteInt8L(this->iFTProgressNotification);
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSink::UpdateL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSource::UpdateL( CMceComMediaSource& aUpdate )
+    {
+    CMceComMediaSource::UpdateL( aUpdate );
+    CMceComMsrpSource& update = static_cast<CMceComMsrpSource&>( aUpdate );
+    
+    //Set MSRP path member
+    
+    if (update.iPath.Count() > 0)
+        {
+        iPath.ResetAndDestroy();
+        for(int i=0;i<update.iPath.Count();i++)
+            {        
+            TUriParser8* parser = new (ELeave) TUriParser8;
+            CleanupStack::PushL(parser);
+            User::LeaveIfError(parser->Parse(update.iPath[i]->UriDes()) );
+            iPath.AppendL(parser);        
+            CleanupStack::Pop(parser);
+            }
+        }
+        
+    //Set Accept-types member
+    if (update.iAcceptTypes.MdcaCount() > 0)
+        {
+        iAcceptTypes.Reset();
+        for(int i=0; i<update.iAcceptTypes.MdcaCount();i++)
+            {       
+            iAcceptTypes.AppendL(update.iAcceptTypes.MdcaPoint(i));        
+            }    
+        }
+        
+    //Set secureconneciton member
+    if (iSecureConnection != update.iSecureConnection)
+        {
+        iSecureConnection = update.iSecureConnection;
+        }
+    
+    if (update.iAcceptWrappedTypes.Size())
+        {
+        iAcceptWrappedTypes = update.iAcceptWrappedTypes;
+        iWrappedTypes = update.iWrappedTypes;
+        }
+    // look for the updaitons for file share attributes
+    UpdateFileShareAttrL(update);
+    if (update.iSessInfo != NULL )
+        {
+        if (iSessInfo!=NULL)
+            {
+            delete iSessInfo;
+            iSessInfo = NULL;
+            }
+        iSessInfo =  update.iSessInfo->Des().AllocL() ;
+        }
+    
+    iFTProgressNotification = update.iFTProgressNotification;
+    }
+
+void CMceComMsrpSource::UpdateFileShareAttrL(CMceComMsrpSource& aUpdate )
+    {
+    //Set FileSharing Attributes
+    if(aUpdate.iFileShare || aUpdate.iFileTransferid.Length() || aUpdate.iDispositionValue.Size() )
+        {
+        iFileShare = aUpdate.iFileShare;
+        if (iFileName!=NULL )
+            {
+            delete iFileName;
+            iFileName = NULL;
+            }
+    
+        iFileName = aUpdate.iFileName->Des().AllocL();
+        iFileSize = aUpdate.iFileSize;
+        if (iFileType!=NULL )
+            {
+            delete iFileType;
+            iFileType = NULL;
+            }
+            
+        iFileType = aUpdate.iFileType->Des().AllocL();
+        iFileTransferid = aUpdate.iFileTransferid;
+        iDispositionValue = aUpdate.iDispositionValue;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::UseRTCP
+// -----------------------------------------------------------------------------
+//
+TBool CMceComMsrpSource::UseRTCP()
+    {
+    return EFalse;
+    }
+
+#ifdef MCE_COMMON_SERVER_SIDE
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::MccType
+// -----------------------------------------------------------------------------
+//
+const TUid CMceComMsrpSource::MccType()
+    {
+    return KUidMccMsrpSource;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceComMsrpSource::PrepareL
+// -----------------------------------------------------------------------------
+//
+void CMceComMsrpSource::PrepareL()
+    {
+    //NOP  // Not required as the data path for message stream will be handled by applications
+    }
+   
+#endif//MCE_COMMON_SERVER_SIDE
+
--- a/multimediacommsengine/mmceshared/src/mcecomsession.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomsession.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -465,6 +465,8 @@
    	iServiceType = aReadStream.ReadUint32L();
    	iSipContactAddrSecure = 
    		static_cast<CMceSession::TControlPathSecurityLevel>( aReadStream.ReadUint8L() );
+   	MceSerial::DecodeL(iLocalIpAddress, aReadStream);
+   	MceSerial::DecodeL(iRemoteIpAddress, aReadStream);
     }
 
 
@@ -494,6 +496,8 @@
     MceSerial::EncodeL(iClientCryptoSuites, aWriteStream);
     aWriteStream.WriteUint32L( iServiceType );
     aWriteStream.WriteUint8L( iSipContactAddrSecure );
+    MceSerial::EncodeL(iLocalIpAddress, aWriteStream);
+    MceSerial::EncodeL(iRemoteIpAddress, aWriteStream);
     }
 
 
@@ -726,6 +730,10 @@
     	}
     iServiceType = aSession.iServiceType;
     iSipContactAddrSecure = aSession.iSipContactAddrSecure;
+    
+    iRemoteIpAddress = aSession.iRemoteIpAddress;
+    
+    iLocalIpAddress = aSession.iLocalIpAddress;
     }
 
 // ---------------------------------------------------------
--- a/multimediacommsengine/mmceshared/src/mcecomvideocodec.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mcecomvideocodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -450,6 +450,24 @@
     
     }
     
+
+// -----------------------------------------------------------------------------
+// CMceComAudioCodec::DoMccRequireSignalling
+// -----------------------------------------------------------------------------
+//
+TInt CMceComVideoCodec::DoMccRequireSignalling( 
+    const CMceSrvStream& /*aOldStream*/,
+    const CMceSrvStream& /*aCurrentStream*/,
+    const CMccCodecInformation& /*aMccCurentCodec*/, 
+    const CMccCodecInformation& /*aMccUpdateCodec*/ ) const
+    {
+    TInt action = KMceNoSignalling;
+        
+    return action;
+    
+    }
+    
+
 // -----------------------------------------------------------------------------
 // CMceComVideoCodec::DoMccAdjustL
 // -----------------------------------------------------------------------------
--- a/multimediacommsengine/mmceshared/src/mceserial.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmceshared/src/mceserial.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -61,6 +61,19 @@
 // MceSerial::EncodeL
 // -----------------------------------------------------------------------------
 //
+void MceSerial::EncodeL( const TDesC16& aString, RWriteStream& aWriteStream )
+    {
+    aWriteStream.WriteUint32L( aString.Length() );
+    if ( aString.Length() > 0 )
+        {
+        aWriteStream.WriteL( aString );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// MceSerial::EncodeL
+// -----------------------------------------------------------------------------
+//
 void MceSerial::EncodeL( HBufC8* aString, RWriteStream& aWriteStream )
     {
     if ( aString )
@@ -74,6 +87,49 @@
     }
 
 // -----------------------------------------------------------------------------
+// MceSerial::EncodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::EncodeL( HBufC16* aString, RWriteStream& aWriteStream )
+    {
+    if ( aString )
+        {
+        EncodeL( *aString, aWriteStream );
+        }
+    else
+        {
+        EncodeL( KNullDesC, aWriteStream );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// MceSerial::DecodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::DecodeL( HBufC16*& aBuffer, RReadStream& aReadStream )
+    {
+   delete aBuffer;
+   aBuffer = NULL;
+       
+   TUint32 len = aReadStream.ReadUint32L();
+   
+    if ( len > 0 )
+        {
+        HBufC16* tmpBuffer = HBufC16::NewLC ( len );
+        TPtr16 bufPtr = tmpBuffer->Des();
+        aReadStream.ReadL( bufPtr, len );
+        CleanupStack::Pop( tmpBuffer );
+        aBuffer = tmpBuffer;
+        }
+    else
+        {
+        aBuffer = KNullDesC().AllocL();
+        }           
+    }
+
+
+// -----------------------------------------------------------------------------
 // MceSerial::DecodeL
 // -----------------------------------------------------------------------------
 //
@@ -104,9 +160,13 @@
 //
 void MceSerial::DecodeL( CDesC8Array*& aArray, RReadStream& aReadStream )
     {
-    delete aArray;
-    aArray = NULL;
-    
+    if (aArray!=NULL )
+        {
+        aArray->Reset();
+        delete aArray;
+        aArray = NULL;
+        }
+        
     TInt count = aReadStream.ReadUint32L();
 	CDesC8ArrayFlat* tmpArray = new (ELeave) CDesC8ArrayFlat( KMceArrayGranularity );
 	CleanupStack::PushL( tmpArray );
@@ -175,6 +235,86 @@
     	}
     }
 
+
+// -----------------------------------------------------------------------------
+// MceSerial::EncodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::EncodeL( RPointerArray<TUriC8>& aArray,
+                         RWriteStream& aWriteStream )
+    {
+    TInt count = aArray.Count();
+    aWriteStream.WriteUint32L( count );
+    for (int i=0; i<count; i++)
+        {
+        TInt length = aArray[i]->UriDes().Length();
+        aWriteStream.WriteUint32L(length);
+        aWriteStream.WriteL(aArray[i]->UriDes());
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// MceSerial::EncodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::EncodeL(TInetAddr& aAddr, RWriteStream& aWriteStream)
+    {
+    TBuf16<60> buf16; 
+    aAddr.Output(buf16);
+    TBuf8<60> buf8;
+    buf8.Copy(buf16);
+    MceSerial::EncodeL(buf8, aWriteStream);
+    }
+
+
+// -----------------------------------------------------------------------------
+// MceSerial::DecodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::DecodeL(TInetAddr& aAddr, RReadStream& aReadStream)
+    {
+    TBuf8<100>  buf8; 
+    MceSerial::DecodeL(buf8, aReadStream);
+    TBuf16<100> buf16;
+    buf16.Copy(buf8);
+    aAddr.Input(buf16);
+    }
+
+// -----------------------------------------------------------------------------
+// MceSerial::DecodeL
+// -----------------------------------------------------------------------------
+//
+void MceSerial::DecodeL( RPointerArray<TUriC8>& aArray,
+        RReadStream& aReadStream )
+    {
+    aArray.ResetAndDestroy();
+    TInt count = aReadStream.ReadUint32L();
+    for (int i=0; i<count; i++)
+        {
+        TInt length = aReadStream.ReadUint32L();
+#if 0      
+        iPath.Zero();
+        aReadStream.ReadL(iPath, length);
+        
+        TUriParser8* parser = new (ELeave) TUriParser8;        
+        User::LeaveIfError(parser->Parse(iPath) );
+        aArray.AppendL( parser);
+#endif  
+        HBufC8* item = HBufC8::NewLC( length );
+        TPtr8 ptr(item->Des());
+        aReadStream.ReadL( ptr , length );        
+
+        TUriParser8* parser = new (ELeave) TUriParser8;        
+        User::LeaveIfError(parser->Parse(ptr) );
+        CleanupStack::Pop(item);        
+        CleanupStack::PushL(parser);
+        aArray.AppendL( parser);
+        CleanupStack::Pop(parser);
+
+        }
+    }
+
 // -----------------------------------------------------------------------------
 // MceSerial::DecodeL
 // -----------------------------------------------------------------------------
--- a/multimediacommsengine/mmcesrv/group/mceserver.mmp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/group/mceserver.mmp	Mon Sep 06 17:32:13 2010 +0530
@@ -148,6 +148,15 @@
 SOURCE          mceserial.cpp
 SOURCE          mceevents.cpp
 SOURCE          mcecomserializationcontext.cpp
+SOURCE			mcecomexternalsink.cpp
+SOURCE			mcecomexternalsource.cpp
+SOURCE			mcecommessagestream.cpp
+SOURCE			mcecommsrpsource.cpp
+SOURCE			mcecommsrpsink.cpp
+SOURCE			mcecommessagesource.cpp
+SOURCE			mcecommessagesink.cpp
+SOURCE			mcecommsrpcodec.cpp
+SOURCE			mcecommessagecodec.cpp
  
 
 SOURCEPATH      ../mmcemediamanager/src
@@ -158,6 +167,7 @@
 SOURCE          mcemediasdpcodec.cpp
 SOURCE          mceaudiosdpcodec.cpp
 SOURCE          mcevideosdpcodec.cpp
+SOURCE          mcemessagesdpcodec.cpp
 SOURCE          mcesrvstream.cpp
 SOURCE          mceadoptedsrvstream.cpp
 SOURCE          mcesrvendpoint.cpp
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediadefs.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediadefs.h	Mon Sep 06 17:32:13 2010 +0530
@@ -47,10 +47,14 @@
     static_cast<CMceComAudioStream&>( stream )
 #define MCE_VIDEO( stream )\
     static_cast<CMceComVideoStream&>( stream )
+#define MCE_MESSAGE(stream)\
+    static_cast<CMceComMessageStream&>(stream)
 
 #define MCE_DEFINE_DECSTR( attr, value )\
     TBuf8<KMceSdpNumericAttributeLength> attr;\
     attr.Num( value, EDecimal );
+#define MCE_DEFINE_MESSAGE(stream, mediastream)\
+    CMceComMessageStream& stream = MCE_MESSAGE(mediastream)
 #define MCE_DEFINE_AUDIO( stream, mediaStream )\
     CMceComAudioStream& stream = MCE_AUDIO( mediaStream )
 #define MCE_DEFINE_AUDIO_CODEC( codec, aCodec )\
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediamanager.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediamanager.h	Mon Sep 06 17:32:13 2010 +0530
@@ -780,6 +780,8 @@
         void StopMccStream( CMceSrvStream& aStream );
     
         void SetRemoteAddressL( CMceSrvStream& aStream );
+        
+        void SetRemoteMsrpPathL( CMceSrvStream& aStream );
 
         void PrepareUpdateL( CMceSdpSession& aSession );
 
@@ -941,7 +943,8 @@
         RPointerArray<CMceSdpCodec> iSdpCodecs;
         
         RPointerArray<CMceComFileSource> iTranscodeSessions;
-
+        
+        TBool iMsrpSessionCreated;
         
 
     private:
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediasdpcodec.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediasdpcodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -224,6 +224,43 @@
         */
         virtual TMceSipWarningCode ValidateSdpL( CSdpMediaField& aMediaLine,
                                                 CSdpDocument& aSdpDocument );
+        
+        /**
+        * Creates fmtlist that can be used as media field fmt list -attribute
+        * @param aCodecs codecs
+        * @return fmtp list
+        */
+        virtual HBufC8* CreateFormatListL( CMceComCodec::TIterator& aCodecs ) const;
+        
+        /**
+         * Decodes static payloads if payload wasn't defined as rtpmap
+         * @param aMediaLine Media line
+         * @param aStream stream
+         * @param aPayloadTypes payload types as an array
+         * @param aRole role of negotiation
+         * @return number of lines decoded
+         */
+        virtual TInt DecodeStaticPayloadsL( CSdpMediaField& aMediaLine,
+                        CMceComMediaStream& aStream,
+                        RArray<TUint>& aPayloadTypes, 
+                        TMceNegotiationRole aRole ) const;
+        
+        /**
+         * Decodes media line's format list to payload type array
+         * @param aMediaLine Media line
+         * @param aPayloadTypes payload types as an array
+         */
+        virtual void DecodeFormatListL( CSdpMediaField& aMedia, 
+                        RArray<TUint>& aPayloadTypes ) const;
+        
+        /**
+        * Decodes media line's format list to payload type array
+        * @param aMediaLine Media line
+        * @param aPayloadTypes payload types as an array
+        * @return  system wide error
+        */
+        virtual TInt DecodeFormatList( CSdpMediaField& aMedia, 
+                               RArray<TUint>& aPayloadTypes ) const;
 
         /**
         * Gets the type of session ( sendrecv, sendonly or receiveonly )
@@ -293,18 +330,7 @@
         TInt DecodeRtpmapLinesL( CSdpMediaField& aMediaLine,
                                  CMceComMediaStream& aStream ) const;
 
-        /**
-        * Decodes static payloads if payload wasn't defined as rtpmap
-        * @param aMediaLine Media line
-        * @param aStream stream
-        * @param aPayloadTypes payload types as an array
-        * @param aRole role of negotiation
-        * @return number of lines decoded
-        */
-        TInt DecodeStaticPayloadsL( CSdpMediaField& aMediaLine,
-                                    CMceComMediaStream& aStream,
-                                    RArray<TUint>& aPayloadTypes, 
-                                    TMceNegotiationRole aRole ) const;
+
 
         /**
         * Decodes rtpmap line. 
@@ -318,6 +344,17 @@
                                          CSdpMediaField& aMediaLine,
                                          CMceComMediaStream& aStream,
                                          const TDesC8& aFmtpValue = KNullDesC8 ) const;
+        
+        /**
+        * Decodes rtpmap line. 
+        * @param aRtpMaptLine rtpmap line
+        * @param aMediaLine media line
+        * @param aStream stream
+        * @param aFmtpValue
+        * @return decoded codec if codec was supported
+        */
+        CMceComCodec* DecodeRtpmapLineL( CSdpMediaField& aMediaLine,
+                                         CMceComMediaStream& aStream ) const;
  
         /**
         * Decodes fmtp lines. 
@@ -391,14 +428,6 @@
                                               CMceComMediaStream& aStream,
                                               CSdpDocument& aSdpDocument) const;
 
-        /**
-        * Creates fmtlist that can be used as media field fmt list -attribute
-        * @param aCodecs codecs
-        * @return fmtp list
-        */
-        HBufC8* CreateFormatListL( CMceComCodec::TIterator& aCodecs ) const;
-        
-        
        /**
         * decodes the remote RTCP port according to RFC 3605
         * @param aMediaLine Media line
@@ -428,28 +457,11 @@
         * @param aMediaLine Media line
         * @param aStream media stream
         */
-        void DecodeClientAttributesL( CSdpMediaField& aMediaLine, 
+        void virtual DecodeClientAttributesL( CSdpMediaField& aMediaLine, 
                                       CMceComMediaStream& aStream ) const;  
                               
         
         /**
-        * Decodes media line's format list to payload type array
-        * @param aMediaLine Media line
-        * @param aPayloadTypes payload types as an array
-        */
-        void DecodeFormatListL( CSdpMediaField& aMedia, 
-                                RArray<TUint>& aPayloadTypes ) const;
-
-        /**
-        * Decodes media line's format list to payload type array
-        * @param aMediaLine Media line
-        * @param aPayloadTypes payload types as an array
-        * @return  system wide error
-        */
-        TInt DecodeFormatList( CSdpMediaField& aMedia, 
-                               RArray<TUint>& aPayloadTypes ) const;
-                             
-        /**
         * Finds codec based on payload type
         * @param aPayloadType payload
         * @param aStream stream containig codecs
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemessagesdpcodec.h	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,298 @@
+/*
+* 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:   
+*
+*/
+
+
+
+
+#ifndef CMCEMESSAGESDPCODEC_H
+#define CMCEMESSAGESDPCODEC_H
+
+#include "mcemediasdpcodec.h"
+#include "mcecommediastream.h"
+#include "mcecommsrpsource.h"
+#include "mcecommsrpsink.h"
+#include <sdpmediafield.h>
+
+class CMceComMessageStream;
+//class CMceComAudioCodec;
+
+
+#define MCE_SDP_STRING_MESSAGEL()\
+        SdpCodecStringPool::StringPoolL().OpenFStringL(KMceMediaMessage)
+
+struct TParsedHeader
+    {
+    TBuf8<256> iNameValue;
+    TBuf8<50> iTypeValue;
+    TPtrC8 iHash;
+    TInt64  iSize;
+    TBuf8<32> iFileTransferId;
+    };
+
+/**
+ * 
+ *
+ * @lib 
+ */
+class CMceMessageSdpCodec: public CMceMediaSdpCodec
+    {
+
+    public://constructor and destructor
+    
+        /**
+        * Constructor
+        */
+        static CMceMessageSdpCodec* NewL();
+        
+        /**
+        * Destructor
+        */
+        ~CMceMessageSdpCodec();
+        
+
+    public: //from CMceSdpCodec
+        
+        /**
+        * Returns ETrue, if media is encoded by this codec
+        * @return ETrue, if media is encoded by this codec
+        */
+        TBool Encodes( const CMceComMediaStream& aStream ) const;
+        
+        
+    public: //from CMceMediaSdpCodec
+    
+
+        /**
+        * Returns codecs
+        * @param aStream media stream
+        * @param return codecs
+        * @leave if stream type does not macth codecs
+        */
+        const RPointerArray<CMceComCodec>& CodecsL( CMceComMediaStream& aStream ) const;
+
+        /**
+        * Encodes rtpmap -attribute
+        * @param aCodec codec encoded to rtpmap
+        * @leave system wide error
+        */
+        CSdpFmtAttributeField* EncodeRtpmapAttributeLC( CMceComCodec& aCodec ) const;
+        
+        /**
+        * Encodes media related attributes
+        * @param aCodec the codec
+        * @param aMediaLine media line
+        * @param aRtpmap rtpmap attribute
+        * @leave system wide error
+        */
+        void EncodeMediaAttributesL( CMceComCodec& aCodec, 
+                                     CSdpMediaField& aMediaLine, 
+                                     CSdpFmtAttributeField& aRtpmap ) const;
+        
+        /**
+        * Encodes message media related attributes
+        * @param aStream for media stream
+        * @param aMediaLine media line        
+        * @leave system wide error
+        */
+        void EncodeMessageMediaAttributesL( CMceComMessageStream& aStream, 
+                CSdpMediaField& aMediaLine);
+
+        /**
+        * Decodes media related attributes
+        * @param aMediaLine media line
+        * @param aCodec the codec
+        * @leave system wide error
+        */
+       	void DecodeMediaAttributesL( CSdpMediaField& aMediaLine, 
+                                     CMceComCodec& aCodec,
+                                     CSdpFmtAttributeField& aRtpmap ) const;
+
+        /**
+        * Creates media stream based on sdp type
+        * @param aType the sdp type sendrecv, sendonly or receive only
+        * @return media stream
+        * @leave system wide error
+        */
+        CMceComMediaStream* CreateStreamLC( TInt aType ) const;
+        
+        /**
+        * Updates media based on received offer
+        * @param aStream media stream
+        * @param aDirection the direction 
+        * @leave system wide error
+        */
+        void UpdateStreamL( CMceComMediaStream& aStream, TInt aDirection ) const;
+        
+        /**
+        * Creates codec based on rtpmap line
+        * @param aRtpmap rtpmap line
+        * @return codec or NULL, if not supported
+        * @leave system wide error
+        */
+        CMceComCodec* CreateCodecLC( CSdpFmtAttributeField& aRtpmap ) const;
+        
+        /**
+        * Creates codec based on payload type
+        * @param aPayload payload
+        * @param aMediaLine media line
+        * @return codec or NULL, if not supported
+        * @leave system wide error
+        */
+        CMceComCodec* CreateCodecLC( TUint aPayload, CSdpMediaField& aMediaLine ) const;
+        
+        /**
+        * Decodes session level media attributes
+        * @param aStream media stream
+        * @param aSdpDocument sdp document
+        * @return codec or NULL, if not supported
+        * @leave system wide error
+        */
+        void DecodeSessionMediaAttributesL( CMceComMediaStream& aStream, 
+                                            CSdpDocument& aSdpDocument ) const;
+        
+        
+         
+    private:
+                                 
+
+        /**
+        * C++ Constructor
+        * @param aMedia media
+        */
+        CMceMessageSdpCodec( RStringF aMedia );
+
+        /**
+        * Creates uplink audio stream with mic and rtp sink
+        * @return uplink audio stream
+        */
+        CMceComMessageStream* CreateUplinkStreamL() const;
+        
+        /**
+        * Creates downlink audio stream with rtp source and speaker
+        * @return downlink audio stream
+        */
+        CMceComMessageStream* CreateDownlinkStreamL() const;
+        
+        /**
+         * Creates fmtlist that can be used as media field fmt list -attribute
+         * @param aCodecs codecs
+         * @return fmtp list
+         */
+        HBufC8* CreateFormatListL( CMceComCodec::TIterator& aCodecs ) const;
+        
+        /**
+         * Decodes media line's format list to payload type array
+         * @param aMediaLine Media line
+         * @param aPayloadTypes payload types as an array
+         */
+        void DecodeFormatListL( CSdpMediaField& aMedia, 
+                        RArray<TUint>& aPayloadTypes ) const;
+        
+        /**
+        * Decodes media line's format list to payload type array
+        * @param aMediaLine Media line
+        * @param aPayloadTypes payload types as an array
+        * @return  system wide error
+        */
+        TInt DecodeFormatList( CSdpMediaField& aMedia, 
+                               RArray<TUint>& aPayloadTypes ) const;
+        
+        /**
+         * Decodes static payloads if payload wasn't defined as rtpmap
+         * @param aMediaLine Media line
+         * @param aStream stream
+         * @param aPayloadTypes payload types as an array
+         * @param aRole role of negotiation
+         * @return number of lines decoded
+         */
+        TInt DecodeStaticPayloadsL( CSdpMediaField& aMediaLine,
+                CMceComMediaStream& aStream,
+                RArray<TUint>& aPayloadTypes,
+                TMceNegotiationRole aRole ) const;
+        
+        /**
+         * If the path attribute is set for the message streams then this funtion
+         * extracts the host and port informaiotn and sets accordinlgy to the 
+         * media stream
+         */
+        void SetHostAddrFromPathAttrL(const TUriC8& aMsrpUri, 
+                CSdpMediaField& aMediaLine);
+        
+        /**
+         * Set MSRP path SDP attribute  to the media line
+         */
+        void SetPathAttributeL(CMceComMessageStream& aMsgStream, 
+                CMceComMsrpSource* msrpSource, 
+                CMceComMsrpSink* msrpSink,
+                CSdpMediaField& aMediaLine);
+        
+        /**
+         * Set MSRP SDP AcceptTypes attribte to the media line 
+         */
+        void SetAcceptTypesAttributeL(CMceComMsrpSource* msrpSource, CMceComMsrpSink* msrpSink, 
+                     CSdpMediaField& aMediaLine);
+        
+        /**
+         * Set MSRP SDP AcceptWrappedTypes attribte to the media line
+         */
+        void SetAcceptWrappedAttributeL(CMceComMsrpSource* msrpSource, CMceComMsrpSink* msrpSink,
+                     CSdpMediaField& aMediaLine);
+        
+        /*
+         * Set file share attribure
+         */
+        void SetFileShareAttributeL(CMceComMsrpSource* msrpSource, CMceComMsrpSink* msrpSink,
+                     CSdpMediaField& aMediaLine);
+        
+        /*
+         * Parsing remotesdplines
+         */
+        TInt ParseSomeHeader(const TDesC8& aHeaderToParse, TParsedHeader& aParsedHeader) const;
+        
+        /**
+         * Creates File-Selector attributes and appends it to media line
+         * 
+         */
+        
+        void EncodeFileAttributeL( CMceComMediaStream& aStream,
+                                   CSdpMediaField& aMediaLine ) const;
+        
+        /**
+         * Sets the MSRP connection usage for the MSRP based m-lines
+         */
+        void SetConnectionAttributeL(CMceComMessageStream& aStream,
+                CSdpMediaField& aMediaLine);
+        
+        void DecodeClientAttributesL( CSdpMediaField& aMediaLine, 
+                                      CMceComMediaStream& aStream ) const; 
+        
+    private:        
+        RStringF iFileSelectorStr;
+        RStringF iFileTransferidStr;    
+        RStringF iFileDispositionStr;
+        RStringF iAcceptWrappedTypesStr;
+        RStringF iPathStr;
+        RStringF iAcceptTypesStr;
+        RStringF iNetType;
+        RStringF iAddressType;
+        RStringF iConnectionStr;
+    };
+
+
+
+#endif //CMceMessageSdpCodec_H
+
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesdpsession.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesdpsession.h	Mon Sep 06 17:32:13 2010 +0530
@@ -299,7 +299,7 @@
         
         void PrepareForAnswerEncodeL( CSdpMediaField& aMediaLine );
         
-        CSdpMediaField* CreateMediaLineLC( CMceComMediaStream& aStream ) const;
+        CSdpMediaField* CreateMediaLineLC( CMceComMediaStream& aStream );
         
         TBool MediaLineLC( CSdpMediaField*& aMediaLine, 
                            CMceSdpCodec*& sdpCodec,
@@ -352,6 +352,9 @@
         * C++ default constructor
         */
         CMceSdpSession( CMceComSession& aSession, CMceMediaManager& aManager );  
+        
+        RStringF iProtocol;
+        RStringF iProtocolTls;
     
     public:    // Owned Data
 
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesrvstream.h	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcesrvstream.h	Mon Sep 06 17:32:13 2010 +0530
@@ -43,6 +43,7 @@
 class CMccInterface;
 class CMceDtmfHandler;
 class CMceSrvEndpoint;
+class CMceComMessageStream;
 
 
 const TBool KMceSrvStreamCallback = ETrue;
@@ -208,6 +209,21 @@
     */
     virtual TBool IsAdopted() const;
     
+    
+    virtual void SetMsrpPath( TDesC8& aLocalMsrpPath );
+    
+    /**
+    * Gets link id
+    * @return link id
+    */
+    virtual TDes8& RemMsrpPath() const;
+    
+    /**
+    * Gets link id
+    * @return link id
+    */
+    virtual TDes8& ConnStatus() const;
+    
 public: // Data access etc
 
     /**
@@ -424,6 +440,10 @@
     static void DecodeVideoL( RPointerArray<CMceSrvStream>& aStreams,
                               CMceComVideoStream& aVideo,
                               CMceMediaManager& aManager );
+							  
+    static void DecodeMessageL( RPointerArray<CMceSrvStream>& aStreams,
+            CMceComMessageStream& aMessage,
+            CMceMediaManager& aManager );
                               
     TBool UseDefaultStartupSequence();
     
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediaidle.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediaidle.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -24,6 +24,7 @@
 #include "mcecomsession.h"
 #include "mcesdpsession.h"
 #include "mcemmlogs.h"
+#include "mceofferingmedia.h"
 
 
 // -----------------------------------------------------------------------------
@@ -117,8 +118,17 @@
         MCEMM_DEBUG_STREAM( "TMceMediaIdle::OfferL(): validated inactive stream", *stream );
         }
     
-    //set next state, this state will become unusable
-    TMcePreparingOffererStreams::SetAsCurrentStateL( iSession );
+    // Prepare the MCC streams only if the count is greaterthan zero else move to offeringMedia
+    if (iSession.MccStreams().Count() <= 0)
+        {
+        //set next state to offeringmedia
+        TMceOfferingMedia::SetAsCurrentStateL( iSession );
+        }
+	else
+		{
+		//set next state, this state will become unusable
+		TMcePreparingOffererStreams::SetAsCurrentStateL( iSession );            
+		}
     
     MCEMM_DEBUG("TMceMediaIdle::OfferL(), Exit ");
     }
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediamanager.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediamanager.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -28,6 +28,8 @@
 #include <sdpdocument.h>
 #include <sdpcodecstringpool.h>
 
+#include "mcemsrpsource.h"
+#include "mcemsrpsink.h"
 #include "mcemediasource.h"
 #include "mcemediastream.h"
 #include "mceaudiostream.h"
@@ -71,6 +73,7 @@
 
 #include "mceaudiosdpcodec.h"
 #include "mcevideosdpcodec.h"
+#include "mcemessagesdpcodec.h"
 #include "cleanupresetanddestroy.h"
 #include "mcedtmfhandler.h"
 #include "mcecomendpointproxy.h"
@@ -93,6 +96,7 @@
 // ---------------------------------------------------------
 CMceMediaManager::CMceMediaManager() 
     {
+    iMsrpSessionCreated = EFalse;
     }
 
 // ---------------------------------------------------------
@@ -123,6 +127,11 @@
     iSdpCodecs.AppendL( sdpCodec );
     CleanupStack::Pop( sdpCodec );
     
+    //MEssage SDP Codec
+    sdpCodec = CMceMessageSdpCodec::NewL();
+    CleanupStack::PushL( sdpCodec );
+    iSdpCodecs.AppendL( sdpCodec );
+    CleanupStack::Pop( sdpCodec );
     }
 
 
@@ -2263,16 +2272,83 @@
     netSettings.iLocalAddress.SetPort( aStream.LocalMediaPort() );
     netSettings.iMediaQosValue = aStream.Data().Session()->iServiceType;
     TUint32 linkId = aStream.LinkId();
+    TMccMsrpSettings msrpSettings(netSettings);
     
     if ( linkId == KMceNotAssigned && 
          !ReuseLink( aStream ) )
         {
         MCEMM_DEBUG("CMceMediaManager::CreateMccLinkL(): no link. creating link");
-        User::LeaveIfError( 
-            iMccInterface->CreateLink( aStream.SessionId(),
-                                       aStream.LinkType(), 
-                                       linkId,
-                                       netSettings ) );
+        if(aStream.LinkType() == KMccLinkMessage)
+            {
+            CMceComMsrpSource* msrpSource = NULL;
+            CMceComMsrpSink* msrpSink = NULL;
+            // Pass on the file sharing parameters if exist
+            if (IS_SENDSTREAM(&aStream.Data()) )
+                {
+                for(TInt i=0; i<aStream.Data().Sinks().Count(); i++)
+                    {
+                    if ( (aStream.Data().Sinks())[i]->iType == KMceMSRPSink)
+                        {
+                        msrpSink = dynamic_cast<CMceComMsrpSink*>( aStream.Data().Sinks()[i]);
+                        break;
+                        }
+                    }
+                }else
+                    {
+                    __ASSERT_ALWAYS( aStream.Data().Source()->iType == KMceMSRPSource, User::Leave(KErrArgument));
+                    msrpSource = dynamic_cast<CMceComMsrpSource*>( aStream.Data().Source());
+                    }
+            
+            __ASSERT_ALWAYS( (msrpSource || msrpSink), User::Leave( KErrArgument ) );
+            
+            if ( (NULL!=msrpSource && msrpSource->iFileShare)  ||
+                    (NULL!=msrpSink && msrpSink->iFileShare)  )
+                {
+                // File sharing attrbs are exist. Extracts them and pass to MCC to start the file transfer
+                if (NULL!=msrpSource && NULL!= msrpSource->iFileName )
+                    msrpSettings.iFileName =  msrpSource->iFileName->Des().Alloc();
+                else if (NULL!=msrpSink && NULL!= msrpSink->iFileName  )
+                    msrpSettings.iFileName = msrpSink->iFileName->Des().Alloc();
+                    
+                NULL!=msrpSource ? (msrpSettings.iFileSize = msrpSource->iFileSize):(msrpSettings.iFileSize = msrpSink->iFileSize);
+                //NULL!=msrpSource ? (msrpSettings.iFileType = msrpSource->iFileType):(msrpSettings.iFileType = msrpSink->iFileType);
+                if (NULL!=msrpSource && NULL!= msrpSource->iFileType )
+                    msrpSettings.iFileType = msrpSource->iFileType->Des().Alloc();
+                else if (NULL!=msrpSink && NULL!= msrpSink->iFileType  )
+                    msrpSettings.iFileType = msrpSink->iFileType->Des().Alloc();
+                msrpSettings.iFileShare = ETrue;
+                
+                if (NULL!=msrpSource)
+                    {
+                    msrpSettings.iFTProgressNotification = msrpSource->iFTProgressNotification;
+                    }
+                else
+                    {
+                    msrpSettings.iFTProgressNotification = msrpSink->iFTProgressNotification;
+                    }
+                        
+                }
+            
+            User::LeaveIfError( iMccInterface->CreateLink( aStream.SessionId(),
+                                                           aStream.LinkType(), 
+                                                           linkId, 
+                                                           msrpSettings ));
+            // aStream.SetMsrpPath(localMsrpPath);
+            if (NULL != msrpSettings.iLocalMsrpPath )
+                {
+                aStream.SetMsrpPath(*msrpSettings.iLocalMsrpPath);
+                }
+            delete msrpSettings.iLocalMsrpPath;
+            delete msrpSettings.iFileName;
+            delete msrpSettings.iFileType;
+            }
+        else  // for non-message typed links
+            {
+            User::LeaveIfError( iMccInterface->CreateLink( aStream.SessionId(),
+                                                            aStream.LinkType(), 
+                                                            linkId,
+                                                            netSettings ) );
+            }   
         
         aStream.SetLinkId( linkId );
         
@@ -2387,13 +2463,14 @@
     __ASSERT_ALWAYS( aStream.State() != CMceSrvStream::EAdopted,
                      User::Leave( KErrArgument ) );
     
-    // Create mcc codec even if mcc prepare is not needed in order to
-    // construct fmtp info also for local codecs. That information might
-    // be needed in some stream matching cases later on.
-    CMccCodecInformation* mccCodec = CreateMccCodecLC( aStream, aRole );
+    if ( !aStream.PrepareL() ) 
+        {
         
-    if ( !aStream.PrepareL() )
-        {
+        // Create mcc codec even if mcc prepare is not needed in order to
+        // construct fmtp info also for local codecs. That information might
+        // be needed in some stream matching cases later on.
+        CMccCodecInformation* mccCodec = CreateMccCodecLC( aStream, aRole );
+        
         CMceComCodec& codec = aStream.Codec();
 
         if ( ReuseSource( aStream ) )
@@ -2444,10 +2521,11 @@
         
         aStream.Source().Data().InitializedL();
         aStream.Sink().Data().InitializedL();
+        
+        CleanupStack::PopAndDestroy( mccCodec );
 
         }
 
-    CleanupStack::PopAndDestroy( mccCodec );
     
     MCEMM_DEBUG("CMceMediaManager::CreateMccStreamL(), Exit ");
     }
@@ -2506,6 +2584,27 @@
     	 remoteIpAddress.Port() != 0 &&
          aStream.IsMccPrepared() )
         {
+        
+        //MSRP    
+        if (aStream.LinkType() == KMccLinkMessage )  
+            {
+            if( aStream.Data().iRemoteMsrpPath.Length())
+                {
+                    // Create MSRP Session with remote terminal
+                    User::LeaveIfError( 
+                            iMccInterface->SetRemoteMsrpPath( 
+                                aStream.SessionId(),
+                                aStream.LinkId(),
+                                aStream.RemMsrpPath(),
+                                aStream.ConnStatus() )); 
+                }
+            else
+                {
+                // NOP
+                }
+            return;
+            }
+        
         User::LeaveIfError( 
             iMccInterface->SetRemoteAddress( 
                     aStream.SessionId(),
@@ -2537,6 +2636,28 @@
 
 
 // ---------------------------------------------------------
+// CMceMediaManager::SetRemoteMsrpPathL
+// ---------------------------------------------------------   
+//
+void CMceMediaManager::SetRemoteMsrpPathL( CMceSrvStream& aStream )
+    {
+    
+    MCEMM_DEBUG("CMceMediaManager::SetRemoteMsrpPathL(), Entry ");   
+
+   if (aStream.LinkType() == KMccLinkMessage)
+        {
+        User::LeaveIfError( 
+                iMccInterface->SetRemoteMsrpPath( 
+                    aStream.SessionId(),
+                    aStream.LinkId(),
+                    aStream.RemMsrpPath(),
+                    aStream.ConnStatus() ));            
+        }
+
+    }
+
+
+// ---------------------------------------------------------
 // CMceMediaManager::StartMccStreamL
 // ---------------------------------------------------------   
 //
@@ -3166,7 +3287,8 @@
     while( !inUse && sourceMatchStreams.Next( stream ) )
         {
         if ( ( aStream.Data().iStreamType == CMceComMediaStream::ELocalStream || 
-               aStream.Source().Data().Type() == KMceRTPSource ) &&
+               aStream.Source().Data().Type() == KMceRTPSource ||
+               aStream.Source().Data().Type() == KMceMSRPSource ) &&
                stream->Data().iLinkId != KMceNotAssigned )
             {
             inUse = ETrue;
@@ -3177,7 +3299,8 @@
     while( !inUse && sinkMatchStreams.Next( stream ) )
         {
         if ( ( aStream.Data().iStreamType == CMceComMediaStream::ELocalStream || 
-               aStream.Sink().Data().Type() == KMceRTPSink ) &&
+               aStream.Sink().Data().Type() == KMceRTPSink ||
+               aStream.Sink().Data().Type() == KMceMSRPSink ) &&
                stream->Data().iLinkId != KMceNotAssigned )
             {
             inUse = ETrue;
@@ -3937,6 +4060,19 @@
                 // NOP
                 }
             
+            if (aEvent.iEventType == KMccFileSendCompleted || 
+                    aEvent.iEventType == KMccFileReceiveCompleted )
+                {
+            //  aEvent.iErrorCode cpontains the file tranfer completion info
+                event.iError = aEvent.iErrorCode ; 
+                }else if( aEvent.iEventType == KMccFileSendProgressNotification ||
+                        aEvent.iEventType == KMccFileReceiveProgressNotification)
+                    {
+                    event.iEventData1 = aEvent.iErrorCode ; //contains the tranferred data
+                    event.iEventData2 = aEvent.iEventNumData ; // contains the total file size
+                    }
+                    
+            
             // Event might contain only link id (e.g. rtcp rr) but
             // we do not want to propagate it to all streams of that link.                               
             CMceSrvStream::EventReceived( session->MccStreams(), event, ETrue );
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemediasdpcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -29,6 +29,10 @@
 #include "mcesip.h"
 #include "mcemediamanager.h"
 #include "mcenatpluginmanager.h"
+#include "mcemessagesdpcodec.h"
+#include "mcedefs.h"
+#include <mceexternalsink.h>
+#include <mceexternalsource.h>
 
 #include <sdpconnectionfield.h>
 #include <sdpdocument.h>
@@ -40,9 +44,13 @@
 #include <sdpfmtattributefield.h>
 #include <sdporiginfield.h>
 #include <sdpbandwidthfield.h>
+#include <sdpconnectionfield.h>
 #include <mmcccodecinformation.h>
 #include <sdpcodecstringpool.h>
 #include <delimitedpathsegment8.h>
+#include <mcemessagestream.h>
+#include <mcemessagesink.h>
+#include <mcemessagesource.h>
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -85,8 +93,10 @@
     // Set the fmt list containing all supported payload 
     // types supported by this media
     // i.e. all the rtpmap fields in the pointer array
-    HBufC8* fmtlist = CreateFormatListL( codecs );
-    CleanupStack::PushL( fmtlist ); 
+    // Set the format list to '*' for MESSAGE streams
+    HBufC8* fmtlist;
+    fmtlist = CreateFormatListL( codecs );
+    CleanupStack::PushL( fmtlist );
     codecs.Reset();
 
     aMediaLine.SetFormatListL( *fmtlist );
@@ -98,7 +108,7 @@
     // e.g. a=rtpmap: 97 AMR/8000
     // and ptime and maxptime
     // e.g. a=ptime:20 a=maxptime:40
-    while( codecs.Next( codec ) )
+    while( codecs.Next( codec ) && (aStream.iType != KMceMessage))
         {
         CSdpFmtAttributeField* rtpmap = EncodeRtpmapAttributeLC( *codec );
 
@@ -149,13 +159,38 @@
     //decode direction or old school hold if necessary                                            
     DecodeDirectionL( aMediaLine, aStream, aSdpDocument, EMceRoleOfferer );
 	        
-    __ASSERT_ALWAYS( codecs.Count() > 0, User::Leave( KErrNotReady ) );
+     // If the type of the source/sink is external then it is expected that the application takes care of
+    // data path and hence the codec count can be zero 
+    TBool Allow = EFalse;
+    if ( IS_SENDSTREAM(&aStream))
+        {
+        if ( (aStream.Source()->Type() == KMceExternalSource) || (aStream.Source()->Type() == KMceMessageSource) )
+            {
+            Allow = ETrue;
+            }
+        }
+    else
+        {
+        for (TInt i=0; i<aStream.Sinks().Count();i++)
+            {
+            if ( (aStream.Sinks()[i]->Type() == KMceExternalSink) || (aStream.Sinks()[i]->Type() == KMceMessageSink) )
+                {
+                Allow = ETrue;
+                }
+            }
+        }
+    
+    if (!Allow)
+        {
+        __ASSERT_ALWAYS( codecs.Count() > 0, User::Leave( KErrNotReady ) );
+        }
+    
     __ASSERT_ALWAYS( aMediaLine.Port() != 0 , User::Leave( KErrNotReady ) );
 
     //decode based on rtpmaps + their media attributes
     TInt decoded = DecodePayloadsL( aMediaLine, aStream, EMceRoleOfferer );
 
-    if ( !decoded )
+    if ( !decoded && !Allow)
         {
         MCEMM_DEBUG("ERROR: No codecs decoded")
         User::Leave( KErrNotReady );
@@ -340,13 +375,41 @@
     CMceComCodec* codec = NULL;
     CMceComCodec::TIterator codecs( allCodecs, CMceComCodec::TIterator::EFilterIsNegotiated );
 
-    if ( codecs.Count() > 0 ) 
+    // If the type of the source/sink is external then it is expected that the application takes care of
+    // data path and hence the codec count can be zero 
+    TBool CanCodecsBeZero = EFalse;
+    if ( IS_SENDSTREAM(&aStream))
+        {
+        if (aStream.Source()->Type() == KMceExternalSource)
+            {
+            CanCodecsBeZero = ETrue;
+            }
+        }
+       else
+           {
+           for (TInt i=0; i<aStream.Sinks().Count();i++)
+               {
+               if (aStream.Sinks()[i]->Type() == KMceExternalSink)
+                   {
+                   CanCodecsBeZero = ETrue;
+                   }
+               }
+           }
+
+    if ( codecs.Count() > 0 || CanCodecsBeZero) 
         {
         
         // Set the fmt list containing all supported payload 
         // types supported by this media
         // i.e. all the rtpmap fields in the pointer array
         HBufC8* fmtlist = CreateFormatListL( codecs );
+        // Presently for message type streams the codecs will be zero and as per RFC the fomat should be *. 
+	 if (CanCodecsBeZero && codecs.Count() == 0 )
+	 	{
+	 	TPtr8 ptr(fmtlist->Des());
+	 	
+	 	ptr.Append(_L8("*"));
+	 	}
         CleanupStack::PushL( fmtlist ); 
         codecs.Reset();
 
@@ -355,13 +418,21 @@
         
         MCEMM_DEBUG_SVALUE("encoded formatlist", aMediaLine.FormatList() )
         
-        aMediaLine.SetPortL( aStream.iLocalMediaPort );
+        if(IS_RECEIVESTREAM(&aStream))
+            {
+            aMediaLine.SetPortL( aStream.iLocalMediaPort );
+            }
+        else
+            {
+            aMediaLine.SetPortL( aStream.iRemoteMediaPort );
+            }
+        
         MCEMM_DEBUG_DVALUE("encoded local port", aMediaLine.Port() )
         
         // add the direction attribute
         EncodeDirectionL( aStream, aMediaLine, aSdpDocument, EMceRoleAnswerer );
 
-        while( codecs.Next( codec ) )
+        while( codecs.Next( codec )  && (aStream.iType != KMceMessage) )
             {
             CSdpFmtAttributeField* rtpmap = EncodeRtpmapAttributeLC( *codec );
 
@@ -447,6 +518,27 @@
     const RPointerArray<CMceComCodec>& allCodecs = CodecsL( aStream );
     CMceComCodec* codec = NULL;
     CMceComCodec::TIterator codecs( allCodecs );
+    if(aStream.iType == KMceMessage)
+        {
+        codecs.Next(codec); 
+        if(codec)
+            {
+            codec->iIsNegotiated = ETrue;  
+            codec->iPayloadType = 120;
+            }
+        
+        if ( aRole == EMceRoleAnswerer )
+            {
+            if ( DecodeRtpmapLineL( aMediaLine, aStream ) )
+                {
+                decoded++;
+                }
+            }
+        else
+            {
+            // NOP
+            }
+        }
     
     RArray<TUint> payloadTypesInMediaLine;
     CleanupClosePushL( payloadTypesInMediaLine );
@@ -677,7 +769,7 @@
     CMceComCodec* codec = NULL;
     
     // Ingoring if there is no matching pt in medialine for this rtmpmap line
-    if ( payloadTypesInMediaLine.Find( rtpMapPT ) != KErrNotFound )
+    if ( payloadTypesInMediaLine.Find( rtpMapPT ) != KErrNotFound || (aStream.iType == KMceMessage) )
         {
         codec = CreateCodecLC( aRtpMaptLine );
         if ( codec )
@@ -706,6 +798,49 @@
     MCEMM_DEBUG("CMceMediaSdpCodec::DecodeFmtpLineL(), Exit ")
     return codec;        
     }
+
+
+// -----------------------------------------------------------------------------
+// CMceMediaSdpCodec::DecodeRtpmapLineL
+// -----------------------------------------------------------------------------
+//
+CMceComCodec* CMceMediaSdpCodec::DecodeRtpmapLineL( 
+    CSdpMediaField& aMediaLine,
+    CMceComMediaStream& aStream ) const
+    {
+    MCEMM_DEBUG("CMceMediaSdpCodec::DecodeFmtpLineL(), Entry ")
+    
+    CSdpFmtAttributeField* aRtpMaptLine = NULL;
+    RArray<TUint> payloadTypesInMediaLine;
+    CleanupClosePushL( payloadTypesInMediaLine );
+
+    User::LeaveIfError( DecodeFormatList( aMediaLine, payloadTypesInMediaLine ) );
+
+    CMceComCodec* codec = NULL;
+    
+    // Ingoring if there is no matching pt in medialine for this rtmpmap line
+    if ( aStream.iType == KMceMessage )
+        {
+        codec = CreateCodecLC( *aRtpMaptLine );
+        if ( codec )
+            {
+            codec->InitializeL( aStream );
+
+            // check if ptime or maxptime attributes are present
+            DecodeMediaAttributesL( aMediaLine, *codec, *aRtpMaptLine );
+            codec->iIsNegotiated = ETrue;
+            MCEMM_DEBUG_SVALUE("adding codec", codec->iSdpName )
+            aStream.AddCodecL( codec );
+            CleanupStack::Pop( codec );
+
+            }    
+        }
+
+    CleanupStack::PopAndDestroy( &payloadTypesInMediaLine );
+
+    MCEMM_DEBUG("CMceMediaSdpCodec::DecodeFmtpLineL(), Exit ")
+    return codec;        
+    }
     
 // -----------------------------------------------------------------------------
 // CMceMediaSdpCodec::DecodeFmtpLinesL
@@ -796,6 +931,7 @@
         
     MCEMM_DEBUG("CMceMediaSdpCodec::EncodeFmtpAttributeL(), Exit ")
     }
+
         
 // -----------------------------------------------------------------------------
 // CMceMediaSdpCodec::CreateFormatListL
@@ -1479,6 +1615,22 @@
     	CleanupStack::PopAndDestroy(); // writeStream
         CleanupStack::PopAndDestroy( encodeBuf ); // encodeBuf
         }
+
+    for ( TInt i = 0; i < aMediaLine.ConnectionFields().Count(); i++ )
+        {
+        
+    	encodeBuf = CBufFlat::NewL( KMceExternalizeBufferExpandSize );
+    	CleanupStack::PushL( encodeBuf );
+    	RBufWriteStream writeStream( *encodeBuf, 0 );
+	    writeStream.PushL();
+        
+        aMediaLine.ConnectionFields()[ i ]->EncodeL( writeStream );
+        MCEMM_DEBUG_SVALUE("found attribute", encodeBuf->Ptr( 0 ) )
+        remoteAttributes->AppendL( encodeBuf->Ptr( 0 ) );
+    	
+    	CleanupStack::PopAndDestroy(); // writeStream
+        CleanupStack::PopAndDestroy( encodeBuf ); // encodeBuf
+        }
         
     if ( aStream.BoundStream() )
         {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcemessagesdpcodec.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -0,0 +1,1210 @@
+/*
+* 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:  
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <e32base.h>
+#include <e32std.h>
+#include <e32def.h>
+#include <stringpool.h>
+
+#include <sdpdocument.h>
+#include <sdpcodecstringconstants.h>
+#include <sdpcodecstringpool.h>
+#include <sdpmediafield.h>
+#include <sdpattributefield.h>
+#include <sdprtpmapvalue.h>
+#include <sdpfmtattributefield.h>
+#include <sdporiginfield.h>
+#include <e32err.h>
+#include <uricommon.h>
+#include <uri8.h>
+#include <uriutils.h>
+#include <SdpConnectionField.h>
+
+#include "mcemediadefs.h"
+#include "mcemessagesdpcodec.h"
+#include "mcecommessagestream.h"
+#include "mcemessagestream.h"
+#include "mcecommessagecodec.h"
+#include "mcemediadefs.h"
+#include "mcecomfactory.h"
+#include "mcemmlogs.h"
+#include "mcecommsrpsource.h"
+#include "mcecomexternalsink.h"
+#include "mcecomexternalsource.h"
+#include "mcecommsrpsink.h"
+#include "mcecommediasource.h"
+#include "mcedefs.h"
+#include "mcecomendpoint.h"
+#include <mcemsrpsink.h>
+#include <mcemsrpsource.h>
+#include <mcemessagesink.h>
+#include <mcemessagesource.h>
+#include "mcecommessagesink.h"
+#include "mcecommessagesource.h"
+#include "mcemsrpsink.h"
+#include "mceexternalsource.h"
+#include "mceexternalsink.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::NewL
+// -----------------------------------------------------------------------------
+//
+CMceMessageSdpCodec* CMceMessageSdpCodec::NewL()
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CMceMessageSdpCodec::NewL, Entry" )
+    RStringF message = MCE_SDP_STRING_MESSAGEL();
+    /*
+    RStringPool sPool;
+    RStringF message =sPool.OpenFStringL(KMceMediaMessage);
+    */    
+        
+    CMceMessageSdpCodec* self = new (ELeave) CMceMessageSdpCodec( message );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CMceMessageSdpCodec::NewL, Exit" )
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CMceMessageSdpCodec
+// -----------------------------------------------------------------------------
+//
+CMceMessageSdpCodec::CMceMessageSdpCodec( RStringF aMedia )
+    : CMceMediaSdpCodec( aMedia )
+    {
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::~CMceMessageSdpCodec
+// -----------------------------------------------------------------------------
+//
+CMceMessageSdpCodec::~CMceMessageSdpCodec()
+    { 
+    MCEMM_DEBUG( "CMceMessageSdpCodec::~CMceMessageSdpCodec, Entry" )
+    iNetType.Close();
+    iAddressType.Close();
+    iAcceptTypesStr.Close();
+    iPathStr.Close();
+    iAcceptWrappedTypesStr.Close();
+    iFileSelectorStr.Close();
+    iFileTransferidStr.Close();  
+    iFileDispositionStr.Close();
+    iConnectionStr.Close();
+    MCEMM_DEBUG( "CMceMessageSdpCodec::~CMceMessageSdpCodec, Exit" )
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::Encodes
+// -----------------------------------------------------------------------------
+//
+TBool CMceMessageSdpCodec::Encodes( const CMceComMediaStream& aStream ) const
+    {
+    return aStream.iStreamType != CMceComMediaStream::ELocalStream &&
+           aStream.iType == KMceMessage;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::EncodeRtpmapAttributeLC
+// -----------------------------------------------------------------------------
+//
+CSdpFmtAttributeField* CMceMessageSdpCodec::EncodeRtpmapAttributeLC( CMceComCodec& /*aCodec*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeRtpmapAttributeLC(), Entry" )
+    
+    CSdpFmtAttributeField* rtpmapAttribute = NULL;
+    
+    CleanupStack::PushL( rtpmapAttribute );
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeRtpmapAttributeLC(), Exit" )
+    return rtpmapAttribute;
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::EncodeMessageMediaAttributesL
+// -----------------------------------------------------------------------------
+//
+
+void CMceMessageSdpCodec::EncodeMessageMediaAttributesL( CMceComMessageStream& aStream, 
+                                                            CSdpMediaField& aMediaLine)                                             
+     {
+     // Message stream level attributes will be set through client SDP attributes.
+    MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeMessageMediaAttributesL, Entry" )
+     CMceComMsrpSource* msrpSource = NULL;
+     CMceComMsrpSink* msrpSink = NULL;
+     if ( (aStream.iStreamType == CMceComMediaStream::ESendOnlyStream) ||
+             (aStream.iStreamType == CMceComMediaStream::ESendStream))
+         {
+         for(TInt i=0; i<aStream.Sinks().Count(); i++)
+             {
+             if ( (aStream.Sinks())[i]->iType == KMceMSRPSink)
+                 {
+                 msrpSink = dynamic_cast<CMceComMsrpSink*>( aStream.Sinks()[i]);
+                 break;
+                 }
+             }
+         }
+        else  //it meamsn it is sendrecv stream so the parameters are expected to be set to msrpSink
+         {
+         __ASSERT_ALWAYS(aStream.Source()->iType == KMceMSRPSource, User::Leave(KErrArgument));
+         msrpSource = dynamic_cast<CMceComMsrpSource*>( aStream.Source());
+         }
+     
+     __ASSERT_ALWAYS(msrpSource!=NULL || msrpSink!= NULL, User::Leave(KErrNotFound));
+     
+     RPointerArray<CMceComMediaSink> &sinks = aStream.Sinks(); //== KMceMessageSink
+     
+     if( (aStream.iSource->iType == KMceMSRPSource && sinks[0]->iType == KMceMessageSink) || aStream.iSource->iType == KMceMessageSource) // down link
+         {
+         if(aStream.iLocalMsrpPath.Length() && ( aStream.Session()->Streams().Count() != 2 || aStream.iStreamType != CMceComMediaStream::ESendOnlyStream) )
+             {
+             if (iPathStr.DesC().Length() == 0 )
+                 {
+                 iPathStr = SdpCodecStringPool::StringPoolL().OpenFStringL(KMceSDPNamePath);
+                 CleanupClosePushL( iPathStr );
+                 }
+             
+             HBufC16* localPath = HBufC16::NewLC(256);
+             localPath->Des().Copy(aStream.iLocalMsrpPath);
+             CUri8* uri = UriUtils::CreateUriL(*localPath);
+             
+             // if the realy is supported then the last entry will always indicates its own MSRP URI
+             SetHostAddrFromPathAttrL(uri->Uri(), aMediaLine); 
+             // Set local port number from the msrp path
+             //SetPortFromPathAttrL((TUriC8&)uri->Uri(), aStream);            
+             // Create the path SDP attr and append this to media line
+             CSdpAttributeField* pathAttr = CSdpAttributeField::NewLC( iPathStr, aStream.iLocalMsrpPath);                     
+             MCEMM_DEBUG_SVALUE( "path Attribute value from MSRP stack:", aStream.iLocalMsrpPath )         
+             aMediaLine.AttributeFields().AppendL( pathAttr );
+             CleanupStack::Pop(pathAttr);
+             CleanupStack::PopAndDestroy(localPath);
+             if (iPathStr.DesC().Length() != 0 )
+                 CleanupStack::PopAndDestroy(&iPathStr);
+             
+             delete uri;
+             }
+         }
+     else if(aStream.iSource->iType == KMceMessageSource && msrpSink->iType == KMceMSRPSink) // message uplink
+         {
+         //NOP
+         }
+     else
+         {
+         SetPathAttributeL(aStream, msrpSource, msrpSink, aMediaLine);
+         }
+    // EncodeFileAttributeL( aStream, aMediaLine );
+     SetAcceptTypesAttributeL(msrpSource, msrpSink, aMediaLine);
+     SetAcceptWrappedAttributeL(msrpSource, msrpSink, aMediaLine);
+     SetFileShareAttributeL(msrpSource, msrpSink, aMediaLine);
+     
+     // Set Information attribute
+     HBufC8* infoPtr = msrpSource!=NULL ? msrpSource->iSessInfo : msrpSink->iSessInfo;
+     if (infoPtr != NULL)
+         aMediaLine.SetInfoL(infoPtr->Des());
+
+     // set msrp conneciton attribute
+     SetConnectionAttributeL(aStream, aMediaLine);
+     MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeMessageMediaAttributesL, Exit" )
+     }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::EncodeMediaAttributesL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::EncodeMediaAttributesL( CMceComCodec& /*aCodec*/, 
+                                                CSdpMediaField& /*aMediaLine*/, 
+                                                CSdpFmtAttributeField& /*aRtpmap*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeMediaAttributesL(), Entry" )
+    MCEMM_DEBUG( "CMceMessageSdpCodec::EncodeMediaAttributesL(), Exit" )
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::DecodeMediaAttributesL 
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::DecodeMediaAttributesL(
+    CSdpMediaField& /*aMediaLine*/, 
+    CMceComCodec& /*aCodec*/,
+    CSdpFmtAttributeField& /*aRtpmap*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::DecodeMediaAttributesL(), Entry ")
+
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeMediaAttributesL(), Exit ")
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateStreamLC
+// -----------------------------------------------------------------------------
+//
+CMceComMediaStream* CMceMessageSdpCodec::CreateStreamLC( TInt aType ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateStreamLC(), Entry" )
+   CMceComMessageStream* messagestream = NULL;
+            
+    if( aType == SdpCodecStringConstants::EAttributeSendonly )
+        {
+        // downlink
+        MCEMM_DEBUG( "create downlink" )
+        messagestream = CreateDownlinkStreamL();
+        }
+    else if( aType == SdpCodecStringConstants::EAttributeRecvonly )        
+        {
+        // uplink 
+        MCEMM_DEBUG( "create uplink" )
+        messagestream = CreateUplinkStreamL();
+        }
+    else
+        {
+        // sendrcv 
+        // create two way stream
+        // create downlink
+        MCEMM_DEBUG( "create two-way stream" )
+        messagestream = CreateDownlinkStreamL();
+        CleanupStack::PushL( messagestream );
+        // create bounded uplink
+       CMceComMessageStream *boundUplink = CreateUplinkStreamL();
+        CleanupStack::PushL( boundUplink );
+        messagestream->BindL( boundUplink );
+        CleanupStack::Pop( boundUplink ); 
+        CleanupStack::Pop( messagestream );
+        }
+    
+    CleanupStack::PushL( messagestream );
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateStreamLC(), Exit" )
+    return messagestream;
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::UpdateStreamL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::UpdateStreamL( CMceComMediaStream& aStream, TInt aDirection ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::UpdateStreamL(), Entry ")
+    MCE_DEFINE_AUDIO( stream, aStream );
+
+   CMceComMessageStream* messagestream = NULL;
+   CMceComMessageStream& amessagestream = (CMceComMessageStream&)( aStream );
+    TInt streamType = stream.SdpStreamType();
+    
+    if ( aDirection != SdpCodecStringConstants::EAttributeInactive )
+        {
+        switch( streamType )
+            {
+            case SdpCodecStringConstants::EAttributeRecvonly:
+                {
+                //if direction is changed
+                if ( aDirection != SdpCodecStringConstants::EAttributeSendonly )
+                    {
+                    MCEMM_DEBUG( "update from recvonly to send" )
+                    MCEMM_DEBUG( "create uplink" )
+                    messagestream = CreateUplinkStreamL();
+                    }
+                break;
+                }
+            case SdpCodecStringConstants::EAttributeSendonly:
+                {
+                //if direction is changed
+                if ( aDirection != SdpCodecStringConstants::EAttributeRecvonly )
+                    {
+                    MCEMM_DEBUG( "update from sendonly to recv" )
+                    MCEMM_DEBUG( "create downlink" )
+                    messagestream = CreateDownlinkStreamL();
+                    }
+                break;
+                }
+            case SdpCodecStringConstants::EAttributeSendrecv:
+            default:
+                {
+                break;
+                }
+            }
+        }
+        
+    if ( messagestream )
+        {
+        CleanupStack::PushL( messagestream );
+
+        MCEMM_DEBUG( "cloning codecs" )
+        
+        for( TInt index = 0; index < amessagestream.CodecCount(); ++index )
+            {
+            // No ceodecs for message stream presently
+            CMceComMessageCodec* codec = static_cast<CMceComMessageCodec*>( amessagestream.CodecL( index )->CloneL() );
+            CleanupStack::PushL( codec );
+            
+            MCEMM_DEBUG_SVALUE( "cloned codec", codec->iSdpName )
+            
+            messagestream->AddCodecL( codec );
+            CleanupStack::Pop( codec );
+            }
+
+        amessagestream.BindL( messagestream );
+        messagestream->InitializeL( *amessagestream.Session() );
+        
+        MCEMM_DEBUG( "binded stream created" )
+        CleanupStack::Pop( messagestream ); 
+        }
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::UpdateStreamL(), Exit" )
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateCodecLC
+// -----------------------------------------------------------------------------
+//
+CMceComCodec* CMceMessageSdpCodec::CreateCodecLC( CSdpFmtAttributeField& /*aRtpmap*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateCodecLC(), Entry" )
+    
+    CMceComCodec* codec = NULL;
+
+    TPtrC8 codecName(KMceSDPNameMsrp);
+        
+    TMceComMessageCodecFactory factory;
+    codec =  factory.CreateLC( codecName );
+    
+    //Junk Value for dummy msrp codec
+    codec->iPayloadType = 90;  // dummy payload type + using unassigned value
+    MCEMM_DEBUG_SVALUE( "created codec", codecName )
+        
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateCodecLC(), Exit" )
+    return codec;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateCodecLC
+// -----------------------------------------------------------------------------
+//
+CMceComCodec* CMceMessageSdpCodec::CreateCodecLC( TUint /*aPayload*/, 
+                                                CSdpMediaField& /*aMediaLine*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateCodecLC( payload ), Entry" )
+
+    TMceComMessageCodecFactory factory;  
+    CMceComMessageCodec* codec = NULL;
+    
+    TUint aPayload = 90;  // dummy payload type + using unassigned value
+    codec = factory.CreateCodecLC( aPayload );
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateCodecLC( payload ), Exit" )
+   
+    return codec;
+    }
+
+    
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::DecodeSessionMediaAttributesL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::DecodeSessionMediaAttributesL( CMceComMediaStream& /*aStream*/, 
+                                                       CSdpDocument& /*aSdpDocument*/ ) const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::DecodeSessionMediaAttributesL(), Entry" )
+    MCEMM_DEBUG( "CMceMessageSdpCodec::DecodeSessionMediaAttributesL(), Exit" )
+    }
+    
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateUplinkStreamL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream* CMceMessageSdpCodec::CreateUplinkStreamL() const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateUplinkStreamL(), Entry" )
+    
+   CMceComMessageStream *messagestream =CMceComMessageStream::NewL();
+    CleanupStack::PushL( messagestream );
+    // uplink           
+    CMceComMessageSource* messageSource = CMceComMessageSource::NewL();
+    CleanupStack::PushL( messageSource );
+    //messageSource->InitializeL( static_cast<CMceComMessageStream&> ( *messagestream ) );
+    messageSource->InitializeL( *messagestream);
+    messagestream->SetSourceL( messageSource );
+    CleanupStack::Pop( messageSource );
+    CMceComMsrpSink* msrpSink = CMceComMsrpSink::NewL();
+    CleanupStack::PushL( msrpSink );
+    msrpSink->InitializeL( *messagestream);
+    messagestream->AddSinkL( msrpSink );
+    CleanupStack::Pop( msrpSink ); 
+    CleanupStack::Pop( messagestream );
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateUplinkStreamL(), Exit" )
+    
+    return messagestream;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CodecsL
+// -----------------------------------------------------------------------------
+//
+const RPointerArray<CMceComCodec>& CMceMessageSdpCodec::CodecsL( CMceComMediaStream& aStream ) const
+    {
+    __ASSERT_ALWAYS( aStream.iType == KMceMessage, User::Leave( KErrArgument ) );
+    MCE_DEFINE_MESSAGE( stream, aStream );
+
+    return reinterpret_cast< const RPointerArray< CMceComCodec >& >( stream.Codecs() );
+    
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateDownlinkStreamL
+// -----------------------------------------------------------------------------
+//
+CMceComMessageStream* CMceMessageSdpCodec::CreateDownlinkStreamL() const
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateDownlinkStreamL(), Entry" )
+
+   CMceComMessageStream *messagestream =CMceComMessageStream::NewL();
+    CleanupStack::PushL( messagestream ); 
+    // downlink         
+    CMceComMsrpSource* msrpSource = CMceComMsrpSource::NewL();
+    CleanupStack::PushL( msrpSource );
+    //msrpSource->InitializeL( static_cast<CMceComMessageStream&> ( *messagestream ) );
+    msrpSource->InitializeL( ( *messagestream ) );
+    messagestream->SetSourceL( msrpSource );
+    CleanupStack::Pop( msrpSource );
+    CMceComMessageSink* sink = CMceComMessageSink::NewL();
+    CleanupStack::PushL( sink );
+    sink->InitializeL( ( *messagestream ) );
+    messagestream->AddSinkL( sink );
+    CleanupStack::Pop( sink ); 
+    CleanupStack::Pop( messagestream );
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::CreateDownlinkStreamL(), Exit" )
+    
+    return messagestream;
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetHostAddrFromPathAttrL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::SetHostAddrFromPathAttrL(const TUriC8& aMsrpUri, 
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG("\n CMceMessageSdpCodec::SetHostAddrPortFromPathAttr : Entry");
+    TUriParser8 parser;
+    TInt parseValue = parser.Parse(aMsrpUri.UriDes()); 
+    
+    MCEMM_DEBUG_DVALUE("\n CMceMessageSdpCodec::SetHostAddrPortFromPathAttr: Parsed return value for MSRP URI: ", 
+            parseValue);
+    User::LeaveIfError(parseValue);
+    TBuf8<50> host = parser.Extract(EUriHost);
+    
+    // check the type of the host and create the conneciton filed and insert it into the media field
+    CSdpConnectionField* ConnFld = NULL;
+    
+    iNetType = SdpCodecStringPool::StringPoolL().StringF(SdpCodecStringConstants::ENetType,
+                    SdpCodecStringPool::StringTableL());
+    CleanupClosePushL(iNetType);
+    
+    if (UriUtils::HostType( host ) == UriUtils::ETextHost) // it is in www.example.com format
+        {
+        iAddressType = SdpCodecStringPool::StringPoolL().StringF(SdpCodecStringConstants::EAddressTypeIP4, 
+                SdpCodecStringPool::StringTableL());
+        CleanupClosePushL(iAddressType);
+        ConnFld = CSdpConnectionField::NewL(iNetType, iAddressType, host);
+        }
+    else
+        {
+        if (UriUtils::HostType( host ) == UriUtils::EIPv6Host)
+            {
+            iAddressType = SdpCodecStringPool::StringPoolL().StringF(SdpCodecStringConstants::EAddressType, 
+                    SdpCodecStringPool::StringTableL());
+            CleanupClosePushL(iAddressType);
+            ConnFld = CSdpConnectionField::NewL(iNetType, iAddressType, host);
+            }
+        else
+            {
+            iAddressType = SdpCodecStringPool::StringPoolL().StringF(SdpCodecStringConstants::EAddressTypeIP4, 
+                            SdpCodecStringPool::StringTableL());
+            CleanupClosePushL(iAddressType);
+            ConnFld = CSdpConnectionField::NewL(iNetType, iAddressType, host);
+            }
+        }
+    __ASSERT_ALWAYS(ConnFld!=NULL, User::Leave(KErrArgument));
+    CleanupStack::PushL(ConnFld);
+    // clear the connecitons fileds if exists
+    if (aMediaLine.ConnectionFields().Count() > 0)
+        {
+        CSdpConnectionField* connField = aMediaLine.ConnectionFields()[0];
+        __ASSERT_ALWAYS(connField!=NULL, User::Leave(KErrArgument));
+        connField->SetAddressL(iNetType, iAddressType, host);
+        CleanupStack::PopAndDestroy(ConnFld);    // delete the created conneciton filed as the parameters are set in above line
+        }
+    else
+        {
+        aMediaLine.ConnectionFields().AppendL(ConnFld);
+        CleanupStack::Pop(ConnFld);
+        }
+    
+    if (iAddressType.DesC().Length()!=0)
+            CleanupStack::PopAndDestroy(&iAddressType);
+    
+    if (iNetType.DesC().Length() != 0)
+        CleanupStack::PopAndDestroy(&iNetType);
+    
+    
+    MCEMM_DEBUG("\n CMceMessageSdpCodec::SetHostAddrPortFromPathAttr : Exit");
+    }
+	
+            
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetAcceptTypesAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::SetAcceptTypesAttributeL(CMceComMsrpSource* msrpSource, 
+        CMceComMsrpSink* msrpSink, 
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::SetAcceptTypesAttributeL, Entry" )
+    if (iAcceptTypesStr.DesC().Length() == 0 )
+        {
+        iAcceptTypesStr = SdpCodecStringPool::StringPoolL().
+                OpenFStringL(KMceSDPNameAcceptTypes);
+        CleanupClosePushL(iAcceptTypesStr);
+        }
+    
+    // Set accept-types attribute. 
+    // If no value is provided then add * as a default value for this attribute 
+    TBuf8<100> mediaTypes;
+    TInt acceptTypescount = 
+    msrpSource!=NULL ? msrpSource->iAcceptTypes.MdcaCount(): msrpSink->iAcceptTypes.MdcaCount();
+    if (acceptTypescount == 0 )
+        {
+        // Default value is * . Means the applicaiton receives any type of media
+        _LIT8(KStar,"*");
+        mediaTypes.Append(KStar);
+        }
+    else
+        {
+        for (TInt i=0; i<acceptTypescount;i++)
+            {
+            mediaTypes.Append(
+                    msrpSource!=NULL? (msrpSource->iAcceptTypes).MdcaPoint(i) : (msrpSink->iAcceptTypes).MdcaPoint(i));
+            if (i+1 < acceptTypescount)
+                {
+                mediaTypes.Append(_L8(" "));           
+                }
+            } 
+        }         
+    // Create the accept-types SDP attr and append this to media line
+    CSdpAttributeField* acceptTypesAttr = CSdpAttributeField::NewLC( iAcceptTypesStr, mediaTypes);
+    MCEMM_DEBUG_SVALUE( "accept-types Attribute :",  mediaTypes)
+    aMediaLine.AttributeFields().AppendL( acceptTypesAttr );
+    CleanupStack::Pop(acceptTypesAttr);
+    
+    if (iAcceptTypesStr.DesC().Length() != 0)
+        {
+        CleanupStack::PopAndDestroy(&iAcceptTypesStr);
+        }
+    
+    MCEMM_DEBUG( "CMceMessageSdpCodec::SetAcceptTypesAttributeL, Exit" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetPathAttributeL
+// -----------------------------------------------------------------------------
+//     
+void CMceMessageSdpCodec::SetPathAttributeL(CMceComMessageStream& aStream, 
+        CMceComMsrpSource* msrpSource, 
+        CMceComMsrpSink* msrpSink,
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG( "CMceMessageSdpCodec::SetPathAttributeL, Entry" )
+    // check if pathstr is initialized or not. if ot initialized then initialize it..
+    if (iPathStr.DesC().Length() == 0 )
+        {
+        iPathStr = SdpCodecStringPool::StringPoolL().OpenFStringL(KMceSDPNamePath);
+        CleanupClosePushL(iPathStr);
+        }
+    
+    TInt MsrpUriCount =  msrpSource!=NULL? msrpSource->iPath.Count():msrpSink->iPath.Count(); 
+         
+    // Set path attribute
+    HBufC8* pathValue1 = HBufC8::NewLC(200);
+    TUriC8 *uri = NULL;
+         
+    for (TInt i=0; i<MsrpUriCount;i++)
+        { 
+        if (msrpSource!=NULL)
+            {
+            uri = msrpSource->iPath[i];
+            }
+        else
+            {
+            uri = msrpSink->iPath[i];
+            }
+        pathValue1->Des().Append( uri->UriDes());
+                 
+        if (i+1 < MsrpUriCount)
+            {
+            pathValue1->Des().Append(_L8(" "));
+            }
+        }
+    if (uri != NULL)
+        {
+        // extract the host address only if the user configured to use the path attr for this purpose
+        if (aStream.iUseMsrpPathAttrForHostAddrAndPort)
+            {
+            // if the realy is supported then the last entry will always indicates its own MSRP URI
+            SetHostAddrFromPathAttrL(*uri, aMediaLine); 
+            }
+        // Create the path SDP attr and append this to media line
+        CSdpAttributeField* pathAttr = CSdpAttributeField::NewLC( iPathStr, *pathValue1);                     
+        MCEMM_DEBUG_SVALUE( "path Attribute value:", pathValue1->Des() )         
+        aMediaLine.AttributeFields().AppendL( pathAttr );
+        CleanupStack::Pop(pathAttr);
+        }
+    CleanupStack::PopAndDestroy(pathValue1);
+    if (iPathStr.DesC().Length() != 0 )
+                CleanupStack::PopAndDestroy(&iPathStr);
+    MCEMM_DEBUG( "CMceMessageSdpCodec::SetPathAttributeL, Exit" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetAcceptWrappedAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::SetAcceptWrappedAttributeL(CMceComMsrpSource* msrpSource, 
+        CMceComMsrpSink* msrpSink,
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetAcceptWrappedAttributeL, Entry" )
+    if (iAcceptWrappedTypesStr.DesC().Length() == 0 )
+        {
+        iAcceptWrappedTypesStr = SdpCodecStringPool::StringPoolL().
+                OpenFStringL(KMceSDPNameAcceptWrappedTypes);
+        CleanupClosePushL(iAcceptWrappedTypesStr);
+        }
+    
+        
+    //Set Accept-Wrapped-Types attribute if its setted by client.
+    TBool temp = msrpSource!=NULL? msrpSource->iWrappedTypes : msrpSink->iWrappedTypes;
+    
+    if (temp)
+        {
+        TBuf8<50> wrappedTypes;
+        if (msrpSource!=NULL)
+            {
+            wrappedTypes.Copy(msrpSource->iAcceptWrappedTypes);
+            }else
+                {
+                wrappedTypes.Copy(msrpSink->iAcceptWrappedTypes);
+                }
+        // Create the accept-wrapped-types SDP attr and append this to media line
+        CSdpAttributeField* acceptTypesAttr = CSdpAttributeField::NewLC( iAcceptWrappedTypesStr, wrappedTypes);
+        MCEMM_DEBUG_SVALUE( "accept-wrapped-types Attribute :",  wrappedTypes)
+        aMediaLine.AttributeFields().AppendL( acceptTypesAttr );
+        CleanupStack::Pop(acceptTypesAttr);
+        }
+    if (iAcceptWrappedTypesStr.DesC().Length() != 0 )
+        {
+        CleanupStack::PopAndDestroy(&iAcceptWrappedTypesStr);
+        }
+    
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetAcceptWrappedAttributeL, Exit" )
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetConnectionAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::SetConnectionAttributeL(CMceComMessageStream& aStream,
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetConnectionAttributeL, Entry" )
+    __ASSERT_ALWAYS(aStream.iType == KMceMessage, User::Leave(KErrArgument));
+    if (iConnectionStr.DesC().Length() == 0 )
+        {
+        iConnectionStr = SdpCodecStringPool::StringPoolL().
+            OpenFStringL(KMceSDPNameConnection);
+        CleanupClosePushL(iConnectionStr);
+            }
+    TBuf8<30> connAttr;
+    aStream.iMsrpConnUsage ? connAttr.Append(_L8("existing")) : connAttr.Append(_L8("new"));
+    // Create the connection SDP attr and append this to media line
+    CSdpAttributeField* connectionAttr = CSdpAttributeField::NewLC( iConnectionStr, connAttr);
+    
+    aMediaLine.AttributeFields().AppendL( connectionAttr );
+    CleanupStack::Pop(connectionAttr);
+    
+    if (iConnectionStr.DesC().Length() != 0 )
+        {
+        CleanupStack::PopAndDestroy(&iConnectionStr);   
+        }
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetConnectionAttributeL, Exit" )
+    }
+
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::SetFileShareAttributeL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::SetFileShareAttributeL(CMceComMsrpSource* msrpSource, 
+        CMceComMsrpSink* msrpSink,
+        CSdpMediaField& aMediaLine)
+    {
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetFileShareAttributeL, Entry" )
+
+    //Set File sharing Negotiation attributes if its called by Client.iFileShare
+    if(msrpSource!=NULL ? msrpSource->iFileShare : msrpSink->iFileShare)
+        {
+        if ( iFileSelectorStr.DesC().Length() == 0)
+            {
+            iFileSelectorStr = SdpCodecStringPool::StringPoolL().OpenFStringL(KMCESDPNameFileselector);
+            CleanupClosePushL(iFileSelectorStr);
+            }
+        // file-selector : 'name' attribute
+        HBufC16* fileName = msrpSource!=NULL ? msrpSource->iFileName : msrpSink->iFileName;
+        if (NULL != fileName && fileName->Des().Length())
+            {
+            HBufC8* fileSelector = HBufC8::NewLC(350);
+            fileSelector->Des().Append(KMceSDPFileName);
+            fileSelector->Des().Append('"');
+            fileSelector->Des().Append(fileName->Des());
+            fileSelector->Des().Append('"');
+           
+            TInt fileSize = 0;
+            fileSize = msrpSource!=NULL ? msrpSource->iFileSize : msrpSink->iFileSize;
+            if (fileSize == 0 )
+                {
+                // find file size
+                RFs fs;
+                User::LeaveIfError(fs.Connect()); 
+                TEntry entry;
+                //TBuf16<256> filenameDes;
+                //filenameDes.Copy( fileName->Des());
+                User::LeaveIfError(fs.Entry(fileName->Des(), entry));
+                fileSize = entry.iSize; 
+                fs.Close();
+                }
+            fileSelector->Des().Append(KMceSDPFileSize); 
+            fileSelector->Des().AppendNum(fileSize);
+            
+            // default file disposition value is attachment.
+            
+            // file-selector : 'type' attribute
+            HBufC8* fileType = NULL;
+            fileType = msrpSource!=NULL ? msrpSource->iFileType : msrpSink->iFileType;
+            if (fileType->Des().Length())
+                {
+                fileSelector->Des().Append(KMceSDPFileType);
+                fileSelector->Des().Append(fileType->Des());
+                }
+            
+            // Create the file-selector SDP attribute and append this to media line
+            CSdpAttributeField* fileSelectorAttr = CSdpAttributeField::NewLC( iFileSelectorStr, *fileSelector);
+            MCEMM_DEBUG_SVALUE( "file-selector-types Attribute :",  fileSelector->Des())
+            aMediaLine.AttributeFields().AppendL( fileSelectorAttr );
+            CleanupStack::Pop(fileSelectorAttr);
+            CleanupStack::PopAndDestroy(fileSelector);
+            }
+            
+        // Set file-disposition attribute
+        TBuf8<25>  dispositionValue;
+        if (msrpSource!=NULL)
+            {
+            dispositionValue.Copy(msrpSource->iDispositionValue);
+            }
+        else
+            {
+            dispositionValue.Copy(msrpSink->iDispositionValue);
+            }
+        
+        if (dispositionValue != KNullDesC8 )
+            {
+            if ( iFileDispositionStr.DesC().Length() == 0)
+                {
+                iFileDispositionStr = SdpCodecStringPool::StringPoolL().OpenFStringL(KMCESDPNameFiledisposition);
+                CleanupClosePushL(iFileDispositionStr);
+                }
+            // Create the file-disposition-types SDP attr and append this to media line
+            CSdpAttributeField* filedispAttr = CSdpAttributeField::NewLC( iFileDispositionStr, dispositionValue);
+            MCEMM_DEBUG_SVALUE( "file-disposition-types Attribute :",  dispositionValue)
+            aMediaLine.AttributeFields().AppendL( filedispAttr );
+            CleanupStack::Pop(filedispAttr);
+            }
+            
+        // Set file-transfer-id attribute
+        TBuf8<32> fileTransferid;
+        fileTransferid = msrpSource!=NULL?msrpSource->iFileTransferid:msrpSink->iFileTransferid;
+            
+        if ( fileTransferid != KNullDesC8 )
+            {
+            if (iFileTransferidStr.DesC().Length() == 0 )
+                {
+                iFileTransferidStr = SdpCodecStringPool::StringPoolL().
+                    OpenFStringL(KMCESDPNameFiletransferid);
+                CleanupClosePushL(iFileTransferidStr);
+                }
+            // Create the file-transfer-id SDP attribute and append to media line
+            CSdpAttributeField* filetransferAttr = CSdpAttributeField::NewLC( iFileTransferidStr, fileTransferid);
+            MCEMM_DEBUG_SVALUE( "file-transfer-id Attribute :",  fileTransferid)
+            aMediaLine.AttributeFields().AppendL( filetransferAttr );
+            CleanupStack::Pop(filetransferAttr);
+            }
+    
+        if (iFileTransferidStr.DesC().Length() != 0 )
+            {
+            CleanupStack::PopAndDestroy(&iFileTransferidStr);
+            }
+    
+        if ( iFileDispositionStr.DesC().Length() != 0)
+            {
+            CleanupStack::PopAndDestroy(&iFileDispositionStr);
+            }
+    
+        if ( iFileSelectorStr.DesC().Length() != 0)
+            {
+            CleanupStack::PopAndDestroy(&iFileSelectorStr);
+            }
+        }
+    
+    MCEMM_DEBUG( " CMceMessageSdpCodec::SetFileShareAttributeL, Exit" )
+    }
+
+// -----------------------------------------------------------------------------
+// CMceMediaSdpCodec::DecodeClientAttributesL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::DecodeClientAttributesL( 
+    CSdpMediaField& aMediaLine, 
+    CMceComMediaStream& aStream ) const
+    {
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeClientAttributesL, Entry" )
+    __ASSERT_ALWAYS(aStream.iType == KMceMessage, User::Leave(KErrArgument));
+            
+    CMceMediaSdpCodec::DecodeClientAttributesL(aMediaLine, aStream);
+    
+    CMceComMessageStream* msgStrm =(CMceComMessageStream*) (&aStream);
+    
+    CMceComMsrpSource* msrpSource = NULL;
+    CMceComMsrpSink* msrpSink = NULL;
+             
+    //Decode client specific attributes and populate the source/sinks accordingly
+    if (IS_RECEIVESTREAM(msgStrm))
+        msrpSource = (CMceComMsrpSource*)(msgStrm->Source());
+    else
+        {
+        for(TInt i=0; i<aStream.Sinks().Count(); i++)
+            {
+            if ( (aStream.Sinks())[i]->iType == KMceMSRPSink)
+                {
+                msrpSink = (CMceComMsrpSink*)( aStream.Sinks()[i]);
+                break;
+                }
+            }
+        }
+        
+    CBufFlat* encodeBuf = NULL;
+        
+    for ( TInt i = 0; i < aMediaLine.AttributeFields().Count(); i++ )
+        {
+        encodeBuf = CBufFlat::NewL( KMceExternalizeBufferExpandSize );
+        CleanupStack::PushL( encodeBuf );
+        RBufWriteStream writeStream( *encodeBuf, 0 );
+        writeStream.PushL();
+        
+        // extract the MSRP path attribute if it exists 
+        aMediaLine.AttributeFields()[ i ]->EncodeL( writeStream );
+        MCEMM_DEBUG_SVALUE( "found attribute", encodeBuf->Ptr( 0 ) )
+        TInt aPath = encodeBuf->Ptr(0).FindC(_L8("Path:"));
+        if(aPath != KErrNotFound)
+            {
+            TInt length = encodeBuf->Ptr(0).Size();
+            aStream.iRemoteMsrpPath = encodeBuf->Ptr(0).Mid(aPath+5, length-aPath-5-2);
+            }
+        
+        // Extracts the connection setup accribute and set it if it exists
+        TInt aSetup = encodeBuf->Ptr(0).FindC(_L8("setup:"));
+        if(aSetup != KErrNotFound)
+            {
+            TInt length = encodeBuf->Ptr(0).Size();
+            aStream.iConnStatus = encodeBuf->Ptr(0).Mid(aSetup+6, length-aSetup-6-2);
+            }
+        
+        //extract the file sharing attributes and set them accordingly
+        TInt fileSelectorId = encodeBuf->Ptr(0).FindC(_L8("file-selector:"));
+        if ( fileSelectorId != KErrNotFound)
+            {
+            HBufC16* fileName = HBufC::NewL(256);
+            TBuf8<50> fileSize;
+            HBufC8* fileType = HBufC8::NewL(256);
+            
+            // Get file name, file size and file type.
+            // look for name, type and size parameters
+            TPtr8 fileSelectorData =  encodeBuf->Ptr(14);
+            TInt nameIndex = encodeBuf->Ptr(0).FindC(_L8("name:"));
+            if (nameIndex >= 0)
+                {
+                TPtr8 nameBuf = encodeBuf->Ptr(nameIndex);
+                //nameBuf.Copy (encodeBuf->Ptr(nameIndex) );
+                TInt spaceOffset = nameBuf.Locate(' ') ;
+                if (spaceOffset != KErrNotFound )
+                    {
+                    fileName->Des().Copy(nameBuf.Mid(6, (spaceOffset-6-1 ))/*, (spaceOffset-6-1 )*/ );
+                    }else
+                        {
+                        TInt crlfOffset = nameBuf.FindC(_L8("\r\n") ) ;
+                        if (crlfOffset != KErrNotFound )
+                            {
+                            fileName->Des().Copy(nameBuf.Mid(6, (crlfOffset-6-1 ))/*, (crlfOffset-6-1 )*/);
+                            }
+                        }
+                }
+            // Find the file size if exists in the file selector
+            TInt fileSizeIndex =  encodeBuf->Ptr(0).FindC(_L8("size:"));
+            if (fileSizeIndex >= 0 && fileSizeIndex < encodeBuf->Size())
+                {
+                TPtr8 sizeBuf = encodeBuf->Ptr(fileSizeIndex);
+                TInt spaceOffset = sizeBuf.Locate(' ') ;
+                if (spaceOffset != KErrNotFound)
+                    {
+                    fileSize.Copy( sizeBuf.Mid(5, spaceOffset-5));
+                    }else
+                        {
+                        TInt crlfOffset = sizeBuf.FindC(_L8("\r\n") ) ;
+                        if (crlfOffset != KErrNotFound )
+                            {
+                            fileSize.Copy(sizeBuf.Mid(5, (crlfOffset-5 )));
+                            }
+                        }
+                    }
+            
+            // Find the file type if exists in file selector
+            TInt fileTypeIndex =  encodeBuf->Ptr(0).FindC(_L8("type:"));
+            if (fileTypeIndex >=0 && fileTypeIndex < encodeBuf->Size())
+                {
+                TPtr8 typeBuf = encodeBuf->Ptr(fileTypeIndex);
+                TInt spaceOffset = typeBuf.Locate(' ') ;
+                if (spaceOffset != KErrNotFound)
+                    {
+                    fileType->Des().Copy(typeBuf.Mid(5, spaceOffset-5));
+                    }else
+                        {
+                        TInt crlfOffset = typeBuf.FindC(_L8("\r\n") ) ;
+                        if (crlfOffset != KErrNotFound )
+                            {
+                            fileType->Des().Copy( typeBuf.Mid(5, (crlfOffset-5 )) );
+                            }
+                        }
+                }
+                if (NULL != msrpSource )
+                    {
+                    msrpSource->iFileName = fileName;
+                    msrpSource->iFileType = fileType;
+                    TLex8 lex(fileSize);
+                    lex.Val(msrpSource->iFileSize);
+                    msrpSource->iFileShare = ETrue;
+                    }
+                else
+                    {
+                    msrpSink->iFileName = fileName;
+                    msrpSink->iFileType =  fileType;
+                    TLex8 lex(fileSize);
+                    lex.Val(msrpSink->iFileSize);
+                    msrpSink->iFileShare = ETrue;
+                    }
+                }
+        
+        // look for the file-transfer-id
+        TInt fileTransferID= encodeBuf->Ptr(0).FindC(_L8("file-transfer-id:"));
+        if ( fileTransferID != KErrNotFound)
+            {
+            TBuf8<32> fileTransferid;
+            
+            TInt length = encodeBuf->Ptr(0).Size();
+            fileTransferid = encodeBuf->Ptr(0).Mid(fileTransferID+17, length-fileTransferID-17-2);
+            // the code is pending
+            if (NULL != msrpSource)
+                msrpSource->iFileTransferid = fileTransferid;
+            else
+                msrpSink->iFileTransferid = fileTransferid;
+            }
+        
+        CleanupStack::PopAndDestroy(); // writeStream
+        CleanupStack::PopAndDestroy( encodeBuf ); // encodeBuf
+        }
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeClientAttributesL, Exit" )
+    }
+	
+	
+	// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::CreateFormatListL
+// -----------------------------------------------------------------------------
+//
+HBufC8* CMceMessageSdpCodec::CreateFormatListL( CMceComCodec::TIterator& /*aCodecs*/ ) const
+    {
+    MCEMM_DEBUG("CMceMessageSdpCodec::CreateFmtListL(), Entry ")
+        
+    HBufC8* fmtList = HBufC8::NewL( KMceSdpFormatListLength );
+    TPtr8 fmtListPtr( fmtList->Des() );
+    
+    // codecs can be NULL if the data path is being taken care by the applicaiton
+    // irrespective of codecs the format list for message stream should be *
+    _LIT8(KSdpFmtListValueStar,"*");
+    fmtListPtr.Append(KSdpFmtListValueStar); 
+    
+    MCEMM_DEBUG("CMceMessageSdpCodec::CreateFmtListL(), Exit ")
+        
+    return fmtList;
+    }
+	
+	// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::DecodeStaticPayloadsL
+// -----------------------------------------------------------------------------
+//
+TInt CMceMessageSdpCodec::DecodeStaticPayloadsL( CSdpMediaField& aMediaLine,
+                CMceComMediaStream& aStream,
+                RArray<TUint>& aPayloadTypes,
+                TMceNegotiationRole aRole ) const
+    {
+    MCEMM_DEBUG("CMceMediaSdpCodec::DecodeStaticPayloadsL(), Entry ")
+    TInt decoded = 0;
+
+    DecodeFormatListL( aMediaLine, aPayloadTypes );
+    TInt index = 0;
+    
+    if ( IS_SENDSTREAM(&aStream))
+                {
+                if ( (aStream.Source()->Type() == KMceExternalSource) ||
+                        (aStream.Source()->Type() == KMceMessageSource)  )
+                    {
+                    decoded++;
+                    return decoded;
+                    }
+                }else
+                    {
+                    for (TInt i=0; i<aStream.Sinks().Count();i++)
+                        {
+                        if ( (aStream.Sinks()[i]->Type() == KMceExternalSink) ||
+                                (aStream.Sinks()[i]->Type() == KMceMSRPSink) )
+                            {
+                            decoded++;
+                            return decoded;
+                            }
+                        }
+                    }
+    
+    while( index < aPayloadTypes.Count() )
+        {
+        TUint payload = aPayloadTypes[ index++ ];
+        if ( payload < KMinDynamicPT )
+            {
+            CMceComCodec* codec = FindCodec( payload, aStream );
+            if ( aRole == EMceRoleAnswerer )
+                {
+                if ( !codec )
+                    {
+                    codec = CreateCodecLC( payload, aMediaLine );
+                    if ( codec )
+                        {
+                        codec->InitializeL( aStream );
+                        codec->iIsNegotiated = ETrue;
+                        MCEMM_DEBUG_SVALUE("adding codec", codec->iSdpName )
+                        aStream.AddCodecL( codec );
+                        CleanupStack::Pop( codec );
+                        decoded++;
+                        }
+                    }
+                else
+                    {
+                    codec->iIsNegotiated = ETrue;
+                    decoded++;
+                    }
+                }
+            else if ( codec && aRole == EMceRoleOfferer )
+                {
+                codec->iIsNegotiated = ETrue;
+                decoded++;
+                }
+            }
+        }
+        
+    MCEMM_DEBUG_DVALUE("decoded codecs", decoded )
+    MCEMM_DEBUG("CMceMediaSdpCodec::DecodeStaticPayloadsL(), Exit ")
+    return decoded;
+    }
+	
+	// -----------------------------------------------------------------------------
+// CMceMediaSdpCodec::DecodeFormatListL
+// -----------------------------------------------------------------------------
+//
+void CMceMessageSdpCodec::DecodeFormatListL( 
+    CSdpMediaField& aMedia, 
+    RArray<TUint>& aPayloadTypes ) const
+    {
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeFormatListL(), Entry ")
+    
+    User::LeaveIfError( DecodeFormatList( aMedia, aPayloadTypes ) );
+        
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeFormatListL(), Exit ")   
+    }
+
+
+// -----------------------------------------------------------------------------
+// CMceMessageSdpCodec::DecodeFormatList
+// -----------------------------------------------------------------------------
+//
+TInt CMceMessageSdpCodec::DecodeFormatList( CSdpMediaField& aMedia, 
+                               RArray<TUint>& aPayloadTypes ) const
+    {
+    MCEMM_DEBUG("CMceMessageSdpCodec::DecodeFormatList(), Entry ")
+    
+    const TDesC8& payloadlist = aMedia.FormatList();
+    MCEMM_DEBUG_SVALUE( "decoded format list", payloadlist )
+    TLex8 payloads( payloadlist );
+    TInt error = KErrNone;
+    //  Validate the formalist list if it is *
+    if (payloadlist.Compare(_L8("*")) == 0 )
+        {
+        TUint msrpPayloadtype = 90; // dummy payload type + using unassigned value
+        error = aPayloadTypes.Append( msrpPayloadtype );
+        MCEMM_DEBUG("CMceMessageSdpCodec::DecodeFormatList(), Exit ") 
+        return error;   
+        } 
+    else
+        {
+        return KErrNotSupported;
+        }
+    }
+	
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcepreparingstreams.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcepreparingstreams.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -268,7 +268,14 @@
         else if ( aUpdateRemoteAddress )
             {
             MCEMM_DEBUG( "TMcePreparingStreams::StartStreamsL() remote address update" )
-            iSession.SdpSession().Manager().SetRemoteAddressL( *stream );
+            if(stream->LinkType() == KMccLinkMessage)
+                {
+                iSession.SdpSession().Manager().SetRemoteMsrpPathL( *stream );
+                }
+            else
+                {
+                iSession.SdpSession().Manager().SetRemoteAddressL( *stream );
+                }
             }
         else
             {
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesdpsession.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -32,7 +32,14 @@
 #include <sdpdocument.h>
 #include <sdpbandwidthfield.h>
 #include <siptoheader.h>
+#include <mcemessagestream.h>
+#include <mcemsrpsource.h>
+#include <mcemsrpsink.h>
 
+#include <mcedefs.h>
+#include <mcemessagestream.h>
+#include "mcemessagesdpcodec.h"
+#include "mcecommsrpsink.h"
 #include "mcemediadefs.h"
 #include "mcesdpsession.h"
 #include "mcecomsession.h"
@@ -46,6 +53,8 @@
 #include "mcepreconditions.h"
 #include "mcemediaobserver.h"
 #include "mcemediastate.h"
+#include "mcecommessagestream.h"
+#include "mcecommsrpsource.h"
 
 
 _LIT8(KTBCP, "TBCP"); 
@@ -134,6 +143,8 @@
         {
         Backup()->DetachSDPSession();
         }
+    iProtocol.Close();
+    iProtocolTls.Close();
     }
 
 // -----------------------------------------------------------------------------
@@ -165,7 +176,7 @@
     MCEMM_DEBUG("CMceSdpSession::CreateOfferL(), Entry ")
     
     CSdpDocument* sdpDocument = NULL;
-
+    TBuf8<256> tempMsrpPath;
     if ( aType == CMceSdpSession::ERefresh )
         {
         User::LeaveIfNull( iSdpDocument );
@@ -207,6 +218,20 @@
     for ( TInt index = 0; index < streams.Count(); index++ )
         {
         mediastream = streams[ index ];
+        
+        if(streams.Count() == 2 && mediastream->iType == KMceMessage) 
+        { 
+            if (mediastream->iStreamType == CMceComMediaStream::ESendOnlyStream && (mediastream->iLocalMsrpPath.Length()))
+                {
+                tempMsrpPath = mediastream->iLocalMsrpPath;
+                //mediastream->iLocalMsrpPath.Zero();
+                }
+            else if(mediastream->iStreamType == CMceComMediaStream::EReceiveOnlyStream && !(mediastream->iLocalMsrpPath.Length()))
+                {
+                mediastream->iLocalMsrpPath = tempMsrpPath;
+                }
+        }
+        
         TBool add = MediaLineLC( mediaLine, sdpCodec, mediastream,
                                  mediaLines, streams );
         if ( mediaLine )
@@ -218,6 +243,14 @@
                 }
             mediastream = mediastream->OfferStream();//downlink
             sdpCodec->PrepareForEncodeL( *mediastream, *mediaLine );
+            
+            if (mediastream->iType == KMceMessage)
+                {                
+                CMceMessageSdpCodec* codec = static_cast<CMceMessageSdpCodec* >(sdpCodec);
+                codec->EncodeMessageMediaAttributesL(reinterpret_cast<CMceComMessageStream&>(*mediastream), 
+                        *mediaLine);           
+                }
+            
             sdpCodec->EncodeMediaOfferL( *mediastream, *mediaLine, *sdpDocument );
             if ( add )
                 {
@@ -405,6 +438,7 @@
 	                    }
 	                else //rejected
 	                    {
+			    		mediastream->SetLocalMediaPort(0);
 	                    mediastream->SetDirection( SdpCodecStringConstants::EAttributeInactive );
 	                    mediastream->SdpIndex() = KErrNotFound;
 	                    }
@@ -679,6 +713,14 @@
                 mediastream = mediastream->OfferStream();//downlink
                 sdpCodec->PrepareForEncodeL( *mediastream, *mediaLine );
                 PrepareForAnswerEncodeL( *mediaLine );
+
+		  // encode the message specific attributes to the m-line 
+		  if (mediastream->iType  == KMceMessage)
+		  	{
+		  	static_cast<CMceMessageSdpCodec*>(sdpCodec)->EncodeMessageMediaAttributesL(
+		  	        static_cast<CMceComMessageStream&>(*mediastream), *mediaLine);
+		  	}
+		  
                 sdpCodec->EncodeMediaAnswerL( *mediastream, *mediaLine, *iSdpDocument );
                 }
             }
@@ -739,10 +781,65 @@
 // -----------------------------------------------------------------------------
 //
 CSdpMediaField* CMceSdpSession::CreateMediaLineLC( 
-    CMceComMediaStream& aStream ) const
+    CMceComMediaStream& aStream ) 
     {
+    MCEMM_DEBUG("CMceSdpSession::CreateMediaLineLC")
     RStringF protocol = SDP_STRING( SdpCodecStringConstants::EProtocolRtpAvp );
-        
+    
+    if (aStream.iType == KMceMessage)
+        {
+        TBool Secureconn = EFalse;
+        if (aStream.Source()->iType != KMceMSRPSource)
+            {
+            RPointerArray<CMceComMediaSink>& sinks = aStream.Sinks();
+            __ASSERT_ALWAYS(sinks.Count(), User::Leave(KErrArgument));
+            for (TInt i=0; i< sinks.Count(); i++)
+                {
+                if (sinks[i]->iType == KMceMSRPSink)
+                    Secureconn = (reinterpret_cast<CMceComMsrpSink* >(sinks[i])->iSecureConnection);
+                }
+        	}
+		else
+			{ // for Receive streams
+			CMceComMsrpSource* source = static_cast<CMceComMsrpSource*> (aStream.Source());
+			__ASSERT_ALWAYS(source!=NULL, User::Leave(KErrArgument));
+			if (source ->iType == KMceMSRPSource)
+			    Secureconn = (static_cast<CMceComMsrpSource*>(source)->iSecureConnection);			
+			}
+        	
+          if (!Secureconn)
+                {
+                // Make MSRP/TCP as a default protocol for message sessions
+                //iProtocol = iStringPool.OpenFStringL(KMceSDPMsrpTcp);
+                if ( iProtocol.DesC().Length() == 0)
+                    {
+                    iProtocol = SdpCodecStringPool::StringPoolL().OpenFStringL(KMceSDPMsrpTcp);                    
+                    }
+                protocol = iProtocol;
+                }
+            else
+                {
+                // Make MSRP/TCP as a default protocol for message sessions
+                //iProtocol = iStringPool.OpenFStringL(KMceSDPMsrpTls);
+                if (iProtocolTls.DesC().Length() == 0 )
+                    {
+                    iProtocolTls = SdpCodecStringPool::StringPoolL().
+                                                 OpenFStringL(KMceSDPMsrpTls);                    
+                    }
+                protocol = iProtocolTls;
+                }
+          //Parsing Path for Port value
+          TUriParser8 parser;
+          
+          TInt parseValue = parser.Parse(aStream.iLocalMsrpPath); 
+          TBuf8<10> portBuf = parser.Extract(EUriPort);
+          TBuf16<10> portBuf16;
+          portBuf16.Copy(portBuf);
+          TLex iLex(portBuf16);
+
+          iLex.Val(aStream.iLocalMediaPort);
+            } 
+    
     CSdpMediaField* medialine = 
             CSdpMediaField::NewLC( Manager().SdpCodec( aStream )->Media(), 
                                    aStream.iLocalMediaPort,
@@ -926,28 +1023,7 @@
     CSdpConnectionField* connfield = aSdpDocument.ConnectionField();
     const TInetAddr* inetAddr = NULL;
     
-    // find "c-" line from media level
-    TInt index = 0;
-    TBool found = ETrue;
-    while( found && index < mediaLines.Count() )
-        {
-        RPointerArray<CSdpConnectionField>& connfields = 
-                                            mediaLines[index]->ConnectionFields();
-        
-        if ( mediaLines[index++]->Port() > 0 )
-            {
-            TInt cfindex = 0;
-	        TBool cffound = EFalse;
-	        while( !cffound && cfindex < connfields.Count() )
-	            {
-	            inetAddr = connfields[cfindex++]->InetAddress();
-	            cffound = MCE_NOT_NULL_PTR( inetAddr );
-	            }
-	        found = cffound;
-            }
-        }
-    
-    if( connfield && !found )
+    if( connfield )
         {
 		inetAddr = connfield->InetAddress();
 		if( inetAddr )
@@ -957,6 +1033,29 @@
 		    MCE_SET_REMOTE_IP_ADDR( &aSession, inetAddress );
 		    }
         }
+    
+    if ( !inetAddr )
+        {
+        TInt index = 0;
+        TBool found = ETrue;
+        while( found && index < mediaLines.Count() )
+            {
+            RPointerArray<CSdpConnectionField>& connfields = 
+                                                mediaLines[index]->ConnectionFields();
+            
+            if ( mediaLines[index++]->Port() > 0 )
+                {
+	            TInt cfindex = 0;
+	            TBool cffound = EFalse;
+	            while( !cffound && cfindex < connfields.Count() )
+	                {
+	                inetAddr = connfields[cfindex++]->InetAddress();
+	                cffound = MCE_NOT_NULL_PTR( inetAddr );
+	                }
+	            found = cffound;
+                }
+            }
+        }
         
     if ( inetAddr )
         {
--- a/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmcemediamanager/src/mcesrvstream.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -37,6 +37,7 @@
 #include "mcedisplaysink.h"
 #include "mcecamerasource.h"
 
+#include <mcemessagestream.h>
 #include "mceaudiostream.h"
 #include "mcevideostream.h"
 #include "mcesrvstreamiterator.h"
@@ -44,6 +45,10 @@
 #include "mcedtmfcodec.h"
 #include "mcemmlogs.h"
 #include "mcedtmfhandler.h"
+#include "mcecommessagestream.h"
+#include "mcecommessagecodec.h"
+#include "mceexternalsource.h"
+#include "mceexternalsink.h"
 
 #define MCE_MCC_STREAM_STATE_CHANGE_EVENT( event )\
 ( aEvent.iEvent == KMccStreamPrepared || \
@@ -82,6 +87,13 @@
             DecodeVideoL( aStreams, video, aManager );
             break;
             }
+        case KMceMessage:
+            {
+            CMceComMessageStream& message =
+                reinterpret_cast<CMceComMessageStream&>(aStream);
+            DecodeMessageL(aStreams, message, aManager); 
+            break;
+            }
         default:
             {
             User::Leave( KErrNotSupported );
@@ -94,6 +106,49 @@
 
 
 // -----------------------------------------------------------------------------
+// CMceSrvStream::DecodeMessageL
+// -----------------------------------------------------------------------------
+
+void CMceSrvStream::DecodeMessageL( RPointerArray<CMceSrvStream>& aStreams,
+                                  CMceComMessageStream& aMessage,
+                                  CMceMediaManager& aManager )
+    {
+    MCEMM_DEBUG("CMceSrvStream::DecodeMessageL(), Entry ");
+    
+//Data path for Message stream is handled
+    if(aMessage.Source()->Type() != KMceExternalSource )
+        {
+        for( TInt codecNdx = 0;codecNdx < aMessage.CodecCount();codecNdx++ )
+            {
+            aMessage.CodecL( codecNdx )->SetEnabled( codecNdx == 0 || IS_RECEIVESTREAM( &aMessage ) );
+                
+            for( TInt sinkNdx = 0 ; sinkNdx < aMessage.Sinks().Count() ; sinkNdx++ )
+                {
+                if(aMessage.Sinks()[ sinkNdx ]->Type() == KMceExternalSink)
+                    {
+                    return;
+                    }
+                CMceSrvStream* srvStream = NewL( aManager, aMessage, 
+                                                 *aMessage.Source(),
+                                                 *aMessage.Sinks()[ sinkNdx ],
+                                                 *aMessage.CodecL( codecNdx ) );
+                    CleanupStack::PushL( srvStream );
+                    MCEMM_DEBUG_STREAM( "CMceSrvStream::DecodeMessageL(): decoded message", *srvStream );
+                    aStreams.AppendL( srvStream );
+                    CleanupStack::Pop( srvStream );
+                }
+            }
+        if ( aMessage.BoundStream() && aMessage.Binder() )
+            {
+            DecodeL( aStreams, aMessage.BoundStreamL(), aManager );
+            }
+        }
+
+    MCEMM_DEBUG("CMceSrvStream::DecodeMessageL(), Exit ");
+    }
+
+
+// -----------------------------------------------------------------------------
 // CMceSrvStream::DecodeAudioL
 // -----------------------------------------------------------------------------
 //
@@ -686,6 +741,33 @@
     {
     Data()().SetLinkId( aLinkId );
     }
+
+// -----------------------------------------------------------------------------
+// CMceSrvStream::RemMsrpPath
+// -----------------------------------------------------------------------------
+//
+TDes8 & CMceSrvStream::RemMsrpPath() const
+    {
+    return Data().iRemoteMsrpPath;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceSrvStream::RemMsrpPath
+// -----------------------------------------------------------------------------
+//
+TDes8 & CMceSrvStream::ConnStatus() const
+    {
+    return Data().iConnStatus;
+    }
+
+// -----------------------------------------------------------------------------
+// CMceSrvStream::SetLinkId
+// -----------------------------------------------------------------------------
+//
+void CMceSrvStream::SetMsrpPath( TDesC8& aLocalMsrpPath )
+    {
+    Data()().SetLocalMsrpPath(aLocalMsrpPath);
+    }
     
     
 // -----------------------------------------------------------------------------
@@ -898,17 +980,20 @@
         MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): codec requires signalling");
         action = KMceRequiresSignalling;
         }
-    else if ( LocalMediaPort() != aCurrent.LocalMediaPort() )
+    
+    else if ( Codec().MccRequireSignalling( *this, aCurrent, aMccCurentCodec, aMccUpdateCodec ) )
+        {
+        MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): codec requires signalling");
+        action = KMceRequiresSignalling;
+        }
+    
+    else if ( LocalMediaPort() != aCurrent.LocalMediaPort() ||
+              Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) )
     //local port has changed => needs new media session & signaling
         {
         MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): local port changed. requires signalling");
         action = KMceRequiresSignalling;
         }
-    else if ( Data().RemoteMediaPortChanged( aCurrent.Data().RemoteMediaPort() ) )
-    	{
-    	MCEMM_DEBUG("CMceSrvStream::RequireSignalling(): Remote port changed. requires signalling");
-    	action = KMceRequiresSipSignallingOnly;
-    	}
         
     else if ( Data().RemoteRTCPAddressChanged(aCurrent.Data().iRemoteRtcpPort, 
     		 	aCurrent.Data().iRemoteRtcpAddress))
--- a/multimediacommsengine/mmcesrv/mmceserver/src/mceactionset.cpp	Mon Aug 23 17:50:26 2010 +0300
+++ b/multimediacommsengine/mmcesrv/mmceserver/src/mceactionset.cpp	Mon Sep 06 17:32:13 2010 +0530
@@ -2344,6 +2344,13 @@
     	ids.iState = aMccEvent->iItcData;
     	ids.iStatus = aMccEvent->iError;
 
+        // For file transfer events
+        if (aMccEvent->iEvent == KMccFileSendProgressNotification ||
+                aMccEvent->iEvent == KMccFileReceiveProgressNotification)
+            {
+            ids.iSpare1 = aMccEvent->iEventData1;
+            ids.iSpare2 = aMccEvent->iEventData2;
+            }
         iSession.SendToClient( ids );
         }
     else