ReplyLine Class Reference

#include <replyline.h>

List of all members.

Public Member Functions

 ReplyLine ()
 ReplyLine (const QString &status, const QString &message)
 ReplyLine (const QString &status, const QString &message, const QString &data)
void setStatus (const QString &status)
QString getStatus () const
void setMessage (const QString &msg)
QString getMessage () const
void appendData (const QString &data)
QStringList getData () const
bool hasData () const
QString toString () const

Static Private Member Functions

static QString unescape (const QString &escaped)

Private Attributes

QString _status
QString _message
QStringList _data


Detailed Description

Definition at line 23 of file replyline.h.


Constructor & Destructor Documentation

ReplyLine::ReplyLine (  ) 

Default constructor

Definition at line 20 of file replyline.cpp.

ReplyLine::ReplyLine ( const QString &  status,
const QString &  msg 
)

Constructor

Definition at line 25 of file replyline.cpp.

References _status, and setMessage().

ReplyLine::ReplyLine ( const QString &  status,
const QString &  msg,
const QString &  data 
)

Constructor

Definition at line 32 of file replyline.cpp.

References _status, appendData(), and setMessage().


Member Function Documentation

void ReplyLine::setStatus ( const QString &  status  ) 

Set the status code to status.

Set the status code for this reply line. See Tor Control Protocol V1 specification for a description of status codes.

Definition at line 43 of file replyline.cpp.

References _status.

QString ReplyLine::getStatus (  )  const

Returns the status code for this reply line.

Definition at line 50 of file replyline.cpp.

References _status.

Referenced by ControlReply::getStatus(), and TorControl::protocolInfo().

void ReplyLine::setMessage ( const QString &  msg  ) 

Sets the ReplyText message this reply line to msg.

Definition at line 57 of file replyline.cpp.

References _message, and unescape().

Referenced by ReplyLine().

QString ReplyLine::getMessage (  )  const

void ReplyLine::appendData ( const QString &  data  ) 

Appends data to this reply line.

Definition at line 71 of file replyline.cpp.

References _data, and unescape().

Referenced by ReplyLine().

QStringList ReplyLine::getData (  )  const

Returns a QStringList of all data lines for this reply line.

Returns a QStringList of all data lines for this reply line

Definition at line 78 of file replyline.cpp.

References _data.

Referenced by ControlReply::getData(), TorControl::getInfo(), and TorEvents::handleLogMessage().

bool ReplyLine::hasData (  )  const [inline]

Returns true if this reply contained a data portion.

Definition at line 45 of file replyline.h.

References _data.

Referenced by TorControl::getInfo().

QString ReplyLine::toString (  )  const

Returns the entire contents of this reply line, including the status, message, and any extra data.

Definition at line 99 of file replyline.cpp.

References _data, _message, and _status.

Referenced by ControlReply::toString().

QString ReplyLine::unescape ( const QString &  escaped  )  [static, private]

Unescapes special characters in str and returns the unescaped result.

Definition at line 86 of file replyline.cpp.

Referenced by appendData(), and setMessage().


Member Data Documentation

QString ReplyLine::_status [private]

Response status code.

Definition at line 56 of file replyline.h.

Referenced by getStatus(), ReplyLine(), setStatus(), and toString().

QString ReplyLine::_message [private]

ReplyText portion of this reply line.

Definition at line 57 of file replyline.h.

Referenced by getMessage(), setMessage(), and toString().

QStringList ReplyLine::_data [private]

Contents of any DataReplyLines in this line.

Definition at line 58 of file replyline.h.

Referenced by appendData(), getData(), hasData(), and toString().


The documentation for this class was generated from the following files:

Generated on Sat Aug 16 17:38:37 2008 for Vidalia by  doxygen 1.5.6