TorSettings Class Reference

#include <torsettings.h>

Inheritance diagram for TorSettings:

VidaliaSettings List of all members.

Public Member Functions

 TorSettings ()
QString getExecutable ()
void setExecutable (QString torExecutable)
QString getArguments ()
QString getTorrc ()
void setTorrc (QString torrc)
QHostAddress getControlAddress ()
void setControlAddress (QHostAddress addr)
quint16 getControlPort ()
void setControlPort (quint16 port)
QByteArray getAuthToken ()
void setAuthToken (QByteArray token)
QString getUser ()
void setUser (QString user)
QString getGroup ()
void setGroup (QString group)
bool getUseService ()
void setUseService (bool useService)

Private Member Functions

QString formatArgument (QString name, QString value)

Detailed Description

Manages Tor-specific settings, such as location, command-line arguments, and control interface information.

Definition at line 37 of file torsettings.h.


Constructor & Destructor Documentation

TorSettings::TorSettings (  ) 

Default constructor.

Definition at line 59 of file torsettings.cpp.

References DEFAULT_TOR_EXECUTABLE, VidaliaSettings::setDefault(), SETTING_AUTH_TOKEN, SETTING_CONTROL_ADDR, SETTING_CONTROL_PORT, SETTING_TOR_EXECUTABLE, SETTING_TOR_GROUP, SETTING_TOR_USER, SETTING_TORRC, and SETTING_USE_SERVICE.


Member Function Documentation

QString TorSettings::getExecutable (  ) 

Gets the name and path of Tor's executable.

Definition at line 74 of file torsettings.cpp.

References SETTING_TOR_EXECUTABLE, and VidaliaSettings::value().

Referenced by GeneralPage::load(), and TorControl::start().

void TorSettings::setExecutable ( QString  torExecutable  ) 

Sets the name and path of Tor's executable.

Definition at line 82 of file torsettings.cpp.

References SETTING_TOR_EXECUTABLE, and VidaliaSettings::setValue().

Referenced by GeneralPage::save().

QString TorSettings::getArguments (  ) 

Builds and formats a list of command-line arguments.

Definition at line 102 of file torsettings.cpp.

References formatArgument(), getControlPort(), getGroup(), getTorrc(), getUser(), TOR_ARG_CONTROL_PORT, TOR_ARG_GROUP, TOR_ARG_TORRC, and TOR_ARG_USER.

Referenced by TorControl::start().

QString TorSettings::getTorrc (  ) 

Gets the torrc to use when starting Tor.

Definition at line 132 of file torsettings.cpp.

References SETTING_TORRC, and VidaliaSettings::value().

Referenced by getArguments(), AdvancedPage::load(), and TorControl::start().

void TorSettings::setTorrc ( QString  torrc  ) 

Sets the torrc to use when starting Tor.

Definition at line 141 of file torsettings.cpp.

References SETTING_TORRC, and VidaliaSettings::setValue().

Referenced by AdvancedPage::save().

QHostAddress TorSettings::getControlAddress (  ) 

Get Tor's control interface address.

Definition at line 180 of file torsettings.cpp.

References SETTING_CONTROL_ADDR, and VidaliaSettings::value().

Referenced by TorControl::connect(), and TorControl::isRunning().

void TorSettings::setControlAddress ( QHostAddress  addr  ) 

Set Tor's control interface address.

Definition at line 188 of file torsettings.cpp.

References SETTING_CONTROL_PORT, and VidaliaSettings::setValue().

quint16 TorSettings::getControlPort (  ) 

Get the control port.

Definition at line 195 of file torsettings.cpp.

References SETTING_CONTROL_PORT, and VidaliaSettings::value().

Referenced by TorControl::connect(), getArguments(), TorControl::isRunning(), and AdvancedPage::load().

void TorSettings::setControlPort ( quint16  port  ) 

Set the control port.

Definition at line 202 of file torsettings.cpp.

References SETTING_CONTROL_PORT, and VidaliaSettings::setValue().

Referenced by AdvancedPage::save().

QByteArray TorSettings::getAuthToken (  ) 

Get Tor's controller authentication information.

Definition at line 211 of file torsettings.cpp.

References SETTING_AUTH_TOKEN, and VidaliaSettings::value().

Referenced by TorControl::authenticate().

void TorSettings::setAuthToken ( QByteArray  token  ) 

Set Tor's controller authentication information.

Definition at line 219 of file torsettings.cpp.

References SETTING_AUTH_TOKEN, and VidaliaSettings::setValue().

QString TorSettings::getUser (  ) 

Get which user will be used to run Tor.

Definition at line 149 of file torsettings.cpp.

References SETTING_TOR_USER, and VidaliaSettings::value().

Referenced by getArguments(), and AdvancedPage::load().

void TorSettings::setUser ( QString  user  ) 

Set which user will be used to run Tor.

Definition at line 157 of file torsettings.cpp.

References SETTING_TOR_USER, and VidaliaSettings::setValue().

Referenced by AdvancedPage::save().

QString TorSettings::getGroup (  ) 

Get which group will be used to run Tor.

Definition at line 165 of file torsettings.cpp.

References SETTING_TOR_GROUP, and VidaliaSettings::value().

Referenced by getArguments(), and AdvancedPage::load().

void TorSettings::setGroup ( QString  group  ) 

Set which group will be used to run Tor.

Definition at line 173 of file torsettings.cpp.

References SETTING_TOR_GROUP, and VidaliaSettings::setValue().

Referenced by AdvancedPage::save().

bool TorSettings::getUseService (  ) 

Get whether Tor is used as an NT service or not

Definition at line 226 of file torsettings.cpp.

References SETTING_USE_SERVICE, and VidaliaSettings::value().

Referenced by TorControl::start().

void TorSettings::setUseService ( bool  useService  ) 

Set whether Tor is used as an NT service

Definition at line 233 of file torsettings.cpp.

References SETTING_USE_SERVICE, and VidaliaSettings::setValue().

QString TorSettings::formatArgument ( QString  name,
QString  value 
) [private]

Formats the argument name name with the given value value. If value contains a space, value will be wrapped in quotes.

Definition at line 90 of file torsettings.cpp.

Referenced by getArguments().


The documentation for this class was generated from the following files:
Generated on Mon Oct 23 20:08:16 2006 for Vidalia by  doxygen 1.5.0