4 const float URL_READY_ERROR = -1;
5 const float URL_READY_CLOSED = 0;
6 const float URL_READY_CANWRITE = 1;
7 const float URL_READY_CANREAD = 2;
8 // errors: -1, or negative HTTP status code
9 typedef void(entity handle, entity pass, float status) url_ready_func;
11 void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
12 void url_fclose(entity e);
13 string url_fgets(entity e);
14 void url_fputs(entity e, string s);
16 // returns true if handled
17 float url_URI_Get_Callback(int id, float status, string data);
18 #define MIN_URL_ID URI_GET_URLLIB
19 #define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
21 void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass);