diff options
| author | 2011-01-30 13:10:12 -0500 | |
|---|---|---|
| committer | 2011-01-30 13:10:12 -0500 | |
| commit | b53e121ef459fca3612e6d4b5a02bb2eb07d7580 (patch) | |
| tree | 788a80b9606b102549098b5aa413a65f3f8ec379 /include | |
| parent | Fix bug #83 (diff) | |
Remove dns.h from inspircd.h
Diffstat (limited to 'include')
| -rw-r--r-- | include/dns.h | 34 | ||||
| -rw-r--r-- | include/inspircd.h | 1 | ||||
| -rw-r--r-- | include/types.h | 2 | ||||
| -rw-r--r-- | include/users.h | 34 |
4 files changed, 36 insertions, 35 deletions
diff --git a/include/dns.h b/include/dns.h index 078b11306..4be9be34e 100644 --- a/include/dns.h +++ b/include/dns.h @@ -437,5 +437,39 @@ class CoreExport DNS : public EventHandler int PruneCache(); }; +/** Derived from Resolver, and performs user forward/reverse lookups. + */ +class CoreExport UserResolver : public Resolver +{ + private: + /** UUID we are looking up */ + std::string uuid; + /** True if the lookup is forward, false if is a reverse lookup + */ + bool fwd; + public: + /** Create a resolver. + * @param Instance The creating instance + * @param user The user to begin lookup on + * @param to_resolve The IP or host to resolve + * @param qt The query type + * @param cache Modified by the constructor if the result was cached + */ + UserResolver(LocalUser* user, std::string to_resolve, QueryType qt, bool &cache); + + /** Called on successful lookup + * @param result Result string + * @param ttl Time to live for result + * @param cached True if the result was found in the cache + */ + void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached); + + /** Called on failed lookup + * @param e Error code + * @param errormessage Error message string + */ + void OnError(ResolverError e, const std::string &errormessage); +}; + #endif diff --git a/include/inspircd.h b/include/inspircd.h index 968192cbc..8a9922ff9 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -65,7 +65,6 @@ #include "ctables.h" #include "timer.h" #include "socket.h" -#include "dns.h" #include "extensible.h" #include "numerics.h" #include "membership.h" diff --git a/include/types.h b/include/types.h index d435dfd1f..b7c50f720 100644 --- a/include/types.h +++ b/include/types.h @@ -23,6 +23,7 @@ class ConfigReadStatus; class ConfigTag; class CrashState; class CullList; +class DNS; class DNSHeader; class DNSRequest; class Extensible; @@ -37,6 +38,7 @@ class Module; class ModuleState; class OperInfo; class ProtocolInterface; +class Resolver; class ServerConfig; class ServerLimits; class StreamSocket; diff --git a/include/users.h b/include/users.h index aee576e25..ca2628e85 100644 --- a/include/users.h +++ b/include/users.h @@ -826,38 +826,4 @@ inline FakeUser* IS_SERVER(User* u) /** Is away */ #define IS_AWAY(x) (!x->awaymsg.empty()) -/** Derived from Resolver, and performs user forward/reverse lookups. - */ -class CoreExport UserResolver : public Resolver -{ - private: - /** UUID we are looking up */ - std::string uuid; - /** True if the lookup is forward, false if is a reverse lookup - */ - bool fwd; - public: - /** Create a resolver. - * @param Instance The creating instance - * @param user The user to begin lookup on - * @param to_resolve The IP or host to resolve - * @param qt The query type - * @param cache Modified by the constructor if the result was cached - */ - UserResolver(LocalUser* user, std::string to_resolve, QueryType qt, bool &cache); - - /** Called on successful lookup - * @param result Result string - * @param ttl Time to live for result - * @param cached True if the result was found in the cache - */ - void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached); - - /** Called on failed lookup - * @param e Error code - * @param errormessage Error message string - */ - void OnError(ResolverError e, const std::string &errormessage); -}; - #endif |
