28 lines
425 B
C++
28 lines
425 B
C++
#ifndef MBGL_STORAGE_NETWORK_STATUS
|
|
#define MBGL_STORAGE_NETWORK_STATUS
|
|
|
|
#include <mutex>
|
|
#include <set>
|
|
|
|
namespace mbgl {
|
|
|
|
namespace util {
|
|
class AsyncTask;
|
|
}
|
|
|
|
class NetworkStatus {
|
|
public:
|
|
static void Reachable();
|
|
|
|
static void Subscribe(util::AsyncTask* async);
|
|
static void Unsubscribe(util::AsyncTask* async);
|
|
|
|
private:
|
|
static std::mutex mtx;
|
|
static std::set<util::AsyncTask*> observers;
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|