|
1 // Copyright (c) 2007-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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Contains declaration of CHttpEboClientStep class |
|
15 // @internalAll |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __TEST_HTTP_EBOCLIENT_STEP_H__ |
|
20 #define __TEST_HTTP_EBOCLIENT_STEP_H__ |
|
21 |
|
22 //System Include |
|
23 #include "testhttpbasestep.h" |
|
24 #include <http/mhttpdataoptimiser.h> |
|
25 |
|
26 /** |
|
27 This is the eboclient to test the ebo functionality. |
|
28 @internalTechnology |
|
29 @test |
|
30 */ |
|
31 |
|
32 class CHttpEboClientStep : public CTestHttpBaseStep, public MHttpDataOptimiser |
|
33 { |
|
34 public: |
|
35 virtual ~CHttpEboClientStep(); |
|
36 CHttpEboClientStep(); |
|
37 |
|
38 //These methods from MHttpDataOptimiser |
|
39 void EncodeL (const TDesC8& aHttpData, HBufC8*& aEncodedData); |
|
40 void DecodeL (const TDesC8& aData, HBufC8*& aHttpData, TBool& aTransFail); |
|
41 |
|
42 private: |
|
43 void StartClientL(); |
|
44 void InvokeHttpMethodL(const TDesC8& aUri, RStringF aMethod); |
|
45 |
|
46 // methods from MHTTPTransactionCallback |
|
47 void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
48 TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
49 |
|
50 private: |
|
51 TBool iSavingResponseBody; |
|
52 RFile iRespBodyFile; |
|
53 MHTTPDataSupplier* iRespBody; |
|
54 TPtrC iOutputFilename; |
|
55 }; |
|
56 |
|
57 /*@{*/ |
|
58 /// Literal constant defined for identifying step name |
|
59 _LIT(KTestHttpEboClientStep, "TestHttpEboClientStep"); |
|
60 /*@}*/ |
|
61 |
|
62 #endif // __TEST_HTTP_EBOCLIENT_STEP_H__ |