Vidalia 0.2.15
|
00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.torproject.org/projects/vidalia.html. No part of Vidalia, 00007 ** including this file, may be copied, modified, propagated, or distributed 00008 ** except according to the terms described in the LICENSE file. 00009 */ 00010 00011 #ifndef _SERVICESETTINGS_H 00012 #define _SERVICESETTINGS_H 00013 00014 #include <TorControl.h> 00015 #include <ServiceList.h> 00016 #include <VidaliaSettings.h> 00017 #include <ExitPolicy.h> 00018 00019 00020 /* XXX: Domenik: Shouldn't this inherit AbstractTorSettings like the rest of 00021 * the settings classes? */ 00022 class ServiceSettings : private VidaliaSettings 00023 { 00024 public: 00025 /** Constructor */ 00026 ServiceSettings(TorControl *torControl); 00027 /** Returns the service port for a specific service*/ 00028 QString getVirtualPort(); 00029 /** Set the service port for a specific service*/ 00030 void setVirtualPort(QString servicePort); 00031 /** Returns the .onion - service address for a specific service */ 00032 QString getServiceAddress(); 00033 /** Set the .onion - service address for a specific service */ 00034 void setServiceAddress(QString serviceAddress); 00035 /** Returns the service address or hostname for a specific service */ 00036 QString getPhysicalAddressPort(); 00037 /** Set the service address or hostname for a specific service */ 00038 void setPhysicalAddressPort(QString physicalAddress); 00039 /** Returns if the Service is enabled */ 00040 bool isEnabled(); 00041 /** Set the service enabled */ 00042 void setEnabled(bool enabled); 00043 /** Returns a ServiceList containing all services */ 00044 ServiceList getServices(); 00045 /** Set ServiceList to serialise it */ 00046 void setServices(ServiceList services); 00047 /** Get Service Directories */ 00048 QString getHiddenServiceDirectories(); 00049 /** Set all services the user wants to start and send it to the 00050 * Tor Controller */ 00051 void applyServices(QString value, QString *errmsg); 00052 /** Unpublish all services */ 00053 void unpublishAllServices(QString *errmsg); 00054 00055 private: 00056 /** A TorControl object used to talk to Tor. */ 00057 TorControl* _torControl; 00058 }; 00059 00060 #endif 00061