summaryrefslogtreecommitdiff
path: root/icclient/typedefs.h
blob: 73d8adfd0e449515a68e10eac69b81883bb54e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ICCLIENT_TYPEDEFS_H
#define ICCLIENT_TYPEDEFS_H

#ifdef __cplusplus
#include <cstddef>
#endif

#ifdef __EMSCRIPTEN__

#include <emscripten/fetch.h>

typedef emscripten_fetch_t icclient_response;
typedef char icclient_post;

#else

#include <curl/curl.h>

typedef struct {
	void *userData;
	char *data;
	size_t numBytes;
} icclient_response;
typedef struct curl_httppost icclient_post;

#endif

struct icclient_post_callback {
	icclient_post *post;
	void (*callback)(void *);
};

#endif