Vidalia 0.2.12
|
00001 /* 00002 ** This file is part of Vidalia, and is subject to the license terms in the 00003 ** LICENSE file, found in the top level directory of this distribution. If you 00004 ** did not receive the LICENSE file with this file, you may obtain it from the 00005 ** Vidalia source package distributed by the Vidalia Project at 00006 ** http://www.vidalia-project.net/. No part of Vidalia, including this file, 00007 ** may be copied, modified, propagated, or distributed except according to the 00008 ** terms described in the LICENSE file. 00009 */ 00010 00011 #ifndef _SERVICELIST_H 00012 #define _SERVICELIST_H 00013 00014 #include "Service.h" 00015 00016 #include <QList> 00017 00018 00019 class ServiceList 00020 { 00021 public: 00022 00023 /** Default constructor. */ 00024 ServiceList(); 00025 /** Destructor */ 00026 virtual ~ServiceList(); 00027 /** Returns the list of services */ 00028 void addService(Service service); 00029 /** Sets the lists of services */ 00030 void setServices(QList<Service> services); 00031 /** Returns the list of services */ 00032 QList<Service> services() const { 00033 return _services; 00034 } 00035 /** Writes ServiceList class data from <b>myObj</b> to the QDataStream 00036 * <b>out</b>. */ 00037 friend QDataStream& operator<<(QDataStream &out, const ServiceList &myObj); 00038 /** Reads ServiceList class data in from the QDataStream <b>in</b> and 00039 populates * the <b>myObj</b> object accordingly. */ 00040 friend QDataStream& operator>>(QDataStream &in, ServiceList &myObj); 00041 00042 private: 00043 00044 /** The list of Services */ 00045 QList<Service> _services; 00046 00047 }; 00048 Q_DECLARE_METATYPE(ServiceList); 00049 00050 #endif 00051