SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
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 (const RWCString &s)
 
 RWNumReplyLine (void)
 
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() [1/2]

RWNumReplyLine::RWNumReplyLine ( void )

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

◆ RWNumReplyLine() [2/2]

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

◆ code()

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

Returns the 3-digit reply code.

◆ codeAsString()

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

Returns the reply code as an RWCString.

◆ getData()

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.

◆ getStatusCode()

unsigned int RWNumReplyLine::getStatusCode ( void ) const

Returns the 3-digit reply code.

◆ getText()

RWCString RWNumReplyLine::getText ( void ) const

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

◆ is1XX()

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.

◆ is2XX()

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.

◆ is3XX()

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.

◆ is4XX()

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.

◆ is5XX()

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.

◆ isContinued()

bool RWNumReplyLine::isContinued ( void ) const

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

◆ isValid()

bool RWNumReplyLine::isValid ( void ) const

Returns true if the reply line is valid.

◆ operator<()

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

Returns true if other is less than self.

◆ operator==()

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

Returns true if self is equal to other.

◆ reset()

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.

◆ set()

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 Symbol Documentation

◆ operator<<

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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.