Vidalia
0.3.1
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
config
Service.h
Go to the documentation of this file.
1
/*
2
** This file is part of Vidalia, and is subject to the license terms in the
3
** LICENSE file, found in the top level directory of this distribution. If you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** Vidalia source package distributed by the Vidalia Project at
6
** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7
** including this file, may be copied, modified, propagated, or distributed
8
** except according to the terms described in the LICENSE file.
9
*/
10
11
#ifndef _SERVICE_H
12
#define _SERVICE_H
13
14
#include <QString>
15
#include <QList>
16
#include <QMetaType>
17
18
19
class
Service
20
{
21
public
:
22
/** Default constructor. */
23
Service
();
24
/** Constructor to create a new Service with initial settings */
25
Service
(QString
serviceAddress
, QString
virtualPort
,
26
QString
physicalAddressPort
, QString
serviceDirectory
,
bool
enabled
);
27
/** Destructor */
28
virtual
~Service
();
29
/** Returns the service Adress of the service */
30
QString
serviceAddress
()
const
{
return
_serviceAddress
; }
31
/** Returns the listeningPort of the service */
32
QString
virtualPort
()
const
{
return
_virtualPort
; }
33
/** Returns the physical Adresse and the local Port of the service */
34
QString
physicalAddressPort
()
const
{
return
_physicalAddressPort
; }
35
/** Returns the service directory of the service */
36
QString
serviceDirectory
()
const
{
return
_serviceDirectory
; }
37
/** Returns the deployed status of a service */
38
bool
enabled
()
const
{
return
_enabled
; }
39
/** Returns the additional options of a service e.g. excludeNodes */
40
QString
additionalServiceOptions
()
const
41
{
return
_additionalServiceOptions
; }
42
/** Sets the adress of a service */
43
void
setServiceAddress
(QString serviceAddress);
44
/** Sets the listening port of a service */
45
void
setVirtualPort
(QString virtualPort);
46
/** Sets the physical Adress and the local Port of a service */
47
void
setPhysicalAddressPort
(QString physicalAddressPort);
48
/** Sets the service directory of a service */
49
void
setServiceDirectory
(QString serviceDirectory);
50
/** Sets the deployed status a service */
51
void
setEnabled
(
bool
enabled);
52
/** Sets the additional options of a service e.g. excludeNodes */
53
void
setAdditionalServiceOptions
(QString options);
54
/** Writes service class data from <b>myObj</b> to the QDataStream
55
* <b>out</b>. */
56
friend
QDataStream&
operator<<
(QDataStream &out,
const
Service
&myObj);
57
/** Reads service class data in from the QDataStream <b>in</b> and
58
populates * the <b>myObj</b> object accordingly. */
59
friend
QDataStream&
operator>>
(QDataStream &in,
Service
&myObj);
60
/** this method creates a string by concatenating the values of the service */
61
QString
toString
();
62
63
private
:
64
/** The adress of the service */
65
QString
_serviceAddress
;
66
/** The listening Port of the service */
67
QString
_virtualPort
;
68
/** The physical Adress and the local port of teh service */
69
QString
_physicalAddressPort
;
70
/** the directory of the service */
71
QString
_serviceDirectory
;
72
/** The Enabled status of the service */
73
bool
_enabled
;
74
/** Some additional service options, not configured/displayed by Vidalia */
75
QString
_additionalServiceOptions
;
76
77
};
78
Q_DECLARE_METATYPE
(
Service
);
79
#endif
/*SERIVCE_H_*/
80
Generated on Mon Jan 14 2013 08:44:27 for Vidalia by
1.8.3