From 06551c644c75ab2aa14a3cc3c4afbcbb08369133 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 6 May 2003 02:34:59 +0000 Subject: Patch from metze to add exit and interval events. Useful for modules (This used to be commit 3033a63cefb5f28d4460885f7f4e4ecaed95443c) --- source3/include/module.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 source3/include/module.h (limited to 'source3/include/module.h') diff --git a/source3/include/module.h b/source3/include/module.h new file mode 100644 index 0000000000..759ea5bb38 --- /dev/null +++ b/source3/include/module.h @@ -0,0 +1,44 @@ +/* + Unix SMB/CIFS implementation. + Handling of idle/exit events + Copyright (C) Stefan (metze) Metzmacher 2003 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _MODULE_H +#define _MODULE_H + +/* Module support */ +typedef NTSTATUS (init_module_function) (void); + +#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; + +#endif /* _MODULE_H */ -- cgit From e731ec1ed6e92f9a088e1bdfaca5491c90277ae1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 29 May 2003 14:40:55 +0000 Subject: Get the events API right. Patch from metze with some minor modifications. (This used to be commit 2aad5736256968f27c42a6f94bdbc7a22c236c19) --- source3/include/module.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'source3/include/module.h') 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 */ -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/include/module.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/include/module.h') diff --git a/source3/include/module.h b/source3/include/module.h index c41310c7f7..8b317a9d59 100644 --- a/source3/include/module.h +++ b/source3/include/module.h @@ -33,6 +33,4 @@ typedef int smb_event_id_t; 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 */ -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/include/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/module.h') diff --git a/source3/include/module.h b/source3/include/module.h index 8b317a9d59..4c31b57224 100644 --- a/source3/include/module.h +++ b/source3/include/module.h @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/include/module.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/module.h') diff --git a/source3/include/module.h b/source3/include/module.h index 4c31b57224..20dbaba6b4 100644 --- a/source3/include/module.h +++ b/source3/include/module.h @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef _MODULE_H -- cgit