Annotate

teal-src/util/stanza.d.tl @ 11738:3f1450ec37f4

net.server_epoll: Improve efficiency of opportunistic writes Should prevent further opportunistic write attempts after the kernel buffers are full and stops accepting writes. When combined with `keep_buffers = false` it should stop it from repeatedly recreating the buffer table and concatenating it back into a string when there's a lot to write.
author Kim Alvefur <zash@zash.se>
date Sat, 14 Aug 2021 13:07:29 +0200
parent 11642:7f2dee4249aa
child 12516:d76ac22f3571
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local record lib
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 type children_iter = function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 type childtags_iter = function () : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 type maptags_cb = function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 record stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 name : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 attr : { string : string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 { stanza_t | string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 tags : { stanza_t }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 query : function ( stanza_t, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 body : function ( stanza_t, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 text_tag : function ( stanza_t, string, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 tag : function ( stanza_t, string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17 text : function ( stanza_t, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 up : function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19 reset : function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 add_direct_child : function ( stanza_t, stanza_t )
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 add_child : function ( stanza_t, stanza_t )
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 remove_children : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 get_child : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 get_text : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 get_child_text : function ( stanza_t, string, string ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 child_with_name : function ( stanza_t, string, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28 child_with_ns : function ( stanza_t, string, string ) : stanza_t
11459
86904555bffc teal: Use new integer support in Teal 0.13.0
Kim Alvefur <zash@zash.se>
parents: 11432
diff changeset
29 children : function ( stanza_t ) : children_iter, stanza_t, integer
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 childtags : function ( stanza_t, string, string ) : childtags_iter
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31 maptags : function ( stanza_t, maptags_cb ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 find : function ( stanza_t, string ) : stanza_t | string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
33
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
34 top_tag : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
35 pretty_print : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
36 pretty_top_tag : function ( stanza_t ) : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
37
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
38 get_error : function ( stanza_t ) : string, string, string, stanza_t
11459
86904555bffc teal: Use new integer support in Teal 0.13.0
Kim Alvefur <zash@zash.se>
parents: 11432
diff changeset
39 indent : function ( stanza_t, integer, string ) : stanza_t
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
40 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
41
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
42 record serialized_stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
43 name : string
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
44 attr : { string : string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
45 { serialized_stanza_t | string }
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
46 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
47
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
48 stanza : function ( string, { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
49 is_stanza : function ( any ) : boolean
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
50 preserialize : function ( stanza_t ) : serialized_stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
51 deserialize : function ( serialized_stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
52 clone : function ( stanza_t, boolean ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
53 message : function ( { string : string }, string ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
54 iq : function ( { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
55 reply : function ( stanza_t ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
56 error_reply : function ( stanza_t, string, string, string, string )
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
57 presence : function ( { string : string } ) : stanza_t
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
58 xml_escape : function ( string ) : string
11642
7f2dee4249aa util.stanza: Export pretty printing function
Kim Alvefur <zash@zash.se>
parents: 11459
diff changeset
59 pretty_print : function ( string ) : string
11432
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
60 end
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
61
113f3912c7cb util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff changeset
62 return lib