summaryrefslogtreecommitdiff
path: root/icclient
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-17 20:52:46 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-06-17 20:52:46 +0800
commit0ca65138cf02d6c46e1857e911a142d08cdad761 (patch)
tree13f43c6755f6bfde8861ff6f682206133893032b /icclient
parentac40a2ae4e9ca7a386caba1505b454a15c3dce7a (diff)
Container for post and callback
Diffstat (limited to 'icclient')
-rw-r--r--icclient/typedefs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/icclient/typedefs.h b/icclient/typedefs.h
index 2b0ec21..fbfa0d0 100644
--- a/icclient/typedefs.h
+++ b/icclient/typedefs.h
@@ -4,15 +4,30 @@
#ifdef __cplusplus
#include <cstddef>
#endif
+
#ifdef __EMSCRIPTEN__
+
#include <emscripten/fetch.h>
+
typedef emscripten_fetch_t icclient_fetch_t;
+typedef char icclient_post;
+
#else
+
+#include <curl/curl.h>
+
typedef struct {
void *userData;
char *data;
size_t numBytes;
} icclient_fetch_t;
+typedef struct curl_httppost icclient_post;
+
#endif
+struct icclient_post_callback {
+ icclient_post *post;
+ void (*callback)(icclient_fetch_t *);
+};
+
#endif