add reachability
This commit is contained in:
@@ -123,6 +123,9 @@ public:
|
||||
void toggleDebug();
|
||||
bool getDebug() const;
|
||||
|
||||
// Call this when the network reachability changed.
|
||||
void setReachability(bool status);
|
||||
|
||||
public:
|
||||
inline const TransformState &getState() const { return state; }
|
||||
inline util::ptr<FileSource> getFileSource() const { return fileSource; }
|
||||
|
||||
@@ -41,6 +41,10 @@ public:
|
||||
// This function must call notify().
|
||||
virtual void cancel() = 0;
|
||||
|
||||
// This function is called when the request should be reattempted immediately. This is typically
|
||||
// reaction to a network status change.
|
||||
virtual void retryImmediately();
|
||||
|
||||
public:
|
||||
const unsigned long thread_id;
|
||||
const std::string path;
|
||||
|
||||
@@ -36,6 +36,8 @@ public:
|
||||
|
||||
void prepare(std::function<void()> fn);
|
||||
|
||||
void retryAllPending();
|
||||
|
||||
private:
|
||||
const unsigned long thread_id;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public:
|
||||
~HTTPRequest();
|
||||
|
||||
void cancel();
|
||||
void retryImmediately();
|
||||
|
||||
private:
|
||||
void startCacheRequest();
|
||||
|
||||
Reference in New Issue
Block a user