summaryrefslogtreecommitdiff
path: root/include/mbgl/storage/request_callback.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/storage/request_callback.hpp')
-rw-r--r--include/mbgl/storage/request_callback.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mbgl/storage/request_callback.hpp b/include/mbgl/storage/request_callback.hpp
new file mode 100644
index 0000000000..01427bd96d
--- /dev/null
+++ b/include/mbgl/storage/request_callback.hpp
@@ -0,0 +1,22 @@
+#ifndef MBGL_STORAGE_REQUEST_CALLBACK
+#define MBGL_STORAGE_REQUEST_CALLBACK
+
+#include <mbgl/util/variant.hpp>
+
+#include <functional>
+
+namespace mbgl {
+
+class Response;
+
+using CompletedCallback = std::function<void(const Response &)>;
+using AbortedCallback = std::function<void()>;
+
+using Callback = mapbox::util::variant<
+ CompletedCallback,
+ AbortedCallback
+>;
+
+}
+
+#endif