Back to index

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

This is a private interface used by the internals of the networking library. More...

import "nsPIDNSService.idl";

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

List of all members.

Public Member Functions

void init ()
 called to initialize the DNS service.
void shutdown ()
 called to shutdown the DNS service.
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

This is a private interface used by the internals of the networking library.

It will never be frozen. Do not use it in external code.

Definition at line 46 of file nsPIDNSService.idl.


Member Function Documentation

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

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.

called to initialize the DNS service.

nsIDNSRecord nsIDNSService::resolve ( in AUTF8String  aHostName,
in unsigned long  aFlags 
) [inherited]

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.

called to shutdown the DNS service.

any pending asynchronous requests will be canceled, and the local cache of DNS records will be cleared. NOTE: the operating system may still have its own cache of DNS records, which would be unaffected by this method.


Member Data Documentation

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

Definition at line 94 of file nsIDNSService.idl.

const unsigned long nsIDNSService::RESOLVE_BYPASS_CACHE = (1 << 0) [inherited]

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

Definition at line 104 of file nsIDNSService.idl.

const unsigned long nsIDNSService::RESOLVE_CANONICAL_NAME = (1 << 1) [inherited]

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: