Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QDnsHostInfo Class Reference

The QDnsHostInfo class provides information about a host name lookup. More...

#include <QDnsHostInfo>

Note: All the functions in this class are reentrant.

Public Types

Public Functions


Detailed Description

The QDnsHostInfo class provides information about a host name lookup.

A QDnsHostInfo is passed to the slot invoked by QDns::getHostByName(). It contains the result of the lookup.

host() returns the host name that was looked up. Call addresses() to get the list of IP addresses for the host.

If the lookup failed, error() returns the type of error that occurred. errorString() gives a human-readable description of the lookup error.

See also QDns.


Member Type Documentation

enum QDnsHostInfo::Error

QDnsHostInfo::NoErrorThe lookup was successful.
QDnsHostInfo::HostNotFoundNo IP addresses were found for the host.
QDnsHostInfo::UnknownErrorAn unknown error occurred.

Member Function Documentation

QDnsHostInfo::QDnsHostInfo ()

Constructs an empty host info object.

QDnsHostInfo::QDnsHostInfo ( const QDnsHostInfo & hostInfo )

Copy constructor. Copies the data of hostInfo.

QDnsHostInfo::~QDnsHostInfo ()

Destroys the host info object.

QList<QHostAddress> QDnsHostInfo::addresses () const

Returns the list of IP addresses returned by the host name lookup; this list may be empty.

See also host().

Error QDnsHostInfo::error () const

If the host name lookup failed, this function returns the type of error that occurred; otherwise NoError is returned.

See also QDnsHostInfo::Error and errorString().

QString QDnsHostInfo::errorString () const

If the lookup failed, this function returns a human readable description of the error; otherwise "Unknown error" is returned.

See also error().

QString QDnsHostInfo::host () const

Returns the name of the host whose IP addresses were looked up.

QDnsHostInfo & QDnsHostInfo::operator= ( const QDnsHostInfo & hostInfo )

Assigns the data of the hostInfo object to this host info object, and returns a reference to it.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp2