mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 05:02:31 +00:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user