summaryrefslogtreecommitdiff
path: root/filecache.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-01-23 21:07:03 +0000
committerGitHub <noreply@github.com>2021-01-23 21:07:03 +0000
commitb28bfd6f208bc04b4157130eabfcf61b1825570d (patch)
tree7c2f770d7cda4d48571c8df69dc7460f1aa7bea0 /filecache.hpp
parent547124c94f8808d6dca407af7b6eb0d29ac12e45 (diff)
downloadabaddon-portaudio-b28bfd6f208bc04b4157130eabfcf61b1825570d.tar.gz
abaddon-portaudio-b28bfd6f208bc04b4157130eabfcf61b1825570d.zip
remove cpr as a dependency (#21)
abstract away library usage
Diffstat (limited to 'filecache.hpp')
-rw-r--r--filecache.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/filecache.hpp b/filecache.hpp
index 0826fc0..0eacbbd 100644
--- a/filecache.hpp
+++ b/filecache.hpp
@@ -1,13 +1,12 @@
#pragma once
-#include <cpr/cpr.h>
#include <functional>
#include <string>
#include <filesystem>
#include <vector>
#include <unordered_map>
+#include <future>
#include "util.hpp"
-
-// todo throttle requests and keep track of active requests to stop redundant requests
+#include "http.hpp"
class Cache {
public:
@@ -23,7 +22,7 @@ private:
std::string GetCachedName(std::string str);
void CleanupFutures();
void RespondFromPath(std::filesystem::path path, callback_type cb);
- void OnResponse(const cpr::Response &r);
+ void OnResponse(const http::response_type &r);
std::unique_ptr<Semaphore> m_semaphore;