#include <replyline.h>
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 |
Definition at line 34 of file replyline.h.
ReplyLine::ReplyLine | ( | ) |
Default constructor
Definition at line 31 of file replyline.cpp.
ReplyLine::ReplyLine | ( | QString | status, | |
QString | msg | |||
) |
ReplyLine::ReplyLine | ( | QString | status, | |
QString | msg, | |||
QString | data | |||
) |
Constructor
Definition at line 43 of file replyline.cpp.
References _status, appendData(), and setMessage().
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().
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().