Vidalia  0.3.1
ServiceList.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 _SERVICELIST_H
12 #define _SERVICELIST_H
13 
14 #include "Service.h"
15 
16 #include <QList>
17 
18 
20 {
21 public:
22 
23  /** Default constructor. */
24  ServiceList();
25  /** Destructor */
26  virtual ~ServiceList();
27  /** Returns the list of services */
28  void addService(Service service);
29  /** Sets the lists of services */
30  void setServices(QList<Service> services);
31  /** Returns the list of services */
32  QList<Service> services() const {
33  return _services;
34  }
35  /** Writes ServiceList class data from <b>myObj</b> to the QDataStream
36  * <b>out</b>. */
37  friend QDataStream& operator<<(QDataStream &out, const ServiceList &myObj);
38  /** Reads ServiceList class data in from the QDataStream <b>in</b> and
39  populates * the <b>myObj</b> object accordingly. */
40  friend QDataStream& operator>>(QDataStream &in, ServiceList &myObj);
41 
42 private:
43 
44  /** The list of Services */
45  QList<Service> _services;
46 
47 };
49 
50 #endif
51 
ServiceList::_services
QList< Service > _services
Definition: ServiceList.h:45
ServiceList::operator>>
friend QDataStream & operator>>(QDataStream &in, ServiceList &myObj)
Definition: ServiceList.cpp:46
ServiceList::operator<<
friend QDataStream & operator<<(QDataStream &out, const ServiceList &myObj)
Definition: ServiceList.cpp:38
ServiceList::services
QList< Service > services() const
Definition: ServiceList.h:32
Service
Definition: Service.h:19
ServiceList::setServices
void setServices(QList< Service > services)
Definition: ServiceList.cpp:31
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(ServiceList)
ServiceList::~ServiceList
virtual ~ServiceList()
Definition: ServiceList.cpp:26
Service.h
ServiceList::ServiceList
ServiceList()
Definition: ServiceList.cpp:15
ServiceList::addService
void addService(Service service)
Definition: ServiceList.cpp:20
ServiceList
Definition: ServiceList.h:19