SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Friends
RWNumReplyLine Class Reference

Encapsulates a single numerical protocol reply as defined by the FTP and SMTP protocols. More...

#include <rw/internet/RWNumReplyLine.h>

Public Member Functions

 RWNumReplyLine (void)
 
 RWNumReplyLine (const RWCString &s)
 
unsigned int code (void) const
 
RWCString codeAsString (void) const
 
RWCString getData (void) const
 
unsigned int getStatusCode (void) const
 
RWCString getText (void) const
 
bool is1XX (void) const
 
bool is2XX (void) const
 
bool is3XX (void) const
 
bool is4XX (void) const
 
bool is5XX (void) const
 
bool isContinued (void) const
 
bool isValid (void) const
 
bool operator< (const RWNumReplyLine &other) const
 
bool operator== (const RWNumReplyLine &other) const
 
void reset (void)
 
void set (const RWCString &data)
 

Friends

std::ostream & operator<< (std::ostream &str, const RWNumReplyLine &rl)
 

Detailed Description

RWNumReplyLine encapsulates a single numerical protocol reply as defined by the FTP and SMTP protocols. An example reply line is 200 Command Ok. If the 4th character of a reply line is the character - (dash) instead of <space>, the reply consists of multiple lines, with - as the continuation marker. The continuation marker is used by RWNumReply to build a complete reply that encapsulates an entire server response.

Constructor & Destructor Documentation

RWNumReplyLine::RWNumReplyLine ( void  )

Constructs a default RWNumReplyLine object. You need to use the set method to initialize it.

RWNumReplyLine::RWNumReplyLine ( const RWCString s)

Constructs an RWNumReplyLine object using the input s. The RWCString should contain 7-bit US-ASCII data.

Member Function Documentation

unsigned int RWNumReplyLine::code ( void  ) const
inline
Deprecated:
As of SourcePro 1, use getStatusCode() instead.

Returns the 3-digit reply code.

RWCString RWNumReplyLine::codeAsString ( void  ) const
Deprecated:
As of SourcePro 1, use getStatusCode() instead.

Returns the reply code as an RWCString.

RWCString RWNumReplyLine::getData ( void  ) const

Returns the raw text line that was parsed. The RWCString should contain 7-bit US-ASCII data.

Note
This is the only RWNumReplyLine method an application can call after an exception is thrown.
unsigned int RWNumReplyLine::getStatusCode ( void  ) const

Returns the 3-digit reply code.

RWCString RWNumReplyLine::getText ( void  ) const

Returns the text portion of the reply line. The RWCString should contain 7-bit US-ASCII data.

bool RWNumReplyLine::is1XX ( void  ) const

Returns true if self is in the reply family. For more information about reply families, see RFC 959.

Note
Only one of these five methods returns true for any valid instance.
bool RWNumReplyLine::is2XX ( void  ) const

Returns true if self is in the reply family. For more information about reply families, see RFC 959.

Note
Only one of these five methods returns true for any valid instance.
bool RWNumReplyLine::is3XX ( void  ) const

Returns true if self is in the reply family. For more information about reply families, see RFC 959.

Note
Only one of these five methods returns true for any valid instance.
bool RWNumReplyLine::is4XX ( void  ) const

Returns true if self is in the reply family. For more information about reply families, see RFC 959.

Note
Only one of these five methods returns true for any valid instance.
bool RWNumReplyLine::is5XX ( void  ) const

Returns true if self is in the reply family. For more information about reply families, see RFC 959.

Note
Only one of these five methods returns true for any valid instance.
bool RWNumReplyLine::isContinued ( void  ) const

Returns true if additional reply lines follow self in a whole reply.

bool RWNumReplyLine::isValid ( void  ) const

Returns true if the reply line is valid.

bool RWNumReplyLine::operator< ( const RWNumReplyLine other) const

Returns true if other is less than self.

bool RWNumReplyLine::operator== ( const RWNumReplyLine other) const

Returns true if self is equal to other.

void RWNumReplyLine::reset ( void  )

Resets self back to the default state. The data member function will still return the original reply line from the constructor or from the set member function.

void RWNumReplyLine::set ( const RWCString data)

Reads the reply line into self from data. The RWCString should contain 7-bit US-ASCII data.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const RWNumReplyLine rl 
)
friend

Outputs an RWNumReplyLine object to an std::ostream.

Note
This class does not have an extraction (>>) operator.

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