Public Member Functions | Public Attributes

nsIDNSRecord Interface Reference

nsIDNSRecord More...

import "nsIDNSRecord.idl";

List of all members.

Public Member Functions

PRNetAddr getNextAddr (in PRUint16 aPort)
 this function copies the value of the next IP address into the given PRNetAddr struct and increments the internal address iterator.
ACString getNextAddrAsString ()
 this function returns the value of the next IP address as a string and increments the internal address iterator.
boolean hasMore ()
 this function returns true if there is another address in the record.
void rewind ()
 this function resets the internal address iterator to the first address in the record.

Public Attributes

readonly attribute ACString canonicalName

Detailed Description

nsIDNSRecord

this interface represents the result of a DNS lookup. since a DNS query may return more than one resolved IP address, the record acts like an enumerator, allowing the caller to easily step through the list of IP addresses.


Member Function Documentation

PRNetAddr nsIDNSRecord::getNextAddr ( in PRUint16  aPort  ) 

this function copies the value of the next IP address into the given PRNetAddr struct and increments the internal address iterator.

Parameters:
aPort A port number to initialize the PRNetAddr with.
Exceptions:
NS_ERROR_NOT_AVAILABLE if there is not another IP address in the record.
ACString nsIDNSRecord::getNextAddrAsString (  ) 

this function returns the value of the next IP address as a string and increments the internal address iterator.

Exceptions:
NS_ERROR_NOT_AVAILABLE if there is not another IP address in the record.
boolean nsIDNSRecord::hasMore (  ) 

this function returns true if there is another address in the record.

void nsIDNSRecord::rewind (  ) 

this function resets the internal address iterator to the first address in the record.


Member Data Documentation

readonly attribute ACString nsIDNSRecord::canonicalName
Returns:
the canonical hostname for this record. this value is empty if the record was not fetched with the RESOLVE_CANONICAL_NAME flag.

e.g., www.mozilla.org --> rheet.mozilla.org


The documentation for this interface was generated from the following file: