MapLibre Native Core
Main Page
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
Typedefs
a
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerations
a
b
c
e
f
h
i
k
l
m
n
o
r
s
t
v
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Functions
a
b
e
i
m
o
s
t
Files
File List
File Members
All
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
network_status.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <atomic>
4
#include <mutex>
5
#include <unordered_set>
6
7
namespace
mbgl
{
8
9
namespace
util {
10
class
AsyncTask;
11
}
// namespace util
12
13
class
NetworkStatus
{
14
public
:
15
enum class
Status
: uint8_t {
16
Online
,
17
Offline
,
18
};
19
20
static
Status
Get
();
21
static
void
Set
(
Status
);
22
23
static
void
Reachable
();
24
25
static
void
Subscribe
(
util::AsyncTask
* async);
26
static
void
Unsubscribe
(
util::AsyncTask
* async);
27
28
private
:
29
static
std::atomic<bool> online;
30
static
std::mutex mtx;
31
static
std::unordered_set<util::AsyncTask*> observers;
32
};
33
34
}
// namespace mbgl
mbgl::NetworkStatus
Definition:
network_status.hpp:13
mbgl::NetworkStatus::Set
static void Set(Status)
mbgl::NetworkStatus::Get
static Status Get()
mbgl::NetworkStatus::Status
Status
Definition:
network_status.hpp:15
mbgl::NetworkStatus::Status::Online
@ Online
mbgl::NetworkStatus::Status::Offline
@ Offline
mbgl::NetworkStatus::Subscribe
static void Subscribe(util::AsyncTask *async)
mbgl::NetworkStatus::Unsubscribe
static void Unsubscribe(util::AsyncTask *async)
mbgl::NetworkStatus::Reachable
static void Reachable()
mbgl::util::AsyncTask
Definition:
async_task.hpp:11
mbgl
Definition:
actor.hpp:15
include
mbgl
storage
network_status.hpp
MapLibre website
|
GitHub repository