This commit is contained in:
Simon Hardt
2021-05-27 15:53:00 +02:00
parent 35d35ec087
commit 7903b0b8c5
15 changed files with 941 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
//
// Created by s-har on 25.05.2021.
//
#pragma once
#include <vector>
#include <string>
#include <thread>
#include <soci/session.h>
#include "tables.hpp"
class Worker
{
std::thread thread;
soci::session& sql;
std::string output_path = "./downloads";
public:
explicit Worker(soci::session& sql);
[[noreturn]] void loop();
private:
bool getTask(File& task);
bool download(File& task);
};