MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / CreateRequest

Method CreateRequest

common/HTTPDownloader.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void HTTPDownloader::CreateRequest(std::string url, Request::Callback callback, ProgressCallback* progress)
38{
39 Request* req = InternalCreateRequest();
40 req->parent = this;
41 req->type = Request::Type::Get;
42 req->url = std::move(url);
43 req->callback = std::move(callback);
44 req->progress = progress;
45 req->start_time = Common::Timer::GetCurrentValue();
46
47 std::unique_lock<std::mutex> lock(m_pending_http_request_lock);
48 if (LockedGetActiveRequestCount() < m_max_active_requests)
49 {
50 if (!StartRequest(req))
51 return;
52 }
53
54 LockedAddRequest(req);
55}
56
57void HTTPDownloader::CreatePostRequest(std::string url, std::string post_data, Request::Callback callback, ProgressCallback* progress)
58{

Callers 7

queueUpdateCheckMethod · 0.80
queueGetChangesMethod · 0.80
downloadUpdateClickedMethod · 0.80
DownloadFileMethod · 0.80
DownloadImageMethod · 0.80
ClientServerCallMethod · 0.80
DownloadCoversMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected