Module: Internet Protocols Module Package: POP3
RWPop3ReplyRWReply
#include <rw/pop3/RWPop3Reply.h>
RWPop3Reply encapsulates a general POP3 protocol reply. It is the base class for more specific POP3 replies. Specific subclasses of RWPop3Reply -- RWPop3ConnReply, RWPop3DataReply, and RWPop3StatReply -- return additional information specific to those types of POP3 protocol replies.
The following are examples of POP3 server command replies:
+OK scan listing follows -ERR no such message
RWPop3Reply();
Constructs a default invalid RWPop3Reply. You need to use the assignment operator to initialize the default RWPop3Reply object.
enum resultCode { CODE_UNKNOWN, CODE_OK, CODE_ERR };
RWCString getData() const;
Returns the raw text used to construct the reply object. This can be useful when communicating with non-standard servers. The RWCString should contain 7-bit US-ASCII data.
bool isErr() const;
Returns true if the reply is negative (-ERR).
bool isOk() const;
Returns true if the reply is positive (+OK).
RWCString data_;
Contains the raw data line. The RWCString should contain 7-bit US-ASCII data.
virtual void parse();
Provides an empty parsing mechanism. Derived classes can override the virtual function to get extra meaning in a specific reply.
void readFromPortal(const RWPortal& portal);
Reads data from the portal to construct the RWPop3Reply object.
ostream& operator<<(ostream& strm, const RWPop3Reply& r);
Outputs an RWPop3Reply object to an ostream.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.