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{
26public:
27 /** Default constructor */
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
47private:
48 QList<ReplyLine> _lines;
49};
50
51#endif
52
QString getMessage() const
QString toString() const
QList< ReplyLine > _lines
Definition: ControlReply.h:48
ReplyLine getLine(int idx=0) const
QStringList getData() const
void appendLine(ReplyLine line)
QList< ReplyLine > getLines() const
QString getStatus() const