Main Page | Alphabetical List | Class List | File List | Class Members

connectionlist.h

00001 /*
00002  * $Id: connectionlist.h,v 1.2 2005/05/08 01:00:51 akos Exp $
00003  *
00004  * Copyright (C) 2005 by Akos Polster <akos@pipacs.com>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful, but
00012  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
00013  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00014  * for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License along
00017  * with this program; if not, write to the Free Software Foundation, Inc.,
00018  * 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019  */
00020 
00021 #ifndef CONNECTIONLIST_H
00022 #define CONNECTIONLIST_H
00023 
00024 #include <qstring.h>
00025 #include <qvaluelist.h>
00026 
00027 #include "connection.h"
00028 
00033 class ConnectionList: public QValueList<Connection>
00034 {
00035 public:
00037     ConnectionList();
00038 
00040     ~ConnectionList();
00041 
00047     void remove(unsigned i);
00048 
00055     bool activate(unsigned i, const QString &pwd);
00056 
00058     void deactivate();
00059 
00061     bool hasActive() const {return hasActive_;}
00062 
00064     Connection &getActive() {return *at(active_);}
00065 
00067     void store() const;
00068 
00069 private:
00071     void remove(const Connection &conn);
00072 
00074     void remove(Iterator &it);
00075 
00077     unsigned active_;
00078 
00080     bool hasActive_;
00081 };
00082 
00083 #endif // CONNECTIONLIST_H

Generated on Fri Aug 19 23:02:10 2005 for Viperin-Z by  doxygen 1.4.4