Renamed engine to core.

Added focus to WindowDownloadList.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@249 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-01-31 17:59:16 +00:00
parent c3a4a7d554
commit cd9b014eb6
17 changed files with 107 additions and 47 deletions
+61
View File
@@ -0,0 +1,61 @@
#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();
void set_url(const std::string& url);
const std::string& get_url() const;
void set_out(std::ostream* out);
std::ostream* get_out();
void set_user_agent(const std::string& s);
const std::string& get_user_agent();
bool is_busy() { return m_handle; }
SignalDone& signal_done();
SignalFailed& signal_failed();
protected:
CURL* handle() { return m_handle; }
void perform(CURLMsg* msg);
private:
friend size_t curl_get_receive_write(void* data, size_t size, size_t nmemb, void* handle);
std::string m_url;
std::string m_useragent;
std::ostream* m_out;
CURL* m_handle;
CurlStack* m_stack;
sigc::signal0<void> m_done;
sigc::signal1<void, std::string> m_failed;
};
}
#endif