Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
GSmtp::VerifierStatus Class Reference

A structure returned by GSmtp::Verifier to describe the status of a rcpt-to recipient. More...

#include <gverifierstatus.h>

Public Member Functions

 VerifierStatus ()
 Default constructor for an invalid remote mailbox. More...
 
 VerifierStatus (const std::string &)
 Constructor for a valid remote mailbox with the given 'address' field. More...
 
std::string str (const std::string &to) const
 Returns a string representation of the structure plus the original recipient 'to' address. More...
 

Static Public Member Functions

static VerifierStatus parse (const std::string &str, std::string &to_ref)
 Parses a str() string into a structure and a recipient 'to' address (by reference). More...
 

Public Attributes

bool is_valid
 
bool is_local
 
bool temporary
 
std::string full_name
 
std::string address
 
std::string reason
 
std::string help
 

Detailed Description

A structure returned by GSmtp::Verifier to describe the status of a rcpt-to recipient.

If describing an invalid recipient then 'is_valid' is set false and a 'reason' is supplied.

If a valid local recipient then 'is_local' is set true, 'full_name' is set to the full description of the mailbox and 'address' is set to the recipient's mailbox name (which should not have an at sign).

If a valid remote recipient then 'is_local' is set false, 'full_name' is empty, and 'address' is copied from the original recipient 'to' address.

The 'help' string can be added by the user of the verifier to give more context in the log in addition to 'reason'.

Definition at line 51 of file gverifierstatus.h.

Constructor & Destructor Documentation

GSmtp::VerifierStatus::VerifierStatus ( )

Default constructor for an invalid remote mailbox.

Definition at line 27 of file gverifierstatus.cpp.

GSmtp::VerifierStatus::VerifierStatus ( const std::string &  mbox)
explicit

Constructor for a valid remote mailbox with the given 'address' field.

Definition at line 34 of file gverifierstatus.cpp.

Member Function Documentation

GSmtp::VerifierStatus GSmtp::VerifierStatus::parse ( const std::string &  str,
std::string &  to_ref 
)
static

Parses a str() string into a structure and a recipient 'to' address (by reference).

Definition at line 42 of file gverifierstatus.cpp.

References address, full_name, G_ERROR, help, is_local, is_valid, reason, G::Str::splitIntoFields(), and temporary.

std::string GSmtp::VerifierStatus::str ( const std::string &  to) const

Returns a string representation of the structure plus the original recipient 'to' address.

Definition at line 67 of file gverifierstatus.cpp.

Member Data Documentation

std::string GSmtp::VerifierStatus::address

Definition at line 58 of file gverifierstatus.h.

Referenced by GSmtp::ProtocolMessageStore::addTo(), and parse().

std::string GSmtp::VerifierStatus::full_name

Definition at line 57 of file gverifierstatus.h.

Referenced by parse().

std::string GSmtp::VerifierStatus::help

Definition at line 60 of file gverifierstatus.h.

Referenced by GSmtp::ProtocolMessageStore::addTo(), and parse().

bool GSmtp::VerifierStatus::is_local

Definition at line 55 of file gverifierstatus.h.

Referenced by GSmtp::ProtocolMessageStore::addTo(), and parse().

bool GSmtp::VerifierStatus::is_valid

Definition at line 54 of file gverifierstatus.h.

Referenced by GSmtp::ProtocolMessageStore::addTo(), and parse().

std::string GSmtp::VerifierStatus::reason

Definition at line 59 of file gverifierstatus.h.

Referenced by GSmtp::ProtocolMessageStore::addTo(), and parse().

bool GSmtp::VerifierStatus::temporary

Definition at line 56 of file gverifierstatus.h.

Referenced by parse().


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