22 #ifndef BACKENDS_NETWORKING_CURL_CONNECTIONMANAGER_H 23 #define BACKENDS_NETWORKING_CURL_CONNECTIONMANAGER_H 25 #include "backends/networking/curl/request.h" 26 #include "common/str.h" 27 #include "common/singleton.h" 28 #include "common/hashmap.h" 29 #include "common/mutex.h" 37 class NetworkReadStream;
40 static const uint32 FRAMES_PER_SECOND = 100;
41 static const uint32 TIMER_INTERVAL = 1000000 / FRAMES_PER_SECOND;
42 static const uint32 CLOUD_PERIOD = 1;
43 static const uint32 CURL_PERIOD = 1;
44 static const uint32 DEBUG_PRINT_PERIOD = FRAMES_PER_SECOND;
46 friend void connectionsThread(
void *);
70 struct RequestWithCallback {
72 RequestCallback onDeleteCallback;
74 RequestWithCallback(
Request *rq =
nullptr, RequestCallback cb =
nullptr): request(rq), onDeleteCallback(cb) {}
83 void startTimer(
int interval = TIMER_INTERVAL);
86 void interateRequests();
87 void processTransfers();
88 bool hasAddedRequests();
119 static uint32 getCloudRequestsPeriodInMicroseconds();
126 #define ConnMan Networking::ConnectionManager::instance()
Definition: scummvmcloud.h:31
Definition: connectionmanager.h:39
Common::String urlEncode(const Common::String &s) const
Request * addRequest(Request *request, RequestCallback callback=nullptr)
void registerEasyHandle(CURL *easy) const
static Common::String getCaCertPath()
Definition: singleton.h:42
Definition: request.h:119