applayerprotocols/httptransportfw/Test/Acceptance/Iter1/Tc7.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2004-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 // Author: Franco.Bellu@symbian.com
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 #ifndef __TC7_H__
       
    20 #define __TC7_H__
       
    21 
       
    22 #include "HttpTestCore.h"
       
    23 #include <http.h>
       
    24 #include "csrvaddrval.h"
       
    25 
       
    26 /** 
       
    27  * BEHAVIOR TO TEST:The VF to send  a RHTTPEvent::ESucceded event to the 
       
    28  * client.
       
    29  * This  happen when the Request is well formulated and the response from the 
       
    30  * Origin Server has a 2xx or 3xx status code.
       
    31  * The DoRunL() function  simulate such situation: the specified URI  point
       
    32  * to a valid resource.The server's response with a 200 ( ok) status message.
       
    33  * This will cause the VF to send  an ESucceded status message to the client
       
    34  * The MHFRunL() logs the ESucceded status message issued by the Validation 
       
    35  * Filter as soon as it gets the server's response. 
       
    36  * NB: For the purpose of this test case the content of the headers and the 
       
    37  * body won't be showed.
       
    38  */
       
    39 class CHttpTestCase7: public CHttpTestTransBase, public MHTTPTransactionCallback
       
    40 	{
       
    41 	//to implement in this class' member functs definitions
       
    42 public:
       
    43 	CHttpTestCase7(CScriptFile* aIniSettingsFile);
       
    44 	virtual ~CHttpTestCase7();
       
    45 
       
    46 	virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) ;
       
    47 	virtual TInt MHFRunError(TInt aError,RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
       
    48 
       
    49 private:	
       
    50 	const TDesC& TestName();
       
    51 	virtual void DoRunL();
       
    52 	virtual TInt RunError(TInt aErr);
       
    53 	virtual void DoCancel();	
       
    54 	void OpenTestSessionL();
       
    55 	void CloseTestSession();
       
    56 //	virtual const TDesC& TestName();
       
    57 protected:
       
    58 	void CompleteOwnRequest();
       
    59 private:
       
    60 	RHTTPSession iSession;
       
    61 	RHTTPTransaction iTransaction;
       
    62 	RStringF iIpAddr;
       
    63 	/** This has the instance of the settings.ini file.  This instance is passed
       
    64 	 to ReplaceHostNameL() function which uses this instance to retrieve the
       
    65 	 data from settings.ini file.
       
    66 	 */
       
    67 	CScriptFile* iIniSettingsFile;
       
    68 	};
       
    69 
       
    70 
       
    71 #endif