Vidalia
0.3.1
src
torcontrol
ControlMethod.cpp
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 you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** 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 ControlMethod.cpp
13
** \brief Class for specifying which method is used to communicate to Tor
14
*/
15
16
#include "
ControlMethod.h
"
17
18
QString
19
ControlMethod::toString
(
ControlMethod::Method
method)
20
{
21
QString str =
""
;
22
switch
(method) {
23
case
ControlMethod::Port
:
24
str =
"ControlPort"
;
25
break
;
26
27
case
ControlMethod::Socket
:
28
str =
"ControlSocket"
;
29
break
;
30
}
31
32
return
str;
33
}
34
35
ControlMethod::Method
36
ControlMethod::fromString
(QString method)
37
{
38
if
(method == QString(
"ControlPort"
))
39
return
ControlMethod::Port
;
40
else
if
(method == QString(
"ControlSocket"
))
41
return
ControlMethod::Socket
;
42
}
ControlMethod.h
ControlMethod::Method
Method
Definition:
ControlMethod.h:24
ControlMethod::Port
@ Port
Definition:
ControlMethod.h:24
ControlMethod::Socket
@ Socket
Definition:
ControlMethod.h:24
ControlMethod::fromString
static Method fromString(QString method)
Definition:
ControlMethod.cpp:36
ControlMethod::toString
static QString toString(ControlMethod::Method method)
Definition:
ControlMethod.cpp:19
Generated by
1.9.3