49 { |
49 { |
50 public: |
50 public: |
51 // |
51 // |
52 // MDnsSession API (methods callable by resolver) |
52 // MDnsSession API (methods callable by resolver) |
53 // (documented in the mixin class) |
53 // (documented in the mixin class) |
54 virtual TInt NewQuery(const TDnsMessage &aQuery, TDnsServerScope aServerScope, TUint32 aFlags, TBool aSuffixSupportEnabled); |
54 virtual TInt NewQuery(const TDnsMessage &aQuery, TDnsServerScope aServerScope, TUint32 aFlags); |
55 virtual void CancelQuery(); |
55 virtual void CancelQuery(); |
56 virtual TInt DoQueryL(const TTime &aRequestTime, const EDnsQType aQType); |
56 virtual TInt DoQueryL(const TTime &aRequestTime, const EDnsQType aQType); |
57 virtual TInt DoNext(TDnsMessageBuf &aReply, TInt aNext) const; |
57 virtual TInt DoNext(TDnsMessageBuf &aReply, TInt aNext) const; |
58 void DoError(TInt aError, TUint aTTL); |
58 void DoError(TInt aError, TUint aTTL); |
59 virtual TBool PickNewServer(); |
59 virtual TBool PickNewServer(); |
116 // Callback section |
116 // Callback section |
117 MDnsResolver *iCallback; |
117 MDnsResolver *iCallback; |
118 // "Owner" source |
118 // "Owner" source |
119 CDndDnsclient *iOwner; //< Actual owner of the request data |
119 CDndDnsclient *iOwner; //< Actual owner of the request data |
120 |
120 |
121 TUint iNetworkId; //< NetworkId from the request message. |
121 TUint iNetworkId; //< NetworkId from the request message. |
122 RInetSuffixList iSuffixList; //< Container to store the domain search list on the interface where the query is sent |
|
123 TBool iIsIncompleteHostName; //< Flag sent on the query to identify queries that need to retried on suffixes |
|
124 TBool iCanResolveIncompleteName; //< Flag to confirm incomplete name without domain suffix tried for resolution as it is |
|
125 THostName iActualQueryName; //< To store actual query name while domain suffixes are being applied |
|
126 TBool iPendingSuffixExist; //< Flag set when suffixes are exhausted |
|
127 TInt iFlowReqType; //< Differentiates IMPLICIT/EXPLICIT |
|
128 TBool iSuffixSupportEnabled; //< Flag to switch ON/OFF the suffix support |
|
129 }; |
122 }; |
130 |
123 |
131 class TInetAddressInfo; |
124 class TInetAddressInfo; |
132 class CDndDnsclient : public CDnsSocket, public MDnsSource |
125 class CDndDnsclient : public CDnsSocket, public MDnsSource |
133 { |
126 { |
156 protected: |
149 protected: |
157 // Received a Query Message from some server -- ignore by default |
150 // Received a Query Message from some server -- ignore by default |
158 void Query(const TMsgBuf &/*aBuf*/, const TInetAddr &/*aServer*/, const RSocket &/*aSocket*/) {} |
151 void Query(const TMsgBuf &/*aBuf*/, const TInetAddr &/*aServer*/, const RSocket &/*aSocket*/) {} |
159 // Received an error indication for a server |
152 // Received an error indication for a server |
160 void Error(const TInetAddr &aServer, TInt aError); |
153 void Error(const TInetAddr &aServer, TInt aError); |
161 inline void ActivateSocketL(TUint aNetworkId = 0) { CDnsSocket::ActivateSocketL(aNetworkId); } // lint placebo |
154 inline CDnsSocketWriter * ActivateSocketL(TUint aNetworkId = 0) { return (CDnsSocket::ActivateSocketL(aNetworkId)); } // lint placebo |
162 |
155 |
163 CDndEngine &iControl; //< The DND Engine |
156 CDndEngine &iControl; //< The DND Engine |
164 MDnsServerManager &iServerManager; //< The server manager |
157 MDnsServerManager &iServerManager; //< The server manager |
165 TDndReqData iDndReqData[KDndNumRequests]; //< Requests being served |
158 TDndReqData iDndReqData[KDndNumRequests]; //< Requests being served |
166 TUint iActivityCount; //< Count of activity, shut DNS sockets when ZERO. |
159 //TUint iActivityCount; //< Count of activity, shut DNS sockets when ZERO. |
|
160 TUint iSessionCount; |
|
161 TUint iQueryCount; |
167 CDndCache *iCache; //< The Cache |
162 CDndCache *iCache; //< The Cache |
168 THostNames iHostNames; //< The current hostnames |
163 THostNames iHostNames; //< The current hostnames |
169 }; |
164 }; |
170 |
165 |
171 #endif |
166 #endif |