Module: Internet Protocols Module Package: Internet Basics
Does not inherit
codeAsString() getData() getStatusCode() getText() |
is1XX() is2XX() is3XX() is4XX() |
is5XX() isContinued() isValid() operator<() |
operator==() reset() RWNumReplyLine() set() |
#include <rw/internet/RWNumReplyLine.h>
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.
RWNumReplyLine();
Constructs a default RWNumReplyLine object. You need to use the set method to initialize it.
RWNumReplyLine(const RWCString& s);
Constructs an RWNumReplyLine object using the input s. The RWCString should contain 7-bit US-ASCII data.
bool operator==(const RWNumReplyLine& other) const;
Returns true if self is equal to other.
bool operator<(const RWNumReplyLine& other) const;
Returns true if other is less than self.
RWCString codeAsString() const;
Deprecated. You can refuse support for this function by defining the macro RW_DISABLE_DEPRECATED.
Returns the reply code as an RWCString.
RWCString getData() 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 getStatusCode() const;
Returns the 3-digit reply code.
RWCString getText() const;
Returns the text portion of the reply line. The RWCString should contain 7-bit US-ASCII data.
bool isContinued() const;
Returns true if additional reply lines follow self in a whole reply.
bool isValid() const;
Returns true if the reply line is valid.
bool is1XX() const; bool is2XX() const; bool is3XX() const; bool is4XX() const; bool is5XX() 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.
void reset();
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 set(const RWCString& data);
Reads the reply line into self from data. The RWCString should contain 7-bit US-ASCII data.
ostream& operator<<(ostream& strm, const RWNumReplyLine& r);
Outputs an RWNumReplyLine 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.