ReplyLine Class Reference

#include <replyline.h>

List of all members.

Public Member Functions

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

Static Private Member Functions

static QString unescape (QString str)

Private Attributes

QString _status
QString _message
QStringList _data


Detailed Description

Definition at line 34 of file replyline.h.


Constructor & Destructor Documentation

ReplyLine::ReplyLine (  ) 

Default constructor

Definition at line 31 of file replyline.cpp.

ReplyLine::ReplyLine ( QString  status,
QString  msg 
)

Constructor

Definition at line 36 of file replyline.cpp.

References _status, and setMessage().

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

Constructor

Definition at line 43 of file replyline.cpp.

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


Member Function Documentation

void ReplyLine::setStatus ( 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 53 of file replyline.cpp.

References _status.

QString ReplyLine::getStatus (  )  const

Returns the status code for this reply line.

Definition at line 60 of file replyline.cpp.

References _status.

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

void ReplyLine::setMessage ( QString  msg  ) 

Sets the ReplyText message this reply line to msg.

Definition at line 67 of file replyline.cpp.

References _message, and unescape().

Referenced by ReplyLine().

QString ReplyLine::getMessage (  )  const

Returns the ReplyText portion of this reply line.

Definition at line 74 of file replyline.cpp.

References _message.

Referenced by TorControl::getConf(), TorControl::getInfo(), ControlReply::getMessage(), TorEvents::handleAddressMap(), TorEvents::handleBandwidthUpdate(), TorEvents::handleCircuitStatus(), TorEvents::handleLogMessage(), TorEvents::handleNewDescriptor(), TorEvents::handleOrConnStatus(), TorEvents::handleStreamStatus(), TorEvents::parseEventType(), and TorControl::protocolInfo().

void ReplyLine::appendData ( QString  data  ) 

Appends data to this reply line.

Definition at line 81 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 88 of file replyline.cpp.

References _data.

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

QString ReplyLine::toString (  )  const

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

Definition at line 108 of file replyline.cpp.

References _data, _message, and _status.

Referenced by ControlReply::toString().

QString ReplyLine::unescape ( QString  str  )  [static, private]

Unescapes special characters in str and returns the unescaped result.

Definition at line 96 of file replyline.cpp.

Referenced by appendData(), and setMessage().


Member Data Documentation

QString ReplyLine::_status [private]

Response status code.

Definition at line 65 of file replyline.h.

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

QString ReplyLine::_message [private]

ReplyText portion of this reply line.

Definition at line 66 of file replyline.h.

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

QStringList ReplyLine::_data [private]

Contents of any DataReplyLines in this line.

Definition at line 67 of file replyline.h.

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


The documentation for this class was generated from the following files:
Generated on Wed Sep 5 15:49:29 2007 for Vidalia by  doxygen 1.5.3