Vidalia  0.3.1
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
20 {
21  QString str = "";
22  switch(method) {
24  str = "ControlPort";
25  break;
26 
28  str = "ControlSocket";
29  break;
30  }
31 
32  return str;
33 }
34 
37 {
38  if(method == QString("ControlPort"))
39  return ControlMethod::Port;
40  else if(method == QString("ControlSocket"))
41  return ControlMethod::Socket;
42 }
static Method fromString(QString method)
static QString toString(ControlMethod::Method method)