lsnes/include/core/filedownload.hpp
Ilari Liusvaara 4f0e636b9b Refactor workthread.hpp and threadtypes.hpp (renamed to threads.hpp)
Also rename all variables and fields named "mutex" (gdb does not like
that name).
2014-03-23 09:45:42 +02:00

35 lines
653 B
C++

#ifndef _filedownload__hpp__included__
#define _filedownload__hpp__included__
#include "library/threads.hpp"
#include "library/httpreq.hpp"
#include <string>
#include <list>
#include <vector>
struct file_download
{
//Variables.
std::string url;
std::string target_slot;
//Ctor
file_download();
~file_download();
//Lauch.
void do_async();
void cancel();
//Status.
volatile bool finished; //This signals download finishing, call finish().
std::string errormsg;
http_async_request req;
std::string statusmsg();
threads::cv cond;
threads::lock m;
//Internal.
void _do_async();
std::string tempname;
std::string tempname2;
};
#endif