mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipconnection.cpp
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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 
       
    21 CSIPConnection::CSIPConnection(CSIP& aSIP,
       
    22                                TUint32 aIapId,
       
    23                                MSIPConnectionObserver& aObserver)
       
    24  : iIapId(aIapId), iObserver(aObserver), iState(EActive)
       
    25 	{
       
    26 	iSIP = &aSIP;
       
    27 	}
       
    28 
       
    29 void CSIPConnection::ConstructL()
       
    30 	{
       
    31 	}
       
    32 
       
    33 
       
    34 EXPORT_C CSIPConnection* CSIPConnection::NewL(CSIP& aSIP,
       
    35 									 TUint32 aIapId,
       
    36 									 MSIPConnectionObserver& aSIPConnectionObserver)
       
    37 	{
       
    38 
       
    39 	CSIPConnection* self = new(ELeave) CSIPConnection(aSIP, aIapId, aSIPConnectionObserver);
       
    40 	CleanupStack::PushL(self);
       
    41 	self->ConstructL();
       
    42 	CleanupStack::Pop();
       
    43 	return self;
       
    44 
       
    45 	}
       
    46 
       
    47 
       
    48 EXPORT_C CSIPConnection::~CSIPConnection()
       
    49 	{
       
    50 	}
       
    51 
       
    52 EXPORT_C TUint32 CSIPConnection::IapId() const
       
    53 	{
       
    54 	return iIapId;
       
    55 	}
       
    56 	
       
    57 EXPORT_C CSIPConnection::TState CSIPConnection::State() const
       
    58     {
       
    59     return iState; 
       
    60     }	
       
    61 
       
    62 EXPORT_C void CSIPConnection::SetState(TState aState)
       
    63     {
       
    64     iState = aState;
       
    65     }
       
    66     
       
    67 //TODO:Check if these new functions are needed in sip_stub
       
    68 
       
    69 // -----------------------------------------------------------------------------
       
    70 // CSIPConnection::SIP
       
    71 // -----------------------------------------------------------------------------
       
    72 //
       
    73 EXPORT_C CSIP* CSIPConnection::SIP()
       
    74 	{
       
    75 	return iSIP;
       
    76 	}
       
    77  
       
    78 // -----------------------------------------------------------------------------
       
    79 // CSIPConnection::SIP
       
    80 // -----------------------------------------------------------------------------
       
    81 //      
       
    82 EXPORT_C const CSIP* CSIPConnection::SIP() const
       
    83 	{
       
    84 	return iSIP;
       
    85 	}