E-MailRelay
|
A simple static class to parse identifiers that are either a program path or a network address. More...
#include <gfactoryparser.h>
Classes | |
struct | Result |
Result tuple for GSmtp::FactoryParser::parse(). More... | |
Static Public Member Functions | |
static Result | parse (const std::string &identifier, bool allow_spam) |
Parses an identifier like "/usr/bin/foo" or "net:127.0.0.1:99" or "net:/run/spamd.s", returning the type and the specification in a result tuple, eg. More... | |
static std::string | check (const std::string &identifier, bool allow_spam) |
Parses and checks an identifier. More... | |
A simple static class to parse identifiers that are either a program path or a network address.
Used by the filter factory and the address-verifier factory.
Definition at line 38 of file gfactoryparser.h.
|
static |
Parses and checks an identifier.
Returns a diagnostic if the identifier is invalid, or the empty string if valid or empty.
Definition at line 63 of file gfactoryparser.cpp.
|
static |
Parses an identifier like "/usr/bin/foo" or "net:127.0.0.1:99" or "net:/run/spamd.s", returning the type and the specification in a result tuple, eg.
("file","/usr/bin/foo") or ("net","127.0.0.1:99"). Returns a default-constructed Result if not parsable.
Definition at line 30 of file gfactoryparser.cpp.