mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 18:19:36 +01:00
HTTP user agent plumbing
This commit is contained in:
1 parent
bf05fe22b1
commit
84d9b7e75d
3 files changed
+22
-1
No files matched your search
@@ -156,6 +156,9 @@ public:
|
||||
// Downloader::GetCurrentProgress won't return it in the results.
|
||||
bool IsHidden() const { return hidden_; }
|
||||
void SetHidden(bool hidden) { hidden_ = hidden; }
|
||||
void SetUserAgent(const std::string &userAgent) {
|
||||
userAgent_ = userAgent;
|
||||
}
|
||||
|
||||
private:
|
||||
void Do(); // Actually does the download. Runs on thread.
|
||||
@@ -166,6 +169,7 @@ private:
|
||||
RequestProgress progress_;
|
||||
RequestMethod method_;
|
||||
std::string postData_;
|
||||
std::string userAgent_;
|
||||
Buffer buffer_;
|
||||
std::vector<std::string> responseHeaders_;
|
||||
std::string url_;
|
||||
@@ -209,6 +213,9 @@ public:
|
||||
void CancelAll();
|
||||
|
||||
void WaitForAll();
|
||||
void SetUserAgent(const std::string &userAgent) {
|
||||
userAgent_ = userAgent;
|
||||
}
|
||||
|
||||
std::vector<float> GetCurrentProgress();
|
||||
|
||||
@@ -221,6 +228,8 @@ private:
|
||||
// These get copied to downloads_ in Update(). It's so that callbacks can add new downloads
|
||||
// while running.
|
||||
std::vector<std::shared_ptr<Download>> newDownloads_;
|
||||
|
||||
std::string userAgent_;
|
||||
};
|
||||
|
||||
} // http
|
||||
Reference in new issue
Block a user