diff options
author | Jan200101 <sentrycraft123@gmail.com> | 2022-06-06 22:03:57 +0200 |
---|---|---|
committer | Jan200101 <sentrycraft123@gmail.com> | 2022-06-08 20:06:12 +0200 |
commit | d5d61d18c89af3f6743b7c56774eebdfdcc87b2c (patch) | |
tree | b4299c1af7e194e9083d4de1bce382102ea46e95 /src/net.h | |
download | OFQT-d5d61d18c89af3f6743b7c56774eebdfdcc87b2c.tar.gz OFQT-d5d61d18c89af3f6743b7c56774eebdfdcc87b2c.zip |
Release 0.1.00.1.0
Diffstat (limited to 'src/net.h')
-rw-r--r-- | src/net.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h new file mode 100644 index 0000000..fc6d34a --- /dev/null +++ b/src/net.h @@ -0,0 +1,28 @@ +#ifndef NET_H +#define NET_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <curl/curl.h> +#include <json.h> + +struct MemoryStruct { + uint8_t* memory; + size_t size; +}; + +void net_init(); +void net_deinit(); + +struct MemoryStruct* downloadToRam(const char* URL); +size_t downloadToFile(const char*, const char*); +void freeDownload(struct MemoryStruct* chunk); +struct json_object* fetchJSON(const char*); + +#ifdef __cplusplus +} +#endif + +#endif |