|
E-MailRelay
|
A private implementation class used by ClientProtocol. More...
#include <gclientprotocol.h>
Public Member Functions | |
| ClientProtocolReply (const std::string &line=std::string()) | |
| Constructor for one line of text. | |
| bool | add (const ClientProtocolReply &other) |
| Adds more lines to this reply. More... | |
| bool | incomplete () const |
| Returns true if the reply is incomplete. | |
| bool | validFormat () const |
| Returns true if a valid format. | |
| bool | positive () const |
| Returns true if the numeric value of the reply is less that four hundred. More... | |
| bool | is (Value v) const |
| Returns true if the reply value is 'v'. | |
| int | value () const |
| Returns the numeric value of the reply. | |
| std::string | text () const |
| Returns the text of the reply, excluding the numeric part, and with embedded newlines. More... | |
| std::string | errorText () const |
| Returns the text() string, plus any error reason, but with the guarantee that the returned string is empty if and only if the reply value is 2xx. More... | |
| std::string | errorReason () const |
| Returns an error reason string, as passed to error(). | |
| bool | textContains (std::string s) const |
| Returns true if the text() contains the given substring. | |
| std::string | textLine (const std::string &prefix) const |
| Returns a line of text() which starts with prefix. More... | |
| Type | type () const |
| Returns the reply type (category). | |
| SubType | subType () const |
| Returns the reply sub-type. | |
Static Public Member Functions | |
| static ClientProtocolReply | ok () |
| Factory function for an ok reply. | |
| static ClientProtocolReply | ok (Value, const std::string &=std::string()) |
| Factory function for an ok reply with a specific 2xx value. | |
| static ClientProtocolReply | error (Value, const std::string &response, const std::string &error_reason) |
| Factory function for an error reply with a specific 5xx value. | |
A private implementation class used by ClientProtocol.
Definition at line 46 of file gclientprotocol.h.
| bool GSmtp::ClientProtocolReply::add | ( | const ClientProtocolReply & | other | ) |
Adds more lines to this reply.
Returns false if the numeric values are different.
Definition at line 813 of file gclientprotocol.cpp.
| std::string GSmtp::ClientProtocolReply::errorText | ( | ) | const |
Returns the text() string, plus any error reason, but with the guarantee that the returned string is empty if and only if the reply value is 2xx.
Definition at line 761 of file gclientprotocol.cpp.
| bool GSmtp::ClientProtocolReply::positive | ( | ) | const |
Returns true if the numeric value of the reply is less that four hundred.
Definition at line 746 of file gclientprotocol.cpp.
| std::string GSmtp::ClientProtocolReply::text | ( | ) | const |
Returns the text of the reply, excluding the numeric part, and with embedded newlines.
Definition at line 772 of file gclientprotocol.cpp.
| std::string GSmtp::ClientProtocolReply::textLine | ( | const std::string & | prefix | ) | const |
Returns a line of text() which starts with prefix.
Definition at line 777 of file gclientprotocol.cpp.
1.8.9.1