diff -r 33a5d2bbf6fc -r 73a1feb507fb mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipservertransaction.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/sipclientstub/src/Csipservertransaction.cpp Tue Aug 31 15:12:07 2010 +0300 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +#include "sipservertransaction.h" +#include "siprequestelements.h" +#include "sipresponseelements.h" +#include +#include +#include "CSipSseTestTls.h" + + +EXPORT_C CSIPServerTransaction::~CSIPServerTransaction() + { + delete iRequestElements; + } + + +CSIPServerTransaction::CSIPServerTransaction( RStringF aType ) + : CSIPTransactionBase( aType, EFalse ) + { + } + + +EXPORT_C CSIPServerTransaction* CSIPServerTransaction::NewL( RStringF aType ) + { + return new(ELeave)CSIPServerTransaction( aType ); + } + + +EXPORT_C void CSIPServerTransaction::SetRequestElements( + CSIPRequestElements* aElements) + { + if( iRequestElements ) + { + delete iRequestElements; + } + + iRequestElements = aElements; + } + + +EXPORT_C void CSIPServerTransaction::SendResponseL( + CSIPResponseElements *aElements) + { + CSipSseTestTls* tls = CSipSseTestTls::Storage(); + if ( tls ) + { + User::LeaveIfError( tls->Error() ); + // tls->SIPSends( Type(), aElements ); + } + else + { + delete aElements; + } + } + + +EXPORT_C const CSIPRequestElements* CSIPServerTransaction::RequestElements() const + { + return iRequestElements; + } + +EXPORT_C TBool CSIPServerTransaction::ResponseAllowed() const + { + if ( Type() == SIPStrings::StringF( SipStrConsts::EAck ) ) + { + return EFalse; + } + else + { + return ETrue; + } + }