summaryrefslogtreecommitdiff
path: root/source3/include/module.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2003-05-29 14:40:55 +0000
committerJelmer Vernooij <jelmer@samba.org>2003-05-29 14:40:55 +0000
commite731ec1ed6e92f9a088e1bdfaca5491c90277ae1 (patch)
tree6bfe9ed21774fc371317a308b7d84857291739dc /source3/include/module.h
parent42e899cf10249844361c35a495eda861b6d246b3 (diff)
downloadsamba-e731ec1ed6e92f9a088e1bdfaca5491c90277ae1.tar.gz
samba-e731ec1ed6e92f9a088e1bdfaca5491c90277ae1.tar.bz2
samba-e731ec1ed6e92f9a088e1bdfaca5491c90277ae1.zip
Get the events API right. Patch from metze with some minor modifications.
(This used to be commit 2aad5736256968f27c42a6f94bdbc7a22c236c19)
Diffstat (limited to 'source3/include/module.h')
-rw-r--r--source3/include/module.h20
1 files changed, 7 insertions, 13 deletions
diff --git a/source3/include/module.h b/source3/include/module.h
index 759ea5bb38..c41310c7f7 100644
--- a/source3/include/module.h
+++ b/source3/include/module.h
@@ -24,21 +24,15 @@
/* Module support */
typedef NTSTATUS (init_module_function) (void);
+
+typedef int smb_event_id_t;
+#define SMB_EVENT_ID_INVALID (-1)
+
#define SMB_IDLE_EVENT_DEFAULT_INTERVAL 180
#define SMB_IDLE_EVENT_MIN_INTERVAL 30
-typedef struct smb_idle_event_struct {
- struct smb_idle_event_struct *prev,*next;
- time_t interval;
- time_t last_run;
- void *data;
- void (*fn)(struct smb_idle_event_struct **event, time_t now);
-} smb_idle_event_struct;
-
-typedef struct smb_exit_event_struct {
- struct smb_exit_event_struct *prev,*next;
- void *data;
- void (*fn)(struct smb_exit_event_struct **event);
-} smb_exit_event_struct;
+typedef void (smb_idle_event_fn)(void **data,time_t *interval,time_t now);
+
+typedef void (smb_exit_event_fn)(void **data);
#endif /* _MODULE_H */