Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * DNS queries and results classes inline functions implementation
28 #ifndef __DNS_QRY_INL__
29 #define __DNS_QRY_INL__
32 inline TDnsQuery::TDnsQuery()
37 iQryType = KDnsRRTypeInvalid;
38 iQryClass = KDnsRRClassIN; // Internet class, default value
41 inline TDnsQuery::TDnsQuery(const TDesC8& aQryDomainName, TUint16 aType, TUint16 aClass/*=KDnsRRClassIN*/)
45 @param aQryDomainName DNS query data (buffer)
46 @param aType DNS query code
47 @param aClass Internet class
51 iQryClass = aClass; // Internet class, default value
52 iQryData.Copy(aQryDomainName);
55 inline TUint16 TDnsQuery::Type() const
63 inline TUint16 TDnsQuery::Class() const
71 inline const TDesC8& TDnsQuery::Data() const
73 @return const reference to the DNS query data
79 inline void TDnsQuery::SetType(TUint16 aType)
81 Sets the value of DNS RR type
82 @param aType DNS RR type
88 inline void TDnsQuery::SetClass(TUint16 aClass)
90 Sets the value of DNS RR class
91 @param aClass DNS RR class
97 inline void TDnsQuery::SetData(const TDesC8& aData)
99 Sets the value of the DNS query data
100 @param aData const reference to the DNS query data
103 iQryData.Copy(aData);
107 //-------------------------------------------------------------------------------------
109 inline TDnsQryRespBase::TDnsQryRespBase(TUint16 aRespType, TUint16 aRespClass)
110 : iRespType(aRespType), iRespClass(aRespClass)
114 @param aRespType RR type
115 @param aRespClass RR Class
121 inline TUint16 TDnsQryRespBase::RRType() const
123 @return RR type from DNS response message
129 inline TUint16 TDnsQryRespBase::RRClass() const
131 @return RR class from DNS response message
137 inline TUint32 TDnsQryRespBase::RRTtl() const
139 @return RR TTL from DNS response message
145 inline void TDnsQryRespBase::SetRRTtl(TUint32 aRRTtl)
147 Sets the value of RR TTL in the DNS response message
154 inline TDnsRespSRV::TDnsRespSRV()
155 :TDnsQryRespBase(KDnsRRTypeSRV, KDnsRRClassIN)
165 inline const TDesC8& TDnsRespSRV::Target() const
167 @return domain name of the target host.
173 inline TUint16 TDnsRespSRV::Priority() const
175 @return The priority of this target host
181 inline TUint16 TDnsRespSRV::Weight() const
183 @return the value of the weight field
189 inline TUint16 TDnsRespSRV::Port() const
197 inline void TDnsRespSRV::SetTarget(const TDesC8& aTarget)
199 Sets the domain name of the target host.
200 @param aTarget Domain name of the target host.
203 iTarget.Copy(aTarget);
206 inline void TDnsRespSRV::SetPriority(TUint16 aPriority)
208 Sets The priority of this target host
209 @param aPriority The priority of this target host
212 iPriority = aPriority;
215 inline void TDnsRespSRV::SetWeight(TUint16 aWeight)
217 Sets the value of the weight field
218 @param aWeight The value of the weight field
224 inline void TDnsRespSRV::SetPort(TUint16 aPort)
226 Sets the value of the port number
227 @param aPort port number
233 //-------------------------------------------------------------------------------------
235 inline const TInetAddr& TDnsRespA::HostAddress() const
237 @return Resolved Host Address
243 inline void TDnsRespA::SetHostAddress(const TInetAddr& aInetAddr)
245 Sets the value of the resolved Host Address
246 @param aInetAddr The resolved Host Address
249 iInetAddr = aInetAddr;
252 inline const TInetAddr& TDnsRespAAAA::HostAddress() const
254 @return Resolved Host Address
260 inline void TDnsRespAAAA::SetHostAddress(const TInetAddr& aInetAddr)
262 Sets the value of the resolved Host Address
263 @param aInetAddr The resolved Host Address
266 iInetAddr = aInetAddr;
269 inline const TDesC8& TDnsRespPTR::HostName() const
271 @return The domain name string descriptor
277 inline void TDnsRespPTR::SetHostName(const TDesC8& aHostName)
279 Sets the value of the domain name
280 @param aHostName The domain name string descriptor
283 iName.Copy(aHostName);
286 inline TDnsRespNAPTR::TDnsRespNAPTR()
287 : TDnsQryRespBase(KDnsRRTypeNAPTR, KDnsRRClassIN)
296 inline TUint16 TDnsRespNAPTR::Order() const
298 @return Order field value
304 inline TUint16 TDnsRespNAPTR::Pref() const
306 @return Preference field value
312 inline const TDesC8& TDnsRespNAPTR::Flags() const
314 @return Flags string descriptor
320 inline const TDesC8& TDnsRespNAPTR::Service() const
322 @return service name(s) available down this rewrite path.
328 inline const TDesC8& TDnsRespNAPTR::Regexp() const
336 inline const TDesC8& TDnsRespNAPTR::Replacement() const
338 @return Replacement field
344 inline void TDnsRespNAPTR::SetOrder(TUint16 aOrder)
346 Sets the value of Order field
347 @param aOrder Order field value
353 inline void TDnsRespNAPTR::SetPref(TUint16 aPref)
355 Sets the value of Preference field
356 @param aPref Preference field value
362 inline void TDnsRespNAPTR::SetFlags(const TDesC8& aFlags)
364 Sets the value of Flags string
365 @param aFlags Flags string
371 inline void TDnsRespNAPTR::SetService(const TDesC8& aService)
373 Sets the value of service name(s) available
374 @param aService service name(s) available
380 inline void TDnsRespNAPTR::SetRegexp(const TDesC8& aRegexp)
382 Sets the value of Regexp field
383 @param aRegexp Regexp field value
389 inline void TDnsRespNAPTR::SetReplacement(const TDesC8& aReplacement)
391 Sets the value of Replacement field
392 @param aReplacement Replacement field value
395 iReplacement = aReplacement;
398 inline TUint16 TDnsRespMX::Pref() const
400 @return Preference field value
406 inline const TDesC8& TDnsRespMX::HostName() const
408 @return Host name descriptor
414 inline void TDnsRespMX::SetPref(TUint16 aPref)
416 Sets the value of Preference field
417 @param aPref Preference field value
423 inline void TDnsRespMX::SetHostName(const TDesC8& aHostName)
425 Sets the value of Host name.
426 @param aHostName Host name.
429 iHostName = aHostName;
432 #endif //__DNS_QRY_INL__