]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/lib/urllib.qh
Viewmodels: cl_bobmodel: check onground for other players too
[xonotic/xonotic-data.pk3dir.git] / qcsrc / lib / urllib.qh
1 #ifndef URLLIB_H
2 #define URLLIB_H
3
4 // URI handles
5 const int URI_GET_DISCARD = 0;
6 const int URI_GET_IPBAN = 1;
7 const int URI_GET_IPBAN_END = 16;
8 const int URI_GET_CURL = 17;
9 const int URI_GET_CURL_END = 32;
10 const int URI_GET_UPDATENOTIFICATION = 33;
11 const int URI_GET_URLLIB = 128;
12 const int URI_GET_URLLIB_END = 191;
13
14 const float URL_READY_ERROR    = -1;
15 const float URL_READY_CLOSED   =  0;
16 const float URL_READY_CANWRITE =  1;
17 const float URL_READY_CANREAD  =  2;
18 // errors: -1, or negative HTTP status code
19 typedef void (entity handle, entity pass, float status) url_ready_func;
20
21 void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
22 void url_fclose(entity e);
23 string url_fgets(entity e);
24 void url_fputs(entity e, string s);
25
26 // returns true if handled
27 float url_URI_Get_Callback(int id, float status, string data);
28 #define MIN_URL_ID URI_GET_URLLIB
29 #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
30
31 void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass);
32 #endif