|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef CCODECENCODETEST_H_ |
|
17 #define CCODECENCODETEST_H_ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <stringpool.h> |
|
21 #include <inetprottextutils.h> |
|
22 #include <utf.h> |
|
23 #include <httpstringconstants.h> |
|
24 #include <http/thttptable.h> |
|
25 #include <http/framework/cheadercodec.h> |
|
26 |
|
27 #include "cupnpmessagetest.h" |
|
28 #include "mparserobserver.h" |
|
29 #include "cupnpresponsecomposer.h" |
|
30 #include "cupnprequestcomposer.h" |
|
31 #include "rhttpheaders.h" |
|
32 #include "CResponse.h" |
|
33 #include "CRequest.h" |
|
34 |
|
35 |
|
36 _LIT(KCodecEncodeTest, "CodecEncodeTest"); |
|
37 |
|
38 class CCodecEncodeTest: public CTestStep, |
|
39 public MComposerObserver |
|
40 { |
|
41 public: |
|
42 static CCodecEncodeTest* NewL(); |
|
43 CCodecEncodeTest(); |
|
44 ~CCodecEncodeTest(); |
|
45 |
|
46 public: |
|
47 TVerdict doTestStepPreambleL(); |
|
48 TVerdict doTestStepL(); |
|
49 TVerdict doTestStepPostambleL(); |
|
50 |
|
51 private: |
|
52 void ConstructHeadersL(const TInt aNoOfHdrValPairs); |
|
53 void SetHeaderL(const TDesC8& aHeader, const TDesC8& aValue); |
|
54 void GetFieldL(); |
|
55 |
|
56 private: // methods from MParserObserver |
|
57 virtual void MessageDataReadyL(RBuf8& aData); |
|
58 virtual void ComposingConcluded(); |
|
59 virtual void ComposerError(TInt aError); |
|
60 |
|
61 private: |
|
62 CUpnpResponseComposer* iRespComposer; |
|
63 CUpnpRequestComposer* iReqComposer; |
|
64 CActiveScheduler* iSched; |
|
65 RStringPool iPool; |
|
66 RHTTPHeaders iRHeaders; |
|
67 CRequest* iRequest; |
|
68 CResponse* iResponse; |
|
69 CHeaderCodec* iCodec; |
|
70 }; |
|
71 |
|
72 #endif /*CCODECENCODETEST_H_*/ |