summaryrefslogtreecommitdiff
path: root/interchange/typedefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'interchange/typedefs.h')
-rw-r--r--interchange/typedefs.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/interchange/typedefs.h b/interchange/typedefs.h
new file mode 100644
index 0000000..02a412f
--- /dev/null
+++ b/interchange/typedefs.h
@@ -0,0 +1,18 @@
+#ifndef INTERCHANGE_TYPEDEFS_H
+#define INTERCHANGE_TYPEDEFS_H
+
+#include <stddef.h>
+#ifdef __EMSCRIPTEN__
+#include <emscripten/fetch.h>
+typedef emscripten_fetch_t interchange_response;
+#else
+#include <curl/curl.h>
+typedef struct {
+ void *userData;
+ char *data;
+ size_t numBytes;
+ CURL *curl;
+} interchange_response;
+#endif
+
+#endif