Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIDNSService Interface Reference

nsIDNSService More...

import "nsIDNSService.idl";

Inheritance diagram for nsIDNSService:
Inheritance graph
[legend]
Collaboration diagram for nsIDNSService:
Collaboration graph
[legend]

List of all members.

Public Member Functions

nsICancelable asyncResolve (in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerEventTarget)
 kicks off an asynchronous host lookup.
nsIDNSRecord resolve (in AUTF8String aHostName, in unsigned long aFlags)
 called to synchronously resolve a hostname.

Public Attributes

readonly attribute AUTF8String myHostName
const unsigned long RESOLVE_BYPASS_CACHE = (1 << 0)
 if set, this flag suppresses the internal DNS lookup cache.
const unsigned long RESOLVE_CANONICAL_NAME = (1 << 1)
 if set, the canonical name of the specified host will be queried.

Detailed Description

nsIDNSService

Definition at line 50 of file nsIDNSService.idl.


Member Function Documentation

nsICancelable nsIDNSService::asyncResolve ( in AUTF8String  aHostName,
in unsigned long  aFlags,
in nsIDNSListener  aListener,
in nsIEventTarget  aListenerEventTarget 
)

kicks off an asynchronous host lookup.

Parameters:
aHostNamethe hostname or IP-address-literal to resolve.
aFlagsa bitwise OR of the RESOLVE_ prefixed constants defined below.
aListenerthe listener to be notified when the result is available.
aListenerEventTargetoptional parameter (may be null). if non-null, this parameter specifies the nsIEventTarget of the thread on which the listener's onLookupComplete should be called. however, if this parameter is null, then onLookupComplete will be called on an unspecified thread (possibly recursively).
Returns:
An object that can be used to cancel the host lookup.
nsIDNSRecord nsIDNSService::resolve ( in AUTF8String  aHostName,
in unsigned long  aFlags 
)

called to synchronously resolve a hostname.

warning this method may block the calling thread for a long period of time. it is extremely unwise to call this function on the UI thread of an application.

Parameters:
aHostNamethe hostname or IP-address-literal to resolve.
aFlagsa bitwise OR of the RESOLVE_ prefixed constants defined below.
Returns:
DNS record corresponding to the given hostname.
Exceptions:
NS_ERROR_UNKNOWN_HOSTif host could not be resolved.

Member Data Documentation

readonly attribute AUTF8String nsIDNSService::myHostName
Returns:
the hostname of the operating system.

Definition at line 94 of file nsIDNSService.idl.

if set, this flag suppresses the internal DNS lookup cache.

Definition at line 104 of file nsIDNSService.idl.

if set, the canonical name of the specified host will be queried.

Definition at line 109 of file nsIDNSService.idl.


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