00001 #ifndef HTTPCONNECTIONHANDLERPOOL_H 00002 #define HTTPCONNECTIONHANDLERPOOL_H 00003 00004 #include <QList> 00005 #include <QTimer> 00006 #include <QObject> 00007 #include "httpconnectionhandler.h" 00008 00029 class HttpConnectionHandlerPool : public QObject { 00030 Q_OBJECT 00031 Q_DISABLE_COPY(HttpConnectionHandlerPool) 00032 public: 00033 00040 HttpConnectionHandlerPool(QSettings* settings, HttpRequestHandler* requestHandler); 00041 00043 virtual ~HttpConnectionHandlerPool(); 00044 00046 HttpConnectionHandler* getConnectionHandler(); 00047 00048 private: 00049 00051 QSettings* settings; 00052 00054 HttpRequestHandler* requestHandler; 00055 00057 QList<HttpConnectionHandler*> pool; 00058 00060 QTimer cleanupTimer; 00061 00062 private slots: 00063 00065 void cleanup(); 00066 00067 }; 00068 00069 #endif // HTTPCONNECTIONHANDLERPOOL_H