ostinato/server/portmanager.h
Srivats P. a1ae3e7e6c Refactoring
- Major code reorganization of the server code across several classes with fewer 'friends'
	- New server classes - AbstractPort, PcapPort, WinPcapPort, PortManager
	- With this reorg classes have more focus than earlier and will be hopefully easy to extend

Fixes
	- Ostinato client is now able to successfully reconnect and talk to the Ostinato server after a disconnect - earlier, if a method had been pending during the disconnect, the communication was not up after a reconnect; pending methods are cleaned up at disconnect now
2009-12-26 17:33:27 +00:00

27 lines
483 B
C++

#ifndef _SERVER_PORT_MANAGER_H
#define _SERVER_PORT_MANAGER_H
#include <QList>
#include "abstractport.h"
class PortManager
{
public:
PortManager();
~PortManager();
int portCount() { return portList_.size(); }
AbstractPort* port(int id) { return portList_[id]; }
static PortManager* instance();
private:
QList<AbstractPort*> portList_;
static PortManager *instance_;
};
#endif
/* vim: set shiftwidth=4 tabstop=8 softtabstop=4 expandtab: */