Msrp/MsrpClient/src/CMSRP.cpp
branchMSRP_FrameWork
changeset 25 505ad3f0ce5c
child 58 cdb720e67852
equal deleted inserted replaced
22:f1578314b8da 25:505ad3f0ce5c
       
     1 /*
       
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html."
       
     8 * Initial Contributors:
       
     9 * Nokia Corporation - initial contribution.
       
    10 * Contributors:
       
    11 *
       
    12 * Description:
       
    13 * MSRP Implementation
       
    14 *
       
    15 */
       
    16 
       
    17 //  Include Files
       
    18 #include "MsrpCommon.h"
       
    19 #include "CMSRP.h"
       
    20 #include "CMSRPImplementation.h"
       
    21 
       
    22 
       
    23 //  Member Functions
       
    24 
       
    25 EXPORT_C CMSRP* CMSRP::NewL( const TUid& aUid )
       
    26     {
       
    27     MSRPLOG("CMSRP.. NewL");
       
    28     CMSRP* self = CMSRP::NewLC(aUid);
       
    29     CleanupStack::Pop(self);
       
    30     return self;
       
    31     }
       
    32 
       
    33 EXPORT_C CMSRP* CMSRP::NewLC( const TUid& aUid )
       
    34     {
       
    35     MSRPLOG("CMSRP.. NewLC");
       
    36     CMSRP* self = new (ELeave) CMSRP;
       
    37     CleanupStack::PushL(self);
       
    38     self->ConstructL(aUid);
       
    39     return self;
       
    40     }
       
    41 
       
    42 EXPORT_C void CMSRP::ConstructL( const TUid& aUid )
       
    43     {
       
    44     MSRPLOG("CMSRP.. ConstructL");
       
    45     iMSRPImpl = CMSRPImplementation::NewL(aUid);	
       
    46     }
       
    47 
       
    48 EXPORT_C CMSRP::~CMSRP()
       
    49     {
       
    50     MSRPLOG("CMSRP.. Dtor");
       
    51     if(NULL!=iMSRPImpl)
       
    52 		delete iMSRPImpl;
       
    53     }
       
    54 
       
    55 EXPORT_C CMSRPSession* CMSRP::CreateMSRPSessionL( MMSRPSessionObserver& aObserver, 
       
    56                                                  const TUint aIapId )
       
    57 	{
       
    58 		// Creates and Returns a MSRP Session. 
       
    59 		// No paramers are taken at this stage. Primarily because 
       
    60 		// this is the first step the MSRP user is expected to do before 
       
    61 		// SDP negotiation. 
       
    62 		// At this stage the user expects to get the session-id, 
       
    63 		// avaible trasport etc.
       
    64 	
       
    65 	MSRPLOG("CMSRP.. Create MSRP session");
       
    66 
       
    67 	return iMSRPImpl->CreateMSRPSessionL( aObserver, aIapId );
       
    68 	}
       
    69 
       
    70 EXPORT_C void CMSRP::CloseMSRPSession( CMSRPSession* aMsrpSession )
       
    71     {
       
    72     
       
    73     MSRPLOG("CMSRP.. Close MSRP session");
       
    74 
       
    75     return iMSRPImpl->CloseMSRPSession( aMsrpSession );
       
    76     }
       
    77 
       
    78 
       
    79