first attempt to download something

This commit is contained in:
Blue 2023-09-01 18:39:24 -03:00
parent 60b2220b97
commit 7ac697f111
Signed by: blue
GPG key ID: 9B203B252A63EE38
9 changed files with 296 additions and 42 deletions

View file

@ -2,6 +2,10 @@
#include <string>
#include <optional>
#include <filesystem>
#include <curl/curl.h>
#include <stdio.h>
class Dependency {
public:
@ -22,8 +26,14 @@ public:
std::optional<std::string> getName() const;
std::optional<std::string> getVersion() const;
bool prepare(const std::filesystem::path& source, const std::filesystem::path& destination);
const std::string path;
private:
static size_t write(void *file, size_t size, size_t nmemb, void *stream);
bool download(const std::filesystem::path& destination);
private:
Type type;
std::optional<std::string> name;