Xonotic
urllib.qh
Go to the documentation of this file.
1 #pragma once
2 
3 // URI handles
4 const int URI_GET_DISCARD = 0;
5 const int URI_GET_IPBAN = 1;
6 const int URI_GET_IPBAN_END = 16;
7 const int URI_GET_CURL = 17;
8 const int URI_GET_CURL_END = 32;
10 const int URI_GET_TOS = 34;
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 USING(url_ready_func, void (entity handle, entity pass, float status));
20 
22 void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
24 void url_fclose(entity e);
26 string url_fgets(entity e);
28 void url_fputs(entity e, string s);
29 
30 // returns true if handled
32 float url_URI_Get_Callback(int id, float status, string data);
33 #define MIN_URL_ID URI_GET_URLLIB
34 #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
35 
37 void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass);
const float URL_READY_CANREAD
Definition: urllib.qh:17
const float URL_READY_CLOSED
Definition: urllib.qh:15
ERASEABLE void url_fclose(entity e)
Definition: urllib.qc:207
const float URL_READY_CANWRITE
Definition: urllib.qh:16
const int URI_GET_URLLIB
Definition: urllib.qh:11
entity() spawn
ERASEABLE void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass)
const int URI_GET_IPBAN_END
Definition: urllib.qh:6
const int URI_GET_TOS
Definition: urllib.qh:10
#define ERASEABLE
Definition: _all.inc:35
ERASEABLE void url_fputs(entity e, string s)
Definition: urllib.qc:312
const int URI_GET_IPBAN
Definition: urllib.qh:5
ERASEABLE string url_fgets(entity e)
Definition: urllib.qc:287
const int URI_GET_DISCARD
Definition: urllib.qh:4
const int URI_GET_CURL
Definition: urllib.qh:7
const int URI_GET_UPDATENOTIFICATION
Definition: urllib.qh:9
void(entity handle, entity pass, float status) url_ready_func
Definition: urllib.qh:19
const int URI_GET_URLLIB_END
Definition: urllib.qh:12
ERASEABLE void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass)
ERASEABLE float url_URI_Get_Callback(int id, float status, string data)
Definition: urllib.qc:28
const int URI_GET_CURL_END
Definition: urllib.qh:8
const float URL_READY_ERROR
Definition: urllib.qh:14
#define USING(name, T)
Definition: _all.inc:72
#define pass(name, colormin, colormax)