|
Vidalia
0.3.1
|
#include <ServiceSettings.h>
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 |
Additional Inherited Members | |
Private Types inherited from VidaliaSettings | |
| enum | IconPosition { Tray, Dock, Both } |
Private Member Functions inherited from VidaliaSettings | |
| VidaliaSettings () | |
| QString | getLanguageCode () |
| void | setLanguageCode (QString languageCode) |
| QString | getInterfaceStyle () |
| void | setInterfaceStyle (QString styleKey) |
| bool | runTorAtStart () |
| void | setRunTorAtStart (bool run) |
| bool | showMainWindowAtStart () |
| void | setShowMainWindowAtStart (bool show) |
| bool | runVidaliaOnBoot () |
| void | setRunVidaliaOnBoot (bool run) |
| QString | getBrowserExecutable () const |
| void | setBrowserExecutable (const QString &browserExecutable) |
| QString | getBrowserDirectory () const |
| void | setBrowserDirectory (const QString &browserDirectory) |
| QString | getIMExecutable () const |
| void | setIMExecutable (const QString &IMExecutable) |
| bool | runProxyAtStart () |
| void | setRunProxyAtStart (bool run) |
| QString | getProxyExecutable () const |
| void | setProxyExecutable (const QString &proxyExecutable) |
| QString | getProxyExecutableArguments () const |
| void | setProxyExecutableArguments (const QString &proxyExecutableArguments) |
| bool | isAutoUpdateEnabled () const |
| void | setAutoUpdateEnabled (bool enabled) |
| QDateTime | lastCheckedForUpdates () const |
| void | setLastCheckedForUpdates (const QDateTime &checkedAt) |
| bool | useLocalGeoIpDatabase () const |
| void | setUseLocalGeoIpDatabase (bool enabled) |
| QString | localGeoIpDatabase () const |
| void | setLocalGeoIpDatabase (const QString &databaseFile) |
| QString | pluginPath () const |
| void | setPluginPath (const QString &path) |
| IconPosition | getIconPref () |
| void | setIconPref (const IconPosition iconPref) |
| QString | toString (const IconPosition iconPref) |
| IconPosition | fromString (QString iconPref) |
| bool | skipVersionCheck () const |
| bool | rememberShutdown () |
| void | setRememberShutdown (bool val) |
Private Member Functions inherited from VSettings | |
| VSettings (const QString group=QString()) | |
| virtual QVariant | value (const QString &key, const QVariant &defaultVal=QVariant()) const |
| virtual void | setValue (const QString &key, const QVariant &val) |
| void | setDefault (const QString &key, const QVariant &val) |
| QVariant | defaultValue (const QString &key) const |
| QMap< QString, QVariant > | allSettings () const |
Static Private Member Functions inherited from VSettings | |
| static QString | settingsFile () |
| static bool | settingsFileExists () |
| static void | reset () |
Definition at line 22 of file ServiceSettings.h.
| ServiceSettings::ServiceSettings | ( | TorControl * | torControl | ) |
Constructor
Constructor.
| torControl | a TorControl object used to read and apply the Service configuration settings. |
Definition at line 27 of file ServiceSettings.cpp.
References _torControl, VSettings::setDefault(), SETTING_SERVICE_ENABLED, SETTING_SERVICE_PHYSICAL_ADDRESS, and SETTING_SERVICE_VIRTUAL_PORT.
| 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 154 of file ServiceSettings.cpp.
References _torControl, TorControl::saveConf(), TorControl::setConf(), and VSettings::value().
Referenced by ServicePage::startServicesInTor().
| QString ServiceSettings::getHiddenServiceDirectories | ( | ) |
Get Service Directories
Get all service directories from Tor
Definition at line 143 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 114 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 99 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 51 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 84 of file ServiceSettings.cpp.
References SETTING_SERVICE_VIRTUAL_PORT, and VSettings::value().
| bool ServiceSettings::isEnabled | ( | ) |
Returns if the Service is enabled
Definition at line 129 of file ServiceSettings.cpp.
References SETTING_SERVICE_ENABLED, and VSettings::value().
Set the service enabled
Definition at line 136 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 122 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 107 of file ServiceSettings.cpp.
References SETTING_SERVICE_ADDRESS, and VSettings::setValue().
| void ServiceSettings::setServices | ( | ServiceList | service | ) |
Set ServiceList to serialise it
Definition at line 37 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 92 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 162 of file ServiceSettings.cpp.
References _torControl, TorControl::resetConf(), and TorControl::saveConf().
Referenced by ServicePage::save().
|
private |
A TorControl object used to talk to Tor.
Definition at line 57 of file ServiceSettings.h.
Referenced by applyServices(), getHiddenServiceDirectories(), ServiceSettings(), and unpublishAllServices().
1.8.17