servicediscoveryandcontrol/pnp/test/upnp/unittests/tcpclient/inc/cpipeliningtestcase.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 /*
       
     2 * Copyright (c) 2008 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 
       
    19 #ifndef __CPIPELININGTESTCASE_H__
       
    20 #define __CPIPELININGTESTCASE_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <http.h>
       
    24 
       
    25 #include "mpipeliningtestcase.h"
       
    26 
       
    27 enum THeaderPosition
       
    28 	{
       
    29 	ENoHeader = -1,
       
    30 	EHttpHeader,
       
    31 	EConnectionHeader,
       
    32 	EBatchingHeader,
       
    33 	ETransactionHeader		
       
    34 	};
       
    35 
       
    36 //Forward declarations
       
    37 class CHTTPTestUtils;
       
    38 class CPipeliningTestParams;
       
    39 
       
    40 class CPipeliningTestCase :  public CBase, public MPipeliningTestCase, public MHTTPDataSupplier 
       
    41  
       
    42 
       
    43 	{
       
    44 public:
       
    45 	static CPipeliningTestCase* NewL(CHTTPTestUtils& aTestUtils, CPipeliningTestParams& aPipeliningTestParams);
       
    46 	~CPipeliningTestCase();
       
    47 		
       
    48 private:
       
    49 	CPipeliningTestCase(CHTTPTestUtils& aTestUtils, CPipeliningTestParams& aPipeliningTestParams);
       
    50 
       
    51 	// From MPipeliningTestCase
       
    52 	const TDesC& TestCaseName() const;
       
    53 	TInt TransactionCount(TInt aConnIndex) const;
       
    54 	TInt TotalTransactionCount() const;
       
    55 	RHTTPTransaction GetTransactionL(TInt aIndex, RHTTPSession aSession, MHTTPTransactionCallback& aClient);
       
    56 	const TDesC8& GetRawRequest(TInt aConnectionIndex, TInt aTransIndex);
       
    57 	const TDesC8& GetRawResponse(TInt aConnectionIndex, TInt aTransIndex);
       
    58 	TInt ConnectionCount() const;
       
    59 	void AddConnectionCloseHeaderL(RHTTPTransaction aTransaction);
       
    60 	TInt RealExpectedConnectionCount() const;
       
    61 	TInt ExpectedError(RHTTPTransaction aTrans);
       
    62 	void ProcessHeadersL(RHTTPTransaction aTrans);
       
    63 	TBool EnableBatching() const;
       
    64 	TBool BatchTransactions() const;
       
    65 	void FieldCompareL(TInt aStringPool, TInt aIniFile);
       
    66 	void FieldValueCompareL(RHTTPHeaders headers, TInt xyz, TInt xx, RStringF headerStr);
       
    67 	TInt ErrorVal() const;
       
    68 	
       
    69 	TBool GetNextDataPart(TPtrC8& aDataPart);
       
    70 	void ReleaseData();
       
    71 	TInt OverallDataSize();
       
    72 	TInt Reset();
       
    73 private:
       
    74 	CHTTPTestUtils&			iTestUtils;
       
    75 	CPipeliningTestParams&	iPipeliningTestParams;
       
    76 	
       
    77 	//for testcase 7
       
    78 	RHTTPTransaction		iTransToCancel;
       
    79 	TBool					iIsTransCancelled;
       
    80 	TBool					iBatchingBufferSizeSet;
       
    81 	CHTTPFormEncoder* 		iFormEncoder;
       
    82 		
       
    83 	};
       
    84 	
       
    85 #endif // __CPIPELININGTESTCASE_H__