mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
http_lib.h - cleanups
This commit is contained in:
parent
384e27a0b1
commit
d40f7467eb
46
http_lib.h
46
http_lib.h
@ -23,33 +23,34 @@ extern int http_proxy_port;
|
||||
typedef enum
|
||||
{
|
||||
/* Client side errors */
|
||||
ERRHOST=-1, /* No such host */
|
||||
ERRSOCK=-2, /* Can't create socket */
|
||||
ERRCONN=-3, /* Can't connect to host */
|
||||
ERRWRHD=-4, /* Write error on socket while writing header */
|
||||
ERRWRDT=-5, /* Write error on socket while writing data */
|
||||
ERRRDHD=-6, /* Read error on socket while reading result */
|
||||
ERRPAHD=-7, /* Invalid answer from data server */
|
||||
ERRNULL=-8, /* NULL data pointer */
|
||||
ERRNOLG=-9, /* No/Bad length in header */
|
||||
ERRMEM=-10, /* Can't allocate memory */
|
||||
ERRRDDT=-11,/* Read error while reading data */
|
||||
ERRURLH=-12,/* Invalid URL - must start with 'http://' */
|
||||
ERRURLP=-13,/* Invalid port in URL */
|
||||
|
||||
ERRHOST = -1, /* No such host */
|
||||
ERRSOCK = -2, /* Can't create socket */
|
||||
ERRCONN = -3, /* Can't connect to host */
|
||||
ERRWRHD = -4, /* Write error on socket while writing header */
|
||||
ERRWRDT = -5, /* Write error on socket while writing data */
|
||||
ERRRDHD = -6, /* Read error on socket while reading result */
|
||||
ERRPAHD = -7, /* Invalid answer from data server */
|
||||
ERRNULL = -8, /* NULL data pointer */
|
||||
ERRNOLG = -9, /* No/Bad length in header */
|
||||
ERRMEM = -10, /* Can't allocate memory */
|
||||
ERRRDDT = -11, /* Read error while reading data */
|
||||
ERRURLH = -12, /* Invalid URL - must start with 'http://' */
|
||||
ERRURLP = -13, /* Invalid port in URL */
|
||||
|
||||
/* Return code by the server */
|
||||
|
||||
ERR400=400, /* Invalid query */
|
||||
ERR403=403, /* Forbidden */
|
||||
ERR408=408, /* Request timeout */
|
||||
ERR500=500, /* Server error */
|
||||
ERR501=501, /* Not implemented */
|
||||
ERR503=503, /* Service overloaded */
|
||||
ERR400 = 400, /* Invalid query */
|
||||
ERR403 = 403, /* Forbidden */
|
||||
ERR408 = 408, /* Request timeout */
|
||||
ERR500 = 500, /* Server error */
|
||||
ERR501 = 501, /* Not implemented */
|
||||
ERR503 = 503, /* Service overloaded */
|
||||
|
||||
/* Succesful results */
|
||||
OK0 = 0, /* successfully parsed */
|
||||
OK201=201, /* Resource succesfully created */
|
||||
OK200=200 /* Resource succesfully read */
|
||||
OK0 = 0, /* successfully parsed */
|
||||
OK201 = 201, /* Resource succesfully created */
|
||||
OK200 = 200 /* Resource succesfully read */
|
||||
|
||||
} http_retcode;
|
||||
|
||||
@ -59,6 +60,7 @@ typedef enum
|
||||
#ifndef OSK
|
||||
http_retcode http_put(const char *filename, const char *data, int length,
|
||||
int overwrite, const char *type) ;
|
||||
|
||||
http_retcode http_get(const char *filename, char **pdata,int *plength, char *typebuf);
|
||||
|
||||
http_retcode http_parse_url(char *url, char **pfilename);
|
||||
|
Loading…
x
Reference in New Issue
Block a user