Annotate

teal-src/plugins/muc/muc.lib.d.tl @ 12891:93ce4244d433

MUC: Start on a Teal description of MUC rooms Started as part of a documentation project for the MUC API
author Kim Alvefur <zash@zash.se>
date Mon, 20 Feb 2023 15:08:06 +0100
child 12892:d788714fcf21
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12891
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 local Stanza = require "util.stanza".stanza_t
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 local record Room
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 enum Affiliation
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 "outcast"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 "none"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 "member"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10 "admin"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 "owner"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 end
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 enum Role
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 "none"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 "visitor"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17 "participant"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 "moderator"
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19 end
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 record Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 bare_jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 nick : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 sessions : { string : Stanza }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 role : Role
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 end
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29 -- Private properties
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 _jid_nick : { string : string }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31 _occupants : { string : Occupant }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 _data : { string : any }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
33 _affiliations : { string : Affiliation }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
34 _affiliation_data : { string : { string : any } }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
35
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
36 -- Occupant methods
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
37 get_occupant_jid : function (Room, real_jid : string) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
38 new_occupant : function (Room, bare_real_jid : string, nick : string) : Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
39 get_occupant_by_nick : function (Room, nick : string) : Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
40 type OccupantIterator = function ({string:Occupant}, occupant_jid : string) : string, Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
41 each_occupant : function (Room, read_only : boolean) : OccupantIterator, {string:Occupant}, nil
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
42 has_occupant : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
43 get_occupant_by_real_jid : function (Room, real_jid : string) : Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
44 save_occupant :function (Room, Occupant) : Occupant
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
45
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
46 -- Affiliation methods
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
47 type AffiliationIterator = function (any, jid : string) : string, Affiliation
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
48 get_affiliation : function (Room, jid : string) : Affiliation
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
49 each_affiliation : function (Room, Affiliation) : AffiliationIterator, nil, nil
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
50 set_affiliation : function (Room, jid : string, Affiliation, reason : string, data : { string : any }) : boolean, string, string, string -- ok + error tripplet
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
51 get_affiliation_data : function (Room, jid : string, key : string) : any
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
52 set_affiliation_data : function (Room, jid : string, key : string, value : any) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
53 get_registered_nick : function (Room, jid : string) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
54 get_registered_jid : function (Room, nick : string) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
55
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
56 -- Role methods
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
57 get_default_role : function (Room, Affiliation) : Role, integer
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
58 get_role : function (Room, nick : string) : Role
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
59 may_set_role : function (Room, actor : string, Occupant, Role) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
60 set_role : function (Room, actor : string, occupant_jid : string, Role, reason : string) : boolean, string, string, string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
61
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
62 -- Routing input, generally handled by mod_muc and hooked up to Prosody routing events
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
63 handle_first_presence : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
64 handle_normal_presence : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
65 handle_presence_to_room : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
66 handle_presence_to_occupant : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
67 handle_message_to_room : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
68 handle_message_to_occupant : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
69 handle_groupchat_to_room : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
70 handle_iq_to_occupant : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
71 handle_disco_info_get_query : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
72 handle_disco_items_get_query : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
73 handle_admin_query_set_command : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
74 handle_admin_query_get_command : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
75 handle_owner_query_get_to_room : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
76 handle_owner_query_set_to_room : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
77 handle_mediated_invite : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
78 handle_mediated_decline : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
79 handle_role_request : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
80 handle_register_iq : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
81 handle_kickable : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
82
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
83 -- Routing output
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
84 broadcast : function (Room, Stanza, function (nick : string, Occupant) : boolean)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
85 broadcast_message : function (Room, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
86 route_stanza : function (Room, Stanza)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
87 route_to_occupant : function (Room, Occupant, Stanza)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
88
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
89 -- Sending things to someone joining
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
90 publicise_occupant_status : function (Room, Occupant, x : Stanza, nick : string, actor : string, reason : string, prev_role : Role, force_unavailable : boolean, recipient : Occupant)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
91 send_occupant_list : function (Room, to : string, filter : function (occupant_jid : string, Occupant) : boolean)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
92 send_history : function (Room, Stanza)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
93 send_subject : function (Room, to : string, time : number)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
94
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
95 respond_to_probe : function (Room, table, Stanza, Occupant)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
96
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
97 -- Constructors for various answer stanzas
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
98 get_disco_info : function (Room, Stanza) : Stanza
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
99 get_disco_items : function (Room, Stanza) : Stanza
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
100
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
101 build_item_list : function (Room, Occupant, Stanza, is_anonymous : boolean, nick : string, actor_nick : string, actor_jid : string, reason : string) : Stanza
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
102 build_unavailable_presence : function (Room, from_muc_jid : string, to_jid : string) : Stanza
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
103
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
104 -- Form handling
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
105 send_form : function (Room, table, Stanza)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
106 get_form_layout : function (Room, actor : string) : table
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
107 process_form : function (Room, table, Stanza) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
108
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
109 -- Properties and configuration
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
110 get_name : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
111 set_name : function (Room, string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
112 get_description : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
113 set_description : function (Room, string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
114 get_language : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
115 set_language : function (Room, string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
116 get_hidden : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
117 set_hidden : function (Room, boolean)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
118 get_public : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
119 set_public : function (Room, boolean)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
120 get_password : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
121 set_password : function (Room, string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
122 get_members_only : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
123 set_members_only : function (Room, boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
124 get_allow_member_invites : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
125 set_allow_member_invites : function (Room, boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
126 get_moderated : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
127 set_moderated : function (Room, boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
128 get_persistent : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
129 set_persistent : function (Room, boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
130 get_changesubject : function (Room) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
131 set_changesubject : function (Room, boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
132 get_subject : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
133 set_subject : function (Room, string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
134 get_historylength : function (Room) : integer
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
135 set_historylength : function (Room, integer) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
136 get_presence_broadcast : function (Room) : { Role : boolean }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
137 set_presence_broadcast : function (Room, { Role : boolean }) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
138
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
139 is_anonymous_for : function (Room, jid : string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
140 get_salt : function (Room) : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
141 get_occupant_id : function (Room, Occupant)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
142
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
143 -- Room teardown
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
144 clear : function (Room, x : Stanza)
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
145 destroy : function (Room, newjid : string, reason : string, password : string) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
146
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
147 -- Room state persistence
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
148 record FrozenRoom
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
149 _jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
150 _data : { string : any }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
151 _affiliation_data : { string : { string : any } }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
152 -- { string : Affiliation }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
153 end
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
154
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
155 record StateEntry
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
156 bare_jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
157 role : Role
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
158 jid : string
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
159 end
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
160
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
161 save : function (Room, forced : boolean, savestate : boolean) : boolean
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
162 freeze : function (Room, live : boolean) : FrozenRoom, { string : StateEntry }
93ce4244d433 MUC: Start on a Teal description of MUC rooms
Kim Alvefur <zash@zash.se>
parents:
diff changeset
163 end