Vidalia
0.2.21
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
config
ServiceList.cpp
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
#include "
ServiceList.h
"
12
13
14
/** Default constructor. */
15
ServiceList::ServiceList
()
16
{
17
}
18
19
/** Constructor to create a new Servicelist with initial settings */
20
void
ServiceList::addService
(
Service
service)
21
{
22
_services
.append(service);
23
}
24
25
/** Destructor */
26
ServiceList::~ServiceList
()
27
{
28
}
29
30
/* Sets the serviceList */
31
void
ServiceList::setServices
(QList<Service> services)
32
{
33
_services
=
services
;
34
}
35
36
/** Writes ServiceList class data from <b>myObj</b> to the QDataStream
37
* <b>out</b>. */
38
QDataStream&
operator<<
(QDataStream &out,
const
ServiceList
&myObj)
39
{
40
out << myObj.
services
();
/* Write the services*/
41
return
out;
42
}
43
44
/** Reads ServiceList class data in from the QDataStream <b>in</b> and
45
populates * the <b>myObj</b> object accordingly. */
46
QDataStream&
operator>>
(QDataStream &in,
ServiceList
&myObj)
47
{
48
QList<Service> services;
49
/* Read in from the data stream */
50
in >> services;
51
/* Set the appropriate class member variables */
52
myObj.
setServices
(services);
53
/* Return the updated data stream */
54
return
in;
55
}
56
Generated on Thu Dec 6 2012 04:33:17 for Vidalia by
1.8.2