diff -r 000000000000 -r f5a58ecadc66 servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecencodetest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/servicediscoveryandcontrol/pnp/test/upnp/unittests/upnpmessagetest/inc/ccodecencodetest.h Tue Feb 02 01:12:20 2010 +0200 @@ -0,0 +1,72 @@ +// Copyright (c) 2008-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: +// + +#ifndef CCODECENCODETEST_H_ +#define CCODECENCODETEST_H_ + +#include +#include +#include +#include +#include +#include +#include + +#include "cupnpmessagetest.h" +#include "mparserobserver.h" +#include "cupnpresponsecomposer.h" +#include "cupnprequestcomposer.h" +#include "rhttpheaders.h" +#include "CResponse.h" +#include "CRequest.h" + + +_LIT(KCodecEncodeTest, "CodecEncodeTest"); + +class CCodecEncodeTest: public CTestStep, + public MComposerObserver + { +public: + static CCodecEncodeTest* NewL(); + CCodecEncodeTest(); + ~CCodecEncodeTest(); + +public: + TVerdict doTestStepPreambleL(); + TVerdict doTestStepL(); + TVerdict doTestStepPostambleL(); + +private: + void ConstructHeadersL(const TInt aNoOfHdrValPairs); + void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue); + void GetFieldL(); + +private: // methods from MParserObserver + virtual void MessageDataReadyL(RBuf8& aData); + virtual void ComposingConcluded(); + virtual void ComposerError(TInt aError); + +private: + CUpnpResponseComposer* iRespComposer; + CUpnpRequestComposer* iReqComposer; + CActiveScheduler* iSched; + RStringPool iPool; + RHTTPHeaders iRHeaders; + CRequest* iRequest; + CResponse* iResponse; + CHeaderCodec* iCodec; + }; + +#endif /*CCODECENCODETEST_H_*/