tsrc/sipclientstub/src/Csiptransactionbase.cpp
changeset 15 ccd8e69b5392
parent 2 b31261fd4e04
child 20 e8be2c2e049d
child 22 496ad160a278
equal deleted inserted replaced
2:b31261fd4e04 15:ccd8e69b5392
     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 #include "musunittesting.h"
       
    23 
       
    24 CSIPTransactionBase::~CSIPTransactionBase()
       
    25 	{
       
    26 	delete iResponseElements;
       
    27 	}
       
    28 
       
    29 CSIPTransactionBase::CSIPTransactionBase( RStringF aType, TBool aIsCliTrx )
       
    30   : iType(aType),
       
    31     iIsClientTransaction(aIsCliTrx),
       
    32     iState(ETrying)
       
    33 	{
       
    34 	    
       
    35 	if ( iIsClientTransaction && iType == SIPStrings::StringF( SipStrConsts::EInvite ) )
       
    36 	    {
       
    37 	    iState = ECalling;
       
    38 	    }
       
    39 	}
       
    40 
       
    41 EXPORT_C TBool CSIPTransactionBase::operator==(const CSIPTransactionBase& aTransactionBase) const
       
    42 	{
       
    43 	return (this == &aTransactionBase);
       
    44 	}
       
    45 
       
    46 EXPORT_C CSIPTransactionBase::TState CSIPTransactionBase::StateL()
       
    47 	{
       
    48 	return iState;
       
    49 	}
       
    50 
       
    51 EXPORT_C RStringF CSIPTransactionBase::Type() const 
       
    52     {
       
    53     return iType;
       
    54     }
       
    55 
       
    56 EXPORT_C TBool CSIPTransactionBase::IsSIPClientTransaction() const
       
    57     {
       
    58     return iIsClientTransaction;
       
    59     }
       
    60 
       
    61 void CSIPTransactionBase::ChangeState( CSIPTransactionBase::TState aNextState )
       
    62     {
       
    63     iState = aNextState;
       
    64     } 
       
    65     
       
    66 void CSIPTransactionBase::Detach(const MTransactionAssociation& /*aAssociation*/)
       
    67     {
       
    68     }
       
    69