Vidalia 0.3.1
ProtocolInfo.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 ProtocolInfo.h
13** \brief Container for information in a PROTOCOLINFO reply from Tor
14*/
15
16#ifndef _PROTOCOLINFO_H
17#define _PROTOCOLINFO_H
18
19#include <QStringList>
20
21
23{
24public:
25 /** Default constructor. */
27
28 /** Returns true if this ProtocolInfo object contains no data. */
29 bool isEmpty() const;
30
31 /** Sets the authentication methods Tor currently accepts. <b>methods</b>
32 * should be a comma-delimited list of authentication methods. */
33 void setAuthMethods(const QString methods);
34 /** Returns the authentication methods Tor currently accepts. */
35 QStringList authMethods() const { return _authMethods; }
36
37 /** Sets the file to which Tor has written its authentication cookie. */
40 /** Returns the file to which Tor has written its authentication cookie. */
41 QString cookieAuthFile() const { return _cookieAuthFile; }
42
43 /** Sets the version of Tor to which the controller is connected. */
44 void setTorVersion(const QString torVersion) { _torVersion = torVersion; }
45 /** Returns the version of Tor to which the controller is connected. */
46 QString torVersionString() const { return _torVersion; }
47
48private:
49 QString _torVersion; /**< The Tor version in the PROTOCOLINFO reply. */
50 QString _cookieAuthFile; /**< Tor's authentication cookie file. */
51 QStringList _authMethods; /**< Tor's ccepted authentication methods. */
52};
53
54#endif
55
QStringList _authMethods
Definition: ProtocolInfo.h:51
QStringList authMethods() const
Definition: ProtocolInfo.h:35
QString cookieAuthFile() const
Definition: ProtocolInfo.h:41
QString _torVersion
Definition: ProtocolInfo.h:49
void setTorVersion(const QString torVersion)
Definition: ProtocolInfo.h:44
bool isEmpty() const
QString _cookieAuthFile
Definition: ProtocolInfo.h:50
void setCookieAuthFile(const QString cookieAuthFile)
Definition: ProtocolInfo.h:38
QString torVersionString() const
Definition: ProtocolInfo.h:46
void setAuthMethods(const QString methods)