ServiceSettings Class Reference

#include <servicesettings.h>

Inheritance diagram for ServiceSettings:
VidaliaSettings

List of all members.

Public Member Functions

 ServiceSettings (TorControl *torControl)
QString getVirtualPort ()
void setVirtualPort (QString servicePort)
QString getServiceAddress ()
void setServiceAddress (QString serviceAddress)
QString getPhysicalAddressPort ()
void setPhysicalAddressPort (QString physicalAddress)
bool isEnabled ()
void setEnabled (bool enabled)
ServiceList getServices ()
void setServices (ServiceList services)
QString getHiddenServiceDirectories ()
void applyServices (QString value, QString *errmsg)
void unpublishAllServices (QString *errmsg)

Private Attributes

TorControl_torControl

Detailed Description

Definition at line 21 of file servicesettings.h.


Constructor & Destructor Documentation

ServiceSettings::ServiceSettings ( TorControl torControl  ) 

Constructor

Constructor.

Parameters:
torControl a TorControl object used to read and apply the Service configuration settings.

Definition at line 26 of file servicesettings.cpp.

References _torControl, VSettings::setDefault(), SETTING_SERVICE_ENABLED, SETTING_SERVICE_PHYSICAL_ADDRESS, and SETTING_SERVICE_VIRTUAL_PORT.


Member Function Documentation

void ServiceSettings::applyServices ( QString  value,
QString *  errmsg 
)

Set all services the user wants to start and send it to the Tor Controller

Definition at line 153 of file servicesettings.cpp.

References _torControl, TorControl::saveConf(), and TorControl::setConf().

Referenced by ServicePage::startServicesInTor().

QString ServiceSettings::getHiddenServiceDirectories (  ) 

Get Service Directories

Get all service directories from Tor

Definition at line 142 of file servicesettings.cpp.

References _torControl, TorControl::getHiddenServiceConf(), and VSettings::value().

Referenced by ServicePage::load().

QString ServiceSettings::getPhysicalAddressPort (  ) 

Returns the service address or hostname for a specific service

Returns the physical address for a specific service

Definition at line 113 of file servicesettings.cpp.

References SETTING_SERVICE_PHYSICAL_ADDRESS, and VSettings::value().

QString ServiceSettings::getServiceAddress (  ) 

Returns the .onion - service address for a specific service

Definition at line 98 of file servicesettings.cpp.

References SETTING_SERVICE_ADDRESS, and VSettings::value().

ServiceList ServiceSettings::getServices (  ) 

Returns a ServiceList containing all services

Get serialised ServiceList

Definition at line 50 of file servicesettings.cpp.

References ServiceList::addService(), Service::setAdditionalServiceOptions(), SETTING_TOR_SERVICES, and VSettings::value().

Referenced by ServicePage::load().

QString ServiceSettings::getVirtualPort (  ) 

Returns the service port for a specific service

Returns the virtual port for a specific service

Definition at line 83 of file servicesettings.cpp.

References SETTING_SERVICE_VIRTUAL_PORT, and VSettings::value().

bool ServiceSettings::isEnabled (  ) 

Returns if the Service is enabled

Definition at line 128 of file servicesettings.cpp.

References SETTING_SERVICE_ENABLED, and VSettings::value().

void ServiceSettings::setEnabled ( bool  boolean  ) 

Set the service enabled

Definition at line 135 of file servicesettings.cpp.

References SETTING_SERVICE_ENABLED, and VSettings::setValue().

void ServiceSettings::setPhysicalAddressPort ( QString  addr  ) 

Set the service address or hostname for a specific service

Set the physical address or hostname for a specific service

Definition at line 121 of file servicesettings.cpp.

References SETTING_SERVICE_PHYSICAL_ADDRESS, and VSettings::setValue().

void ServiceSettings::setServiceAddress ( QString  addr  ) 

Set the .onion - service address for a specific service

Set the .onion - service address or hostname for a specific service

Definition at line 106 of file servicesettings.cpp.

References SETTING_SERVICE_ADDRESS, and VSettings::setValue().

void ServiceSettings::setServices ( ServiceList  service  ) 

Set ServiceList to serialise it

Definition at line 36 of file servicesettings.cpp.

References ServiceList::services(), SETTING_TOR_SERVICES, VSettings::setValue(), and Service::toString().

Referenced by ServicePage::save().

void ServiceSettings::setVirtualPort ( QString  servicePort  ) 

Set the service port for a specific service

Set the virtual port for a specific service

Definition at line 91 of file servicesettings.cpp.

References SETTING_SERVICE_VIRTUAL_PORT, and VSettings::setValue().

void ServiceSettings::unpublishAllServices ( QString *  errmsg  ) 

Unpublish all services

Unpublish all HiddenServices

Definition at line 161 of file servicesettings.cpp.

References _torControl, TorControl::resetConf(), and TorControl::saveConf().

Referenced by ServicePage::save().


Member Data Documentation

A TorControl object used to talk to Tor.

Definition at line 56 of file servicesettings.h.

Referenced by applyServices(), getHiddenServiceDirectories(), ServiceSettings(), and unpublishAllServices().


The documentation for this class was generated from the following files:

Generated on 22 Feb 2010 for Vidalia by  doxygen 1.6.1