E-MailRelay
Classes | Static Public Member Functions | List of all members
GSmtp::FactoryParser Class Reference

A simple class to parse identifiers that can be a program in the file system 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" 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...
 

Detailed Description

A simple class to parse identifiers that can be a program in the file system or a network address.

Definition at line 38 of file gfactoryparser.h.

Member Function Documentation

std::string GSmtp::FactoryParser::check ( const std::string &  identifier,
bool  allow_spam 
)
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.

GSmtp::FactoryParser::Result GSmtp::FactoryParser::parse ( const std::string &  identifier,
bool  allow_spam 
)
static

Parses an identifier like "/usr/bin/foo" or "net:127.0.0.1:99" returning the type and the specification in a result tuple, eg.

("file","/usr/bin/foo") or ("net","127.0.0.1:99").

Definition at line 30 of file gfactoryparser.cpp.


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