Half done the http queue.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@264 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-02-09 23:36:27 +00:00
parent f7144a333f
commit deb1244d8c
11 changed files with 207 additions and 125 deletions
+48
View File
@@ -0,0 +1,48 @@
#ifndef RTORRENT_CORE_HTTP_QUEUE_H
#define RTORRENT_CORE_HTTP_QUEUE_H
#include <list>
#include <iosfwd>
#include <sigc++/slot.h>
namespace torrent {
class Http;
}
namespace core {
class HttpQueue : private std::list<torrent::Http*> {
public:
typedef std::list<torrent::Http*> Base;
typedef sigc::slot0<torrent::Http*> SlotFactory;
using Base::iterator;
using Base::const_iterator;
using Base::reverse_iterator;
using Base::const_reverse_iterator;
using Base::begin;
using Base::end;
using Base::rbegin;
using Base::rend;
using Base::empty;
using Base::size;
void insert(const std::string& url);
void erase(iterator itr);
void clear();
void slot_factory(SlotFactory s) { m_slotFactory = s; }
private:
void receive_done(iterator itr);
void receive_failed(iterator itr, std::string msg);
SlotFactory m_slotFactory;
};
}
#endif