Vidalia  0.3.1
ControlReply.h
Go to the documentation of this file.
1 /*
2 ** This file is part of Vidalia, and is subject to the license terms in the
3 ** LICENSE file, found in the top level directory of this distribution. If
4 ** you did not receive the LICENSE file with this file, you may obtain it
5 ** from the Vidalia source package distributed by the Vidalia Project at
6 ** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7 ** including this file, may be copied, modified, propagated, or distributed
8 ** except according to the terms described in the LICENSE file.
9 */
10 
11 /*
12 ** \file ControlReply.h
13 ** \brief A response from Tor's control interface
14 */
15 
16 #ifndef _CONTROLREPLY_H
17 #define _CONTROLREPLY_H
18 
19 #include "ReplyLine.h"
20 
21 #include <QStringList>
22 
23 
25 {
26 public:
27  /** Default constructor */
28  ControlReply();
29 
30  /** Add a line associated with this reply */
31  void appendLine(ReplyLine line);
32 
33  /** Returns a single line from this reply */
34  ReplyLine getLine(int idx = 0) const;
35  /** Returns all lines for this reply */
36  QList<ReplyLine> getLines() const;
37 
38  /** Returns the status of the first line in the reply */
39  QString getStatus() const;
40  /** Returns the messasge of the first line in the reply */
41  QString getMessage() const;
42  /** Returns the data for the first line in the reply. */
43  QStringList getData() const;
44  /** Returns the entire contents of the control reply. */
45  QString toString() const;
46 
47 private:
48  QList<ReplyLine> _lines;
49 };
50 
51 #endif
52 
ReplyLine.h
ControlReply::toString
QString toString() const
Definition: ControlReply.cpp:68
ControlReply::_lines
QList< ReplyLine > _lines
Definition: ControlReply.h:48
ReplyLine
Definition: ReplyLine.h:22
ControlReply
Definition: ControlReply.h:24
ControlReply::getLines
QList< ReplyLine > getLines() const
Definition: ControlReply.cpp:40
ControlReply::getStatus
QString getStatus() const
Definition: ControlReply.cpp:47
ControlReply::getLine
ReplyLine getLine(int idx=0) const
Definition: ControlReply.cpp:33
ControlReply::getMessage
QString getMessage() const
Definition: ControlReply.cpp:54
ControlReply::appendLine
void appendLine(ReplyLine line)
Definition: ControlReply.cpp:26
ControlReply::ControlReply
ControlReply()
Definition: ControlReply.cpp:20
ControlReply::getData
QStringList getData() const
Definition: ControlReply.cpp:61