]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/urllib.qh
Declare more ints as ints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / urllib.qh
index edbca89140c3b857b780d90d328cd7b2de677c66..87dcf8dde110c3e0749f9e549470dac7b6c8cf93 100644 (file)
@@ -1,14 +1,22 @@
-float URL_READY_ERROR    = -1;
-float URL_READY_CLOSED   =  0;
-float URL_READY_CANWRITE =  1;
-float URL_READY_CANREAD  =  2;
+#ifndef URLLIB_H
+#define URLLIB_H
+
+const float URL_READY_ERROR    = -1;
+const float URL_READY_CLOSED   =  0;
+const float URL_READY_CANWRITE =  1;
+const float URL_READY_CANREAD  =  2;
 // errors: -1, or negative HTTP status code
 typedef void(entity handle, entity pass, float status) url_ready_func;
 
-void url_fopen(string url, float mode, entity pass, url_ready_func rdy);
-void url_fclose(entity e, entity pass, url_ready_func rdy);
+void url_single_fopen(string url, float mode, url_ready_func rdy, entity pass);
+void url_fclose(entity e);
 string url_fgets(entity e);
 void url_fputs(entity e, string s);
 
 // returns true if handled
-float url_URI_Get_Callback(float id, float status, string data);
+float url_URI_Get_Callback(int id, float status, string data);
+#define MIN_URL_ID URI_GET_URLLIB
+#define NUM_URL_ID (URI_GET_URLLIB_END - URI_GET_URLLIB + 1)
+
+void url_multi_fopen(string url, float mode, url_ready_func rdy, entity pass);
+#endif
\ No newline at end of file