KVIrc
4.9.2
DeveloperAPIs
|
The KviDnsResolver class. More...
#include <KviDnsResolver.h>
Public Types | |
enum | QueryType { IPv4, IPv6, Any, IPv4, IPv6, Any } |
enum | QueryType { IPv4, IPv6, Any, IPv4, IPv6, Any } |
enum | State { Idle, Busy, Failure, Success, Idle, Busy, Failure, Success } |
enum | State { Idle, Busy, Failure, Success, Idle, Busy, Failure, Success } |
Signals | |
void | lookupDone (KviDnsResolver *) |
void | lookupDone (KviDnsResolver *) |
Public Member Functions | |
KviError::Code | error () const |
KviError::Code | error () |
const QString & | errorString () const |
QString | errorString () |
const QString & | firstHostname () |
const QString & | firstIpAddress () |
const QString & | firstIpAddress () |
const QString & | hostName () const |
const QString & | hostName () |
int | hostnameCount () |
KviPointerList< QString > * | hostnameList () |
int | ipAddressCount () const |
int | ipAddressCount () |
KviPointerList< QString > * | ipAddressList () |
KviPointerList< QString > * | ipAddressList () |
bool | isRunning () const |
bool | isRunning () const |
KviDnsResolver (QObject *pParent=NULL) | |
KviDnsResolver () | |
bool | lookup (const QString &szQuery, QueryType eType) |
bool | lookup (const QString &szQuery, QueryType type) |
const QString & | query () const |
const QString & | query () |
void * | releaseAuxData () |
void | setAuxData (void *pAuxData) |
State | state () const |
State | state () |
virtual | ~KviDnsResolver () |
virtual | ~KviDnsResolver () |
Protected Member Functions | |
virtual bool | event (QEvent *e) |
Protected Attributes | |
void * | m_pAuxData |
KviDnsResolverResult * | m_pDnsResult |
KviDnsResolverThread * | m_pSlaveThread |
State | m_state |
Properties | |
bool | blockingDelete |
Private Slots | |
void | slotHostLookupTerminated (const QHostInfo &oHostInfo) |
Private Member Functions | |
KviDnsResolverResult * | result () |
Private Attributes | |
KviDnsResolverPrivate * | m_pPrivateData |
The KviDnsResolver class.
This class...
KviDnsResolver::KviDnsResolver | ( | ) |
References Idle, m_pAuxData, m_pDnsResult, m_pSlaveThread, and m_state.
|
virtual |
References m_pAuxData, m_pDnsResult, and m_pSlaveThread.
KviDnsResolver::KviDnsResolver | ( | QObject * | pParent = NULL | ) |
Creates an instance of KviDnsResolver
References KviDnsResolverPrivate::eState, Idle, m_pPrivateData, and KviDnsResolverPrivate::pAddressList.
|
virtual |
Destroys the instance of KviDnsResolver and frees all the relevant resources
KviError::Code KviDnsResolver::error | ( | ) | const |
References KviDnsResolverPrivate::eError, and m_pPrivateData.
KviError::Code KviDnsResolver::error | ( | ) |
const QString & KviDnsResolver::errorString | ( | ) | const |
References m_pPrivateData, and KviDnsResolverPrivate::szError.
QString KviDnsResolver::errorString | ( | ) |
|
protectedvirtual |
const QString & KviDnsResolver::firstHostname | ( | ) |
const QString& KviDnsResolver::firstIpAddress | ( | ) |
const QString & KviDnsResolver::firstIpAddress | ( | ) |
const QString & KviDnsResolver::hostName | ( | ) | const |
References m_pPrivateData, and KviDnsResolverPrivate::szHostName.
|
inline |
int KviDnsResolver::hostnameCount | ( | ) |
References KviPointerList< T >::count(), KviDnsResolverResult::hostnameList(), and result().
KviPointerList< QString > * KviDnsResolver::hostnameList | ( | ) |
References KviDnsResolverResult::hostnameList(), and result().
int KviDnsResolver::ipAddressCount | ( | ) | const |
References KviPointerList< T >::count(), m_pPrivateData, and KviDnsResolverPrivate::pAddressList.
int KviDnsResolver::ipAddressCount | ( | ) |
References KviPointerList< T >::count(), KviDnsResolverResult::ipAddressList(), and result().
Referenced by KviIrcConnectionTargetResolver::serverLookupTerminated().
KviPointerList<QString>* KviDnsResolver::ipAddressList | ( | ) |
KviPointerList< QString > * KviDnsResolver::ipAddressList | ( | ) |
bool KviDnsResolver::isRunning | ( | ) | const |
bool KviDnsResolver::isRunning | ( | ) | const |
bool KviDnsResolver::lookup | ( | const QString & | szQuery, |
QueryType | eType | ||
) |
Starts a lookup for the specified DNS query of the specified type. Returns true on success and false on failure.
bool KviDnsResolver::lookup | ( | const QString & | szQuery, |
QueryType | type | ||
) |
References Busy, m_pSlaveThread, m_state, KviDnsResolverThread::setQuery(), and KviRuntimeInfo::type().
Referenced by KviKvsAsyncDnsOperation::KviKvsAsyncDnsOperation(), KviIrcConnectionTargetResolver::lookupProxyHostname(), KviIrcConnectionTargetResolver::lookupServerHostname(), and KviIrcConnection::userInfoReceived().
|
signal |
|
signal |
Referenced by event(), and slotHostLookupTerminated().
const QString & KviDnsResolver::query | ( | ) | const |
References m_pPrivateData, and KviDnsResolverPrivate::szQuery.
const QString & KviDnsResolver::query | ( | ) |
References KviDnsResolverResult::query(), and result().
Referenced by KviKvsDnsManager::dnsLookupTerminated(), and KviKvsAsyncDnsOperation::lookupTerminated().
|
inline |
|
private |
References m_pDnsResult.
Referenced by firstHostname(), firstIpAddress(), hostnameCount(), hostnameList(), ipAddressCount(), ipAddressList(), and query().
|
inline |
|
privateslot |
References __tr2qs, Any, KviPointerList< T >::append(), KviPointerList< T >::clear(), KviError::DNSQueryFailed, KviDnsResolverPrivate::eError, KviDnsResolverPrivate::eQueryType, KviDnsResolverPrivate::eState, Failure, KviError::HostNotFound, KviError::InternalError, IPv4, IPv6, KviPointerList< T >::isEmpty(), KVI_ASSERT_MSG, lookupDone(), m_pPrivateData, KviDnsResolverPrivate::pAddressList, KviError::Success, Success, KviDnsResolverPrivate::szError, KviDnsResolverPrivate::szHostName, and KviError::ValidNameButNoIpAddress.
KviDnsResolver::State KviDnsResolver::state | ( | ) | const |
Returns the resolver state
References KviDnsResolverPrivate::eState, and m_pPrivateData.
|
inline |
|
protected |
Referenced by KviDnsResolver(), and ~KviDnsResolver().
|
protected |
Referenced by error(), event(), KviDnsResolver(), result(), and ~KviDnsResolver().
|
private |
Referenced by error(), errorString(), hostName(), ipAddressCount(), KviDnsResolver(), query(), slotHostLookupTerminated(), and state().
|
protected |
Referenced by KviDnsResolver(), lookup(), and ~KviDnsResolver().
|
protected |
Referenced by event(), isRunning(), KviDnsResolver(), and lookup().
|
read |