forked from bandrews/mqttaudio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSDL_rwhttp.h
executable file
·85 lines (70 loc) · 1.95 KB
/
SDL_rwhttp.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef _SDL_RWHTTP_
#define _SDL_RWHTTP_
#include <SDL.h>
#include <SDL_version.h>
#include <begin_code.h>
#define HAVE_CURL
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
#define SDL_RWHTTP_MAJOR_VERSION 0
#define SDL_RWHTTP_MINOR_VERSION 2
#define SDL_RWHTTP_PATCHLEVEL 0
#define SDL_RWHTTP_VERSION(x) \
{ \
(x)->major = SDL_RWHTTP_MAJOR_VERSION; \
(x)->minor = SDL_RWHTTP_MINOR_VERSION; \
(x)->patch = SDL_RWHTTP_PATCHLEVEL; \
}
#define SDL_RWOPS_HTTP 404
/**
* \brief A variable that lets you specify the user agent the requests are using.
*
* \note The value can not be changed after \c SDL_RWHttpInit was called.
*/
#define SDL_RWHTTP_HINT_USER_AGENT "SDL_RWHTTP_USERAGENT"
/**
* \brief
*
* \note The value can not be changed after \c SDL_RWHttpInit was called.
*/
#define SDL_RWHTTP_HINT_CONNECTTIMEOUT "SDL_RWHTTP_CONNECTTIMEOUT"
/**
* \brief
*
* \note The value can not be changed after \c SDL_RWHttpInit was called.
*/
#define SDL_RWHTTP_HINT_TIMEOUT "SDL_RWHTTP_TIMEOUT"
/**
* \brief Defines the max. allowed size of a file to download.
*
* \note The value can not be changed after \c SDL_RWHttpInit was called.
*/
#define SDL_RWHTTP_HINT_FETCHLIMIT "SDL_RWHTTP_FETCHLIMIT"
/**
* \brief Initializes the library. Should only be called once per application.
* Also initializes and caches the hint values.
*
* \return -1 if any error occurred, 0 otherwise.
*/
extern DECLSPEC int SDL_RWHttpInit (void);
/*
* \brief Cleanup the library.
*
* \return -1 if any error occurred, 0 otherwise.
*/
extern DECLSPEC int SDL_RWHttpShutdown (void);
/**
* \name RWFrom functions
*
* Functions to create SDL_RWops structures from http streams.
*/
extern DECLSPEC SDL_RWops* SDL_RWFromHttpAsync (const char *uri);
extern DECLSPEC SDL_RWops* SDL_RWFromHttpSync (const char *uri);
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include <close_code.h>
#endif