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::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().

QString ReplyLine::getMessage (  )  const

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().

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().

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().

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::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

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().

QString ReplyLine::_message [private]

ReplyText portion of this reply line.

Definition at line 57 of file replyline.h.

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

QString ReplyLine::_status [private]

Response status code.

Definition at line 56 of file replyline.h.

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


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

Generated on Wed Nov 26 21:02:43 2008 for Vidalia by  doxygen 1.5.7.1