|
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 // |
|
15 |
|
16 /** |
|
17 @file csrvaddrval.h |
|
18 @internalTechnology |
|
19 */ |
|
20 |
|
21 #ifndef __CSRVADDRVAL_H__ |
|
22 #define __CSRVADDRVAL_H__ |
|
23 |
|
24 // User includes |
|
25 #include "TestScripts.h" |
|
26 #include "HttpTestCore.h" |
|
27 |
|
28 // Constants used in the test harness. |
|
29 // These constants define the maximum length of the host name and Url / Uri |
|
30 #define KMaxHostNameBufSize 256 |
|
31 #define KMaxUrlBufSize 1024 |
|
32 |
|
33 /** |
|
34 Class definition which has functions to replace the value of the server IP |
|
35 / Name in a Url / Uri by retrieving the value from settings.ini file. The |
|
36 settings.ini file has the details of the servers existing in the test |
|
37 environment (internal URIs or IP addresses). |
|
38 */ |
|
39 class TSrvAddrVal |
|
40 { |
|
41 public: |
|
42 // This function is called from the test harnesses to replace the host name |
|
43 // in the Url/Uri that is going to be used by the test case. |
|
44 IMPORT_C static HBufC8* ReplaceHostNameL(const TDesC8& aUrlToBeModified, CScriptFile* aIniSettingsFile); |
|
45 IMPORT_C static HBufC16* ReplaceHostNameL(const TDesC16& aUrlToBeModified, CScriptFile* aIniSettingsFile); |
|
46 // This functions converts a 8 bit descriptor to 16 bit descriptor and logs it |
|
47 // to the log file. This function is written since LogIt() function takes a |
|
48 // 16 bit descriptor as input and it cannot be overloaded due to BC issue. |
|
49 IMPORT_C static void LogUsing8BitDesL(CHttpTestEngine* aEngine, const TDesC8& aModify8BitDesC); |
|
50 }; |
|
51 |
|
52 #endif // __CSRVADDRVAL_H__ |