aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/module.d.tl
diff options
context:
space:
mode:
Diffstat (limited to 'teal-src/module.d.tl')
-rw-r--r--teal-src/module.d.tl15
1 files changed, 13 insertions, 2 deletions
diff --git a/teal-src/module.d.tl b/teal-src/module.d.tl
index 67b2437c..312dc227 100644
--- a/teal-src/module.d.tl
+++ b/teal-src/module.d.tl
@@ -1,4 +1,4 @@
-local st = require"util.stanza"
+local st = require "prosody.util.stanza"
global record moduleapi
get_name : function (moduleapi) : string
@@ -62,7 +62,12 @@ global record moduleapi
send_iq : function (moduleapi, st.stanza_t, util_session, number)
broadcast : function (moduleapi, { string }, st.stanza_t, function)
type timer_callback = function (number, ... : any) : number
- add_timer : function (moduleapi, number, timer_callback, ... : any)
+ record timer_wrapper
+ stop : function (timer_wrapper)
+ disarm : function (timer_wrapper)
+ reschedule : function (timer_wrapper, number)
+ end
+ add_timer : function (moduleapi, number, timer_callback, ... : any) : timer_wrapper
get_directory : function (moduleapi) : string
enum file_mode
"r" "w" "a" "r+" "w+" "a+"
@@ -70,6 +75,7 @@ global record moduleapi
load_resource : function (moduleapi, string, file_mode) : FILE
enum store_type
"keyval"
+ "keyval+"
"map"
"archive"
end
@@ -121,6 +127,11 @@ global record moduleapi
path : string
resource_path : string
+ -- access control
+ may : function (moduleapi, string, table|string)
+ default_permission : function (string, string)
+ default_permissions : function (string, { string })
+
-- methods the module can add
load : function ()
add_host : function (moduleapi)