SourcePro® API Reference Guide

Product Documentation:
   SourcePro
Documentation Home
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Related Functions
RWPop3Reply Class Reference

Encapsulates a general POP3 protocol reply and is the base class for specific POP3 replies. More...

#include <rw/pop3/RWPop3Reply.h>

Inheritance diagram for RWPop3Reply:
RWReply RWPop3ConnReply RWPop3DataReply RWPop3StatReply

Public Member Functions

 RWPop3Reply (void)
 
RWCString getData (void) const
 
bool isErr (void) const
 
bool isOk (void) const
 
- Public Member Functions inherited from RWReply
 RWReply (void)
 
virtual ~RWReply (void)
 
virtual void clearAndDestroy (void)
 
virtual bool isComplete (void) const
 
virtual bool isValid (void) const
 

Protected Types

enum  resultCode { CODE_UNKNOWN, CODE_OK, CODE_ERR }
 

Protected Member Functions

virtual void parse (void)
 
void readFromPortal (const RWPortal &portal)
 

Protected Attributes

RWCString data_
 
- Protected Attributes inherited from RWReply
bool complete_
 
bool valid_
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const RWPop3Reply &r)
 

Detailed Description

RWPop3Reply encapsulates a general POP3 protocol reply. It is the base class for more specific POP3 replies. Specific subclasses of RWPop3ReplyRWPop3ConnReply, 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

Member Enumeration Documentation

enum RWPop3Reply::resultCode
protected

Enumerates possible reply categories.

Enumerator
CODE_UNKNOWN 

An unexpected reply line was received.

CODE_OK 

The reply status indicator +OK was received.

CODE_ERR 

The reply status indicator -ERR was received.

Constructor & Destructor Documentation

RWPop3Reply::RWPop3Reply ( void  )

Constructs a default invalid RWPop3Reply. You need to use the assignment operator to initialize the default RWPop3Reply object.

Member Function Documentation

RWCString RWPop3Reply::getData ( void  ) 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 RWPop3Reply::isErr ( void  ) const

Returns true if the reply is negative (-ERR).

bool RWPop3Reply::isOk ( void  ) const

Returns true if the reply is positive (+OK).

virtual void RWPop3Reply::parse ( void  )
protectedvirtual

Provides an empty parsing mechanism. Derived classes can override the virtual function to get extra meaning in a specific reply.

Reimplemented in RWPop3DataReply, RWPop3StatReply, and RWPop3ConnReply.

void RWPop3Reply::readFromPortal ( const RWPortal portal)
protectedvirtual

Reads data from the portal to construct the RWPop3Reply object.

Implements RWReply.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const RWPop3Reply r 
)
friend

Outputs an RWPop3Reply object to an std::ostream.

Note
RWPop3Reply does not have an extraction (>>) operator.

Member Data Documentation

RWCString RWPop3Reply::data_
protected

Contains the raw data line. The RWCString should contain 7-bit US-ASCII data.

Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.