tsrc/sipclientstub/src/Csipconnection.cpp
changeset 0 f0cf47e981f9
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     1 /*
       
     2 * Copyright (c) 2009 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 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #include "sipconnection.h"
       
    18 #include "sip.h"
       
    19 #include "siperr.h"
       
    20 #include "musunittesting.h"
       
    21 
       
    22 CSIPConnection::CSIPConnection(CSIP& aSIP,
       
    23                                TUint32 aIapId,
       
    24                                MSIPConnectionObserver& aObserver)
       
    25  : iIapId(aIapId), iObserver(aObserver), iState(EActive)
       
    26 	{
       
    27 	iSIP = &aSIP;
       
    28 	}
       
    29 
       
    30 void CSIPConnection::ConstructL()
       
    31 	{
       
    32 	}
       
    33 
       
    34 
       
    35 EXPORT_C CSIPConnection* CSIPConnection::NewL(CSIP& aSIP,
       
    36 									 TUint32 aIapId,
       
    37 									 MSIPConnectionObserver& aSIPConnectionObserver)
       
    38 	{
       
    39 
       
    40 	CSIPConnection* self = new(ELeave) CSIPConnection(aSIP, aIapId, aSIPConnectionObserver);
       
    41 	CleanupStack::PushL(self);
       
    42 	self->ConstructL();
       
    43 	CleanupStack::Pop();
       
    44 	return self;
       
    45 
       
    46 	}
       
    47 
       
    48 
       
    49 EXPORT_C CSIPConnection::~CSIPConnection()
       
    50 	{
       
    51 	}
       
    52 
       
    53 EXPORT_C TUint32 CSIPConnection::IapId() const
       
    54 	{
       
    55 	return iIapId;
       
    56 	}
       
    57 	
       
    58 EXPORT_C CSIPConnection::TState CSIPConnection::State() const
       
    59     {
       
    60     return iState; 
       
    61     }	
       
    62 
       
    63 EXPORT_C void CSIPConnection::SetState(TState aState)
       
    64     {
       
    65     iState = aState;
       
    66     }
       
    67     
       
    68 //TODO:Check if these new functions are needed in sip_stub
       
    69 
       
    70 // -----------------------------------------------------------------------------
       
    71 // CSIPConnection::SIP
       
    72 // -----------------------------------------------------------------------------
       
    73 //
       
    74 EXPORT_C CSIP* CSIPConnection::SIP()
       
    75 	{
       
    76 	return iSIP;
       
    77 	}
       
    78  
       
    79 // -----------------------------------------------------------------------------
       
    80 // CSIPConnection::SIP
       
    81 // -----------------------------------------------------------------------------
       
    82 //      
       
    83 EXPORT_C const CSIP* CSIPConnection::SIP() const
       
    84 	{
       
    85 	return iSIP;
       
    86 	}