summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/network_status.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/storage/network_status.hpp')
-rw-r--r--include/mbgl/storage/network_status.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/mbgl/storage/network_status.hpp b/include/mbgl/storage/network_status.hpp
new file mode 100644
index 0000000000..cac2ae193b
--- /dev/null
+++ b/include/mbgl/storage/network_status.hpp
@@ -0,0 +1,25 @@
+#ifndef MBGL_STORAGE_NETWORK_STATUS
+#define MBGL_STORAGE_NETWORK_STATUS
+
+#include <mutex>
+#include <set>
+
+typedef struct uv_async_s uv_async_t;
+
+namespace mbgl {
+
+class NetworkStatus {
+public:
+ static void Reachable();
+
+ static void Subscribe(uv_async_t *async);
+ static void Unsubscribe(uv_async_t *async);
+
+private:
+ static std::mutex mtx;
+ static std::set<uv_async_t *> observers;
+};
+
+}
+
+#endif \ No newline at end of file