|
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 79 of file gdnsblock.h.
|
strong |
Definition at line 82 of file gdnsblock.h.
|
inline |
Constructor.
Definition at line 261 of file gdnsblock.h.
|
inline |
Appends the server result.
Definition at line 286 of file gdnsblock.h.
| bool GNet::DnsBlockResult::allow | ( | ) | const |
Returns true if the type is Inactive, Local, TimeoutAllow or Allow.
Definition at line 346 of file gdnsblock.cpp.
|
inline |
Returns a reference to the given per-server result.
Definition at line 292 of file gdnsblock.h.
| G::StringArray GNet::DnsBlockResult::deniers | ( | ) | const |
Returns the list of denying servers.
Definition at line 370 of file gdnsblock.cpp.
| bool GNet::DnsBlockResult::deny | ( | ) | const |
Returns true if the type is TimeoutDeny or Deny.
Definition at line 352 of file gdnsblock.cpp.
| G::StringArray GNet::DnsBlockResult::laggards | ( | ) | const |
Returns the list of slow or unresponsive servers.
Definition at line 376 of file gdnsblock.cpp.
|
inline |
Returns a reference to the per-server results.
Definition at line 280 of file gdnsblock.h.
| void GNet::DnsBlockResult::log | ( | ) | const |
Logs the results.
Definition at line 306 of file gdnsblock.cpp.
|
inline |
Initialiser.
Definition at line 267 of file gdnsblock.h.
|
inline |
Returns a settable reference to the overall result type.
Definition at line 274 of file gdnsblock.h.
| void GNet::DnsBlockResult::warn | ( | ) | const |
Emits warnings.
Definition at line 330 of file gdnsblock.cpp.