Vidalia  0.3.1
Public Member Functions | Private Attributes | Friends | List of all members
Service Class Reference

#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)
 

Detailed Description

Definition at line 19 of file Service.h.

Constructor & Destructor Documentation

◆ Service() [1/2]

Service::Service ( )

Default constructor.

Default Constructor

Definition at line 15 of file Service.cpp.

◆ Service() [2/2]

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, _virtualPort, enabled(), physicalAddressPort(), serviceAddress(), serviceDirectory(), and virtualPort().

◆ ~Service()

Service::~Service ( )
virtual

Destructor

Definition at line 31 of file Service.cpp.

Member Function Documentation

◆ additionalServiceOptions()

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().

◆ enabled()

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<<(), Service(), ServicePage::serviceSelectionChanged(), and setEnabled().

◆ physicalAddressPort()

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<<(), Service(), setPhysicalAddressPort(), and ServicePage::startServicesInTor().

◆ serviceAddress()

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(), operator<<(), Service(), and setServiceAddress().

◆ serviceDirectory()

QString Service::serviceDirectory ( ) const
inline

◆ setAdditionalServiceOptions()

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().

◆ setEnabled()

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, and enabled().

Referenced by ServicePage::addService(), operator>>(), and ServicePage::serviceSelectionChanged().

◆ setPhysicalAddressPort()

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, and physicalAddressPort().

Referenced by operator>>().

◆ setServiceAddress()

void Service::setServiceAddress ( QString  serviceAddress)

Sets the adress of a service

Definition at line 42 of file Service.cpp.

References _serviceAddress, and serviceAddress().

Referenced by ServicePage::initServiceTable(), and operator>>().

◆ setServiceDirectory()

void Service::setServiceDirectory ( QString  serviceDirectory)

Sets the service directory of a service

Definition at line 60 of file Service.cpp.

References _serviceDirectory, and serviceDirectory().

Referenced by ServicePage::browseDirectory(), and operator>>().

◆ setVirtualPort()

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, and virtualPort().

Referenced by operator>>().

◆ toString()

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().

◆ virtualPort()

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<<(), Service(), setVirtualPort(), and ServicePage::startServicesInTor().

Friends And Related Function Documentation

◆ operator<<

QDataStream& operator<< ( QDataStream &  out,
const Service myObj 
)
friend

Writes service class data from myObj to the QDataStream out.

Definition at line 73 of file Service.cpp.

◆ operator>>

QDataStream& operator>> ( QDataStream &  in,
Service myObj 
)
friend

Reads service class data in from the QDataStream in and populates * the myObj object accordingly.

Definition at line 87 of file Service.cpp.

Member Data Documentation

◆ _additionalServiceOptions

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().

◆ _enabled

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().

◆ _physicalAddressPort

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().

◆ _serviceAddress

QString Service::_serviceAddress
private

The adress of the service

Definition at line 65 of file Service.h.

Referenced by Service(), serviceAddress(), setServiceAddress(), and toString().

◆ _serviceDirectory

QString Service::_serviceDirectory
private

the directory of the service

Definition at line 71 of file Service.h.

Referenced by Service(), serviceDirectory(), setServiceDirectory(), and toString().

◆ _virtualPort

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().


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