]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/mbuiltin.qh
add some test code for uri_post
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / mbuiltin.qh
index e325915c95e3791626f6c548f6b2383bbb9b0fee..32305c7c4a98a37d2245b4c98589c804ab43b087 100644 (file)
@@ -315,6 +315,21 @@ float CVAR_TYPEFLAG_READONLY = 32;
 string(string in) uri_escape = #510;
 string(string in) uri_unescape = #511;
 
+//DP_QC_URI_GET
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string
+//returns 1 on success of initiation, 0 if there are too many concurrent
+//connections already or if the URL is invalid
+//the following callback will receive the data and MUST exist!
+//  void(float id, float status, string data) URI_Get_Callback;
+//status is either
+//  negative for an internal error,
+//  0 for success, or
+//  the HTTP response code on server error (e.g. 404)
+//if 1 is returned by uri_get, the callback will be called in the future
+float(string url, float id) uri_get = #513;
+
 string(string, float) netaddress_resolve = #625;
 string(string search, string replace, string subject) strreplace = #484;
 
@@ -358,4 +373,5 @@ string(string format, ...) sprintf = #627;
 string crypto_getkeyfp(string serveraddress) = #633; // retrieves the cached host key's CA fingerprint of a server given by IP address
 string crypto_getidfp(string serveraddress) = #634; // retrieves the cached host key fingerprint of a server given by IP address
 string crypto_getencryptlevel(string serveraddress) = #635; // 0 if never encrypting, 1 supported, 2 requested, 3 required, appended by list of allowed methods in order of preference ("AES128"), preceded by a space each
+float(string url, float id, string content_type, string delim, float buf, float keyid) crypto_uri_postbuf = #513;
 //description: