From 04c6caba502115d0611b4313c3228865c48f4285 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 15 May 2022 15:27:35 +0200 Subject: teal/moduleapi: Describe timer wrapper Since it's used in mod_cron --- teal-src/module.d.tl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'teal-src/module.d.tl') diff --git a/teal-src/module.d.tl b/teal-src/module.d.tl index 67b2437c..cb7771e2 100644 --- a/teal-src/module.d.tl +++ b/teal-src/module.d.tl @@ -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+" -- cgit v1.2.3 From 57ed2e28a09933dd6220dd6ddd84f0f442e9b71f Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 15 Jun 2022 14:22:26 +0100 Subject: teal-src: update module.d.tl with new access control methods --- teal-src/module.d.tl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'teal-src/module.d.tl') diff --git a/teal-src/module.d.tl b/teal-src/module.d.tl index cb7771e2..24eb9558 100644 --- a/teal-src/module.d.tl +++ b/teal-src/module.d.tl @@ -126,6 +126,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) -- cgit v1.2.3