Vidalia
0.3.1
Main Page
Namespaces
Classes
Files
File List
File Members
src
torcontrol
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
22
class
ProtocolInfo
23
{
24
public
:
25
/** Default constructor. */
26
ProtocolInfo
() {}
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. */
38
void
setCookieAuthFile
(
const
QString
cookieAuthFile
)
39
{
_cookieAuthFile
=
cookieAuthFile
; }
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
48
private
:
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
Generated on Mon Jan 14 2013 08:44:27 for Vidalia by
1.8.3