|
1 // Copyright (c) 2002-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 // This is the header file for MultiHoming ResolveName step |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 */ |
|
21 |
|
22 #if !defined (__TS_RESOLVENAME_H__) |
|
23 #define __TS_RESOLVENAME_H__ |
|
24 |
|
25 #include "TS_MultiHomingStep.h" |
|
26 #include "TS_MultiHomingSuite.h" |
|
27 |
|
28 enum EResolverState |
|
29 /** |
|
30 * Enum for internal state of the resolver |
|
31 */ |
|
32 { |
|
33 EResReady //< Resolver ready |
|
34 ,EWaitingForResult |
|
35 ,EResComplete //< Name resolution complete |
|
36 }; |
|
37 |
|
38 |
|
39 class CTS_ResolveName; |
|
40 |
|
41 class CResolveName : public CActive |
|
42 { |
|
43 public: |
|
44 |
|
45 static CResolveName* NewL(); |
|
46 virtual ~CResolveName(); |
|
47 |
|
48 // From CActive |
|
49 void RunL(); |
|
50 void DoCancel(); |
|
51 |
|
52 TInt DoResolution(TName aHostName, TConnDetails *aConn, TInt aProtocol, |
|
53 CTS_ResolveName *aOwnerStep, TBool aExplicitResolve); |
|
54 TInt GetResult(){return iResolverResult;} |
|
55 private: |
|
56 CResolveName() : CActive(EPriorityNormal), iOwnerStep(0), iTConnection(0) {} |
|
57 void ConstructL(); |
|
58 |
|
59 private: |
|
60 TNameEntry iResultingName; |
|
61 RHostResolver iResolver; |
|
62 TInt iResolverResult; |
|
63 TName iHostName; |
|
64 CTS_MultiHomingStep *iOwnerStep; |
|
65 TConnDetails *iTConnection; //< The connection that has been started |
|
66 EResolverState iState; //< Current state of the resolver |
|
67 RSocketServ iResolverSS; // Socket server when for implicit resolve. |
|
68 TBool iResolverHasSS; |
|
69 |
|
70 }; |
|
71 /****************************************************** |
|
72 * Resolves a hostname to an ip address |
|
73 */ |
|
74 class CTS_ResolveName : public CTS_MultiHomingStep |
|
75 { |
|
76 public: |
|
77 CTS_ResolveName(); |
|
78 virtual ~CTS_ResolveName(); // final |
|
79 virtual enum TVerdict doTestStepL( ); |
|
80 |
|
81 private: |
|
82 |
|
83 enum TVerdict doTestStepPreambleL(); |
|
84 }; |
|
85 |
|
86 |
|
87 #endif |
|
88 // __TS_RESOLVENAME_H__ |
|
89 |