#include <Service.h>
Public Member Functions | |
Service () | |
Service (QString serviceAddress, QString virtualPort, QString physicalAddressPort, QString serviceDirectory, bool enabled) | |
virtual | ~Service () |
QString | serviceAddress () const |
QString | virtualPort () const |
QString | physicalAddressPort () const |
QString | serviceDirectory () const |
bool | enabled () const |
QString | additionalServiceOptions () const |
void | setServiceAddress (QString serviceAddress) |
void | setVirtualPort (QString virtualPort) |
void | setPhysicalAddressPort (QString physicalAddressPort) |
void | setServiceDirectory (QString serviceDirectory) |
void | setEnabled (bool enabled) |
void | setAdditionalServiceOptions (QString options) |
QString | toString () |
Private Attributes | |
QString | _serviceAddress |
QString | _virtualPort |
QString | _physicalAddressPort |
QString | _serviceDirectory |
bool | _enabled |
QString | _additionalServiceOptions |
Friends | |
QDataStream & | operator<< (QDataStream &out, const Service &myObj) |
QDataStream & | operator>> (QDataStream &in, Service &myObj) |
Definition at line 19 of file Service.h.
Service::Service | ( | ) |
Service::Service | ( | QString | serviceAddress, | |
QString | virtualPort, | |||
QString | physicalAddressPort, | |||
QString | serviceDirectory, | |||
bool | enabled | |||
) |
Constructor to create a new Service with initial settings
Definition at line 20 of file Service.cpp.
References _enabled, _physicalAddressPort, _serviceAddress, _serviceDirectory, and _virtualPort.
Service::~Service | ( | ) | [virtual] |
Destructor
Definition at line 31 of file Service.cpp.
QString Service::additionalServiceOptions | ( | ) | const [inline] |
Returns the additional options of a service e.g. excludeNodes
Definition at line 40 of file Service.h.
References _additionalServiceOptions.
Referenced by operator<<(), and ServicePage::startServicesInTor().
bool Service::enabled | ( | ) | const [inline] |
Returns the deployed status of a service
Definition at line 38 of file Service.h.
References _enabled.
Referenced by ServicePage::initServiceTable(), operator<<(), and ServicePage::serviceSelectionChanged().
QString Service::physicalAddressPort | ( | ) | const [inline] |
Returns the physical Adresse and the local Port of the service
Definition at line 34 of file Service.h.
References _physicalAddressPort.
Referenced by ServicePage::initServiceTable(), operator<<(), and ServicePage::startServicesInTor().
QString Service::serviceAddress | ( | ) | const [inline] |
Returns the service Adress of the service
Definition at line 30 of file Service.h.
References _serviceAddress.
Referenced by ServicePage::initServiceTable(), and operator<<().
QString Service::serviceDirectory | ( | ) | const [inline] |
Returns the service directory of the service
Definition at line 36 of file Service.h.
References _serviceDirectory.
Referenced by ServicePage::checkBeforeSaving(), ServicePage::initServiceTable(), ServicePage::isServicePublished(), operator<<(), and ServicePage::startServicesInTor().
void Service::setAdditionalServiceOptions | ( | QString | options | ) |
Sets the additional options of a service e.g. excludeNodes
Definition at line 66 of file Service.cpp.
References _additionalServiceOptions.
Referenced by ServicePage::generateService(), ServiceSettings::getServices(), operator>>(), and ServicePage::save().
void Service::setEnabled | ( | bool | enabled | ) |
Sets the deployed status a service
Sets the deploy status of a service
Definition at line 36 of file Service.cpp.
References _enabled.
Referenced by ServicePage::addService(), operator>>(), and ServicePage::serviceSelectionChanged().
void Service::setPhysicalAddressPort | ( | QString | physicalAddressPort | ) |
Sets the physical Adress and the local Port of a service
Sets the physical Adress and the local port of a service
Definition at line 54 of file Service.cpp.
References _physicalAddressPort.
Referenced by operator>>().
void Service::setServiceAddress | ( | QString | serviceAddress | ) |
Sets the adress of a service
Definition at line 42 of file Service.cpp.
References _serviceAddress.
Referenced by ServicePage::initServiceTable(), and operator>>().
void Service::setServiceDirectory | ( | QString | serviceDirectory | ) |
Sets the service directory of a service
Definition at line 60 of file Service.cpp.
References _serviceDirectory.
Referenced by ServicePage::browseDirectory(), and operator>>().
void Service::setVirtualPort | ( | QString | virtualPort | ) |
Sets the listening port of a service
Sets the virtualPort of a service
Definition at line 48 of file Service.cpp.
References _virtualPort.
Referenced by operator>>().
QString Service::toString | ( | ) |
this method creates a string by concatenating the values of the service
Creates a string by concatenating the values of the service.
Definition at line 114 of file Service.cpp.
References _additionalServiceOptions, _enabled, _physicalAddressPort, _serviceAddress, _serviceDirectory, and _virtualPort.
Referenced by ServiceSettings::setServices().
QString Service::virtualPort | ( | ) | const [inline] |
Returns the listeningPort of the service
Definition at line 32 of file Service.h.
References _virtualPort.
Referenced by ServicePage::checkBeforeSaving(), ServicePage::initServiceTable(), operator<<(), and ServicePage::startServicesInTor().
QDataStream& operator<< | ( | QDataStream & | out, | |
const Service & | myObj | |||
) | [friend] |
Writes service class data from myObj to the QDataStream out.
QDataStream& operator>> | ( | QDataStream & | in, | |
Service & | myObj | |||
) | [friend] |
Reads service class data in from the QDataStream in and populates * the myObj object accordingly.
QString Service::_additionalServiceOptions [private] |
Some additional service options, not configured/displayed by Vidalia
Definition at line 75 of file Service.h.
Referenced by additionalServiceOptions(), setAdditionalServiceOptions(), and toString().
bool Service::_enabled [private] |
The Enabled status of the service
Definition at line 73 of file Service.h.
Referenced by enabled(), Service(), setEnabled(), and toString().
QString Service::_physicalAddressPort [private] |
The physical Adress and the local port of teh service
Definition at line 69 of file Service.h.
Referenced by physicalAddressPort(), Service(), setPhysicalAddressPort(), and toString().
QString Service::_serviceAddress [private] |
The adress of the service
Definition at line 65 of file Service.h.
Referenced by Service(), serviceAddress(), setServiceAddress(), and toString().
QString Service::_serviceDirectory [private] |
the directory of the service
Definition at line 71 of file Service.h.
Referenced by Service(), serviceDirectory(), setServiceDirectory(), and toString().
QString Service::_virtualPort [private] |
The listening Port of the service
Definition at line 67 of file Service.h.
Referenced by Service(), setVirtualPort(), toString(), and virtualPort().