|
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: Leon.Clarke@symbian.com |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __TC8_H__ |
|
19 #define __TC8_H__ |
|
20 |
|
21 #include "HttpTestCore.h" |
|
22 #include <http.h> |
|
23 #include <http/mhttpauthenticationcallback.h> |
|
24 #include "csrvaddrval.h" |
|
25 |
|
26 /** |
|
27 * like TC5 a completed transaction is simulated but with basic authentication |
|
28 */ |
|
29 class CHttpTestCase8: public CHttpTestTransBase, public MHTTPTransactionCallback, public MHTTPAuthenticationCallback |
|
30 { |
|
31 //to implement in this class' member functs definitions |
|
32 public: |
|
33 CHttpTestCase8(CScriptFile* aIniSettingsFile); |
|
34 virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) ; |
|
35 virtual TInt MHFRunError(TInt aError,RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
36 // From MHTTPAuthenticationCallback. |
|
37 virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, RStringF aAuthenticationType, RString& aUsername, RString& aPassword); |
|
38 |
|
39 virtual ~CHttpTestCase8(); |
|
40 private: |
|
41 const TDesC& TestName(); |
|
42 virtual void DoRunL(); |
|
43 virtual TInt RunError(TInt aErr); |
|
44 virtual void DoCancel(); |
|
45 protected: |
|
46 void CompleteOwnRequest(); |
|
47 private: |
|
48 /** This has the instance of the settings.ini file. This instance is passed |
|
49 to ReplaceHostNameL() function which uses this instance to retrieve the |
|
50 data from settings.ini file. |
|
51 */ |
|
52 CScriptFile* iIniSettingsFile; |
|
53 }; |
|
54 |
|
55 #endif |