mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 05:32:31 +00:00
deb1244d8c
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@264 e378c898-3ddf-0310-93e7-cc216c733640
47 lines
858 B
C++
47 lines
858 B
C++
#ifndef RTORRENT_CORE_CURL_GET_H
|
|
#define RTORRENT_CORE_CURL_GET_H
|
|
|
|
#include <iosfwd>
|
|
#include <string>
|
|
#include <curl/curl.h>
|
|
#include <torrent/http.h>
|
|
#include <sigc++/signal.h>
|
|
|
|
struct CURLMsg;
|
|
|
|
namespace core {
|
|
|
|
class CurlGet : public torrent::Http {
|
|
public:
|
|
friend class CurlStack;
|
|
|
|
CurlGet(CurlStack* s);
|
|
virtual ~CurlGet();
|
|
|
|
static CurlGet* new_object(CurlStack* s);
|
|
|
|
void start();
|
|
void close();
|
|
|
|
bool is_busy() { return m_handle; }
|
|
|
|
protected:
|
|
CURL* handle() { return m_handle; }
|
|
|
|
void perform(CURLMsg* msg);
|
|
|
|
private:
|
|
CurlGet(const CurlGet&);
|
|
void operator = (const CurlGet&);
|
|
|
|
friend size_t curl_get_receive_write(void* data, size_t size, size_t nmemb, void* handle);
|
|
|
|
CURL* m_handle;
|
|
|
|
CurlStack* m_stack;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|