The InspIRCd Project
Home | Developers | Wiki | Forums | Bug Tracker | SVN | Download
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SQLresolver Class Reference

Used to resolve sql server hostnames. More...

Inheritance diagram for SQLresolver:

Inheritance graph
[legend]
Collaboration diagram for SQLresolver:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SQLresolver (Module *m, InspIRCd *Instance, const SQLhost &hi, bool &cached)
virtual void OnLookupComplete (const std::string &result, unsigned int ttl, bool cached, int resultnum=0)
 When your lookup completes, this method will be called.
virtual void OnError (ResolverError e, const std::string &errormessage)
 If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.

Private Attributes

SQLhost host
Modulemod

Detailed Description

Used to resolve sql server hostnames.

Definition at line 95 of file m_pgsql.cpp.


Constructor & Destructor Documentation

SQLresolver::SQLresolver Module m,
InspIRCd Instance,
const SQLhost hi,
bool &  cached
[inline]
 

Definition at line 101 of file m_pgsql.cpp.


Member Function Documentation

virtual void SQLresolver::OnError ResolverError  e,
const std::string errormessage
[inline, virtual]
 

If an error occurs (such as NXDOMAIN, no domain name found) then this method will be called.

Parameters:
e A ResolverError enum containing the error type which has occured.
errormessage The error text of the error that occured.

Reimplemented from Resolver.

Definition at line 108 of file m_pgsql.cpp.

References DEBUG, LogManager::Log(), InspIRCd::Logs, and Resolver::ServerInstance.

void SQLresolver::OnLookupComplete const std::string result,
unsigned int  ttl,
bool  cached,
int  resultnum = 0
[virtual]
 

When your lookup completes, this method will be called.

Parameters:
result The resulting DNS lookup, either an IP address or a hostname.
ttl The time-to-live value of the result, in the instance of a cached result, this is the number of seconds remaining before refresh/expiry.
cached True if the result is a cached result, false if it was requested from the DNS server.
resultnum Result number, for records with multiple matching results. Normally, you will only want to act on this when the result is 0.

Implements Resolver.

Definition at line 960 of file m_pgsql.cpp.

References host, SQLhost::ip, and mod.


Member Data Documentation

SQLhost SQLresolver::host [private]
 

Definition at line 98 of file m_pgsql.cpp.

Referenced by OnLookupComplete().

Module* SQLresolver::mod [private]
 

Definition at line 99 of file m_pgsql.cpp.

Referenced by OnLookupComplete().


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