mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csiptransactionbase.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 
       
    18 #include "siptransactionbase.h"
       
    19 #include "sipresponseelements.h"
       
    20 #include "sipstrings.h"
       
    21 #include "SipStrConsts.h"
       
    22 
       
    23 CSIPTransactionBase::~CSIPTransactionBase()
       
    24 	{
       
    25 	delete iResponseElements;
       
    26 	}
       
    27 
       
    28 CSIPTransactionBase::CSIPTransactionBase( RStringF aType, TBool aIsCliTrx )
       
    29   : iType(aType),
       
    30     iIsClientTransaction(aIsCliTrx),
       
    31     iState(ETrying)
       
    32 	{
       
    33 	    
       
    34 	if ( iIsClientTransaction && iType == SIPStrings::StringF( SipStrConsts::EInvite ) )
       
    35 	    {
       
    36 	    iState = ECalling;
       
    37 	    }
       
    38 	}
       
    39 
       
    40 EXPORT_C TBool CSIPTransactionBase::operator==(const CSIPTransactionBase& aTransactionBase) const
       
    41 	{
       
    42 	return (this == &aTransactionBase);
       
    43 	}
       
    44 
       
    45 EXPORT_C CSIPTransactionBase::TState CSIPTransactionBase::StateL()
       
    46 	{
       
    47 	return iState;
       
    48 	}
       
    49 
       
    50 EXPORT_C RStringF CSIPTransactionBase::Type() const 
       
    51     {
       
    52     return iType;
       
    53     }
       
    54 
       
    55 EXPORT_C TBool CSIPTransactionBase::IsSIPClientTransaction() const
       
    56     {
       
    57     return iIsClientTransaction;
       
    58     }
       
    59 
       
    60 void CSIPTransactionBase::ChangeState( CSIPTransactionBase::TState aNextState )
       
    61     {
       
    62     iState = aNextState;
       
    63     } 
       
    64     
       
    65 void CSIPTransactionBase::Detach(const MTransactionAssociation& /*aAssociation*/)
       
    66     {
       
    67     }
       
    68