4 #include "../common/util.qh"
7 const int URI_GET_DISCARD = 0;
8 const int URI_GET_IPBAN = 1;
9 const int URI_GET_IPBAN_END = 16;
10 const int URI_GET_CURL = 17;
11 const int URI_GET_CURL_END = 32;
12 const int URI_GET_UPDATENOTIFICATION = 33;
13 const int URI_GET_URLLIB = 128;
14 const int URI_GET_URLLIB_END = 191;
16 const float URL_READY_ERROR = -1;
17 const float URL_READY_CLOSED = 0;
18 const float URL_READY_CANWRITE = 1;
19 const float URL_READY_CANREAD = 2;
20 // errors: -1, or negative HTTP status code
21 typedef void(entity handle, entity pass, float status) url_ready_func;
23 void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
24 void url_fclose(entity e);
25 string url_fgets(entity e);
26 void url_fputs(entity e, string s);
28 // returns true if handled
29 float url_URI_Get_Callback(int id, float status, string data);
30 #define MIN_URL_ID URI_GET_URLLIB
31 #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
33 void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass);