applayerprotocols/httptransportfw/Test/TestScriptTest/CPipeliningConfigTest.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2003-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 	__CPIPELININGCONFIGTEST_H__
       
    17 #define 	__CPIPELININGCONFIGTEST_H__
       
    18 
       
    19 
       
    20 
       
    21 #include "MPipeliningTestCase.h"
       
    22 
       
    23 /* This is a configurable test used for testing the configuration of pipelining in the
       
    24    HTTP Framework
       
    25    
       
    26    This test harness does not support testing of proxies
       
    27    
       
    28    It is used by creating a test and then optionally setting the max number of transactions
       
    29    to pipeline and/or the Max Number of Transport Handlers (effectively the maximum number of connections)
       
    30 */
       
    31 class CPipeliningConfigTest : public CBase, public MPipeliningTestCase
       
    32 	{
       
    33 public:
       
    34 	static CPipeliningConfigTest* NewLC(const TDesC& aTestName);
       
    35 	~CPipeliningConfigTest();
       
    36 	
       
    37 	void SetMaxNumberTransactionsToPipeline(TInt aMaxNumberTransactionsToPipeline);
       
    38 	void SetMaxNumberTransportHandlers(TInt aMaxNumberTransportHandlers);
       
    39 	void AddTransactionUrisL(const TDesC8& aUri, TInt aRepeatNumber = 1);
       
    40 	void ClearTransactionUris();
       
    41 	void SetExpectedNumberConnections(TInt aExpectedNumberConnections);
       
    42 	
       
    43 // from MPipeliningTestCase	
       
    44 	virtual const TDesC& TestCaseName() const;
       
    45 	virtual TInt TotalTransactionCount() const;
       
    46 	virtual TInt TransactionCount(TInt aConnectionIndex) const;
       
    47 	virtual RHTTPTransaction GetTransactionL(TInt aIndex, RHTTPSession aSession, 
       
    48 											 MHTTPTransactionCallback& aClient);
       
    49 	virtual TBool BatchTransactions() const;
       
    50 	virtual TInt ExpectedError(RHTTPTransaction aTrans);
       
    51 	virtual const TDesC8& GetRawRequest(TInt aConnectionIndex, TInt aTransIndex);
       
    52 	virtual const TDesC8& GetRawResponse(TInt aConnectionIndex, TInt aTransIndex);
       
    53 	virtual TInt ConnectionCount() const;
       
    54 	TInt RealExpectedConnectionCount() const;
       
    55 	virtual TBool EnableBatching() const;
       
    56 	virtual void ProcessHeadersL(RHTTPTransaction aTrans);
       
    57 	virtual TInt ErrorVal() const;
       
    58 
       
    59 private:
       
    60 	CPipeliningConfigTest();
       
    61 	void ConstructL(const TDesC& aTestName);
       
    62 	
       
    63 	void CheckAndSetSessionSettingsL(RHTTPSession aSession);
       
    64 
       
    65 private:	
       
    66 	HBufC*	iTestName;
       
    67 	RPointerArray<HBufC8> iTransactionUris;	
       
    68 	TInt iMaxNumberTransactionsToPipeline;
       
    69 	TInt iMaxNumberTransportHandlers;
       
    70 	TInt iExpectedNumberConnections;
       
    71 	};
       
    72 
       
    73 
       
    74 #endif  //	__CPIPELININGCONFIGTEST_H__