E-MailRelay
|
A result structure for GNet::DnsBlock, as delivered by the DnsBlockCallback interface. More...
#include <gdnsblock.h>
Public Types | |
enum class | Type { Inactive , Local , TimeoutAllow , TimeoutDeny , Allow , Deny } |
Public Member Functions | |
DnsBlockResult () | |
Constructor. More... | |
void | reset (std::size_t threshold, const Address &) |
Initialiser. More... | |
void | add (const DnsBlockServerResult &) |
Appends the server result. More... | |
DnsBlockServerResult & | at (std::size_t) |
Returns a reference to the given per-server result. More... | |
Type & | type () |
Returns a settable reference to the overall result type. More... | |
void | log () const |
Logs the results. More... | |
void | warn () const |
Emits warnings. More... | |
bool | allow () const |
Returns true if the type is Inactive, Local, TimeoutAllow or Allow. More... | |
bool | deny () const |
Returns true if the type is TimeoutDeny or Deny. More... | |
const std::vector< DnsBlockServerResult > & | list () const |
Returns a reference to the per-server results. More... | |
G::StringArray | deniers () const |
Returns the list of denying servers. More... | |
G::StringArray | laggards () const |
Returns the list of slow or unresponsive servers. More... | |
A result structure for GNet::DnsBlock, as delivered by the DnsBlockCallback interface.
The principal attribute is the type(), which indicates whether the connection should be allowed or denied.
Definition at line 77 of file gdnsblock.h.
|
strong |
Definition at line 80 of file gdnsblock.h.
|
inline |
Constructor.
Definition at line 252 of file gdnsblock.h.
|
inline |
Appends the server result.
Definition at line 277 of file gdnsblock.h.
bool GNet::DnsBlockResult::allow | ( | ) | const |
Returns true if the type is Inactive, Local, TimeoutAllow or Allow.
Definition at line 299 of file gdnsblock.cpp.
|
inline |
Returns a reference to the given per-server result.
Definition at line 283 of file gdnsblock.h.
G::StringArray GNet::DnsBlockResult::deniers | ( | ) | const |
Returns the list of denying servers.
Definition at line 321 of file gdnsblock.cpp.
bool GNet::DnsBlockResult::deny | ( | ) | const |
Returns true if the type is TimeoutDeny or Deny.
Definition at line 304 of file gdnsblock.cpp.
G::StringArray GNet::DnsBlockResult::laggards | ( | ) | const |
Returns the list of slow or unresponsive servers.
Definition at line 327 of file gdnsblock.cpp.
|
inline |
Returns a reference to the per-server results.
Definition at line 271 of file gdnsblock.h.
void GNet::DnsBlockResult::log | ( | ) | const |
Logs the results.
Definition at line 259 of file gdnsblock.cpp.
|
inline |
Initialiser.
Definition at line 258 of file gdnsblock.h.
|
inline |
Returns a settable reference to the overall result type.
Definition at line 265 of file gdnsblock.h.
void GNet::DnsBlockResult::warn | ( | ) | const |
Emits warnings.
Definition at line 283 of file gdnsblock.cpp.