Service Class Reference

#include <service.h>

List of all members.

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 18 of file service.h.


Constructor & Destructor Documentation

Service::Service (  ) 

Default constructor.

Default Constructor

Definition at line 14 of file service.cpp.

Service::Service ( QString  serviceAddress,
QString  virtualPort,
QString  physicalAddressPort,
QString  serviceDirectory,
bool  enabled 
)

Constructor to create a new Service with initial settings

Definition at line 18 of file service.cpp.

References _enabled, _physicalAddressPort, _serviceAddress, _serviceDirectory, and _virtualPort.

Service::~Service (  )  [virtual]

Destructor

Definition at line 30 of file service.cpp.


Member Function Documentation

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

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

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

QString Service::serviceDirectory (  )  const [inline]

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

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

void Service::setServiceAddress ( QString  serviceAddress  ) 

Sets the adress of a service

Definition at line 41 of file service.cpp.

References _serviceAddress.

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

void Service::setVirtualPort ( QString  virtualPort  ) 

Sets the listening port of a service

Sets the virtualPort of a service

Definition at line 47 of file service.cpp.

References _virtualPort.

Referenced by operator>>().

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 53 of file service.cpp.

References _physicalAddressPort.

Referenced by operator>>().

void Service::setServiceDirectory ( QString  serviceDirectory  ) 

Sets the service directory of a service

Definition at line 59 of file service.cpp.

References _serviceDirectory.

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

void Service::setEnabled ( bool  enabled  ) 

Sets the deployed status a service

Sets the deploy status of a service

Definition at line 35 of file service.cpp.

References _enabled.

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

void Service::setAdditionalServiceOptions ( QString  options  ) 

Sets the additional options of a service e.g. excludeNodes

Definition at line 65 of file service.cpp.

References _additionalServiceOptions.

Referenced by ServicePage::generateService(), ServiceSettings::getServices(), operator>>(), and ServicePage::save().

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 113 of file service.cpp.

References _additionalServiceOptions, _enabled, _physicalAddressPort, _serviceAddress, _serviceDirectory, and _virtualPort.

Referenced by ServiceSettings::setServices().


Friends And Related Function Documentation

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

Writes service class data from myObj to the QDataStream out.

Definition at line 72 of file service.cpp.

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

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

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

Definition at line 86 of file service.cpp.


Member Data Documentation

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::_virtualPort [private]

The listening Port of the service

Definition at line 67 of file service.h.

Referenced by Service(), setVirtualPort(), toString(), and virtualPort().

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::_serviceDirectory [private]

the directory of the service

Definition at line 71 of file service.h.

Referenced by Service(), serviceDirectory(), setServiceDirectory(), 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().

Some additional service options, not configured/displayed by Vidalia

Definition at line 75 of file service.h.

Referenced by additionalServiceOptions(), setAdditionalServiceOptions(), and toString().


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

Generated on Sat Aug 16 17:38:37 2008 for Vidalia by  doxygen 1.5.6