s3:events: move prototypes to event.h
authorStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 08:06:05 +0000 (09:06 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 5 Jan 2009 14:07:34 +0000 (15:07 +0100)
metze

source3/include/event.h
source3/include/includes.h
source3/include/proto.h
source3/include/smb.h

index 0465fae471f4e3829ad99ec0cb617ff59e9de48f..ebbf9c9f639c44b83ab6330408f7e003cb1387c7 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+struct event_context;
+struct fd_event;
+struct timed_event;
+
 /* bits for file descriptor event flags */
 #define EVENT_FD_READ 1
 #define EVENT_FD_WRITE 2
 
 /* bits for file descriptor event flags */
 #define EVENT_FD_READ 1
 #define EVENT_FD_WRITE 2
 
+/* The following definitions come from lib/events.c  */
+
+struct timed_event *event_add_timed(struct event_context *event_ctx,
+                               TALLOC_CTX *mem_ctx,
+                               struct timeval when,
+                               const char *event_name,
+                               void (*handler)(struct event_context *event_ctx,
+                                               struct timed_event *te,
+                                               const struct timeval *now,
+                                               void *private_data),
+                               void *private_data);
+struct fd_event *event_add_fd(struct event_context *event_ctx,
+                             TALLOC_CTX *mem_ctx,
+                             int fd, uint16_t flags,
+                             void (*handler)(struct event_context *event_ctx,
+                                             struct fd_event *event,
+                                             uint16 flags,
+                                             void *private_data),
+                             void *private_data);
+void event_fd_set_writeable(struct fd_event *fde);
+void event_fd_set_not_writeable(struct fd_event *fde);
+void event_fd_set_readable(struct fd_event *fde);
+void event_fd_set_not_readable(struct fd_event *fde);
+bool event_add_to_select_args(struct event_context *event_ctx,
+                             const struct timeval *now,
+                             fd_set *read_fds, fd_set *write_fds,
+                             struct timeval *timeout, int *maxfd);
+bool run_events(struct event_context *event_ctx,
+               int selrtn, fd_set *read_fds, fd_set *write_fds);
+struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
+                                        struct timeval *to_ret);
+int event_loop_once(struct event_context *ev);
+void event_context_reinit(struct event_context *ev);
+struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
+int set_event_dispatch_time(struct event_context *event_ctx,
+                           const char *event_name, struct timeval when);
+int cancel_named_event(struct event_context *event_ctx,
+                      const char *event_name);
+void dump_event_list(struct event_context *event_ctx);
+
index 3f35602ba6ebd8e32df452979dba9433153428dc..cae627f56427b2f6b60aa216232c9da60fda989f 100644 (file)
@@ -575,6 +575,8 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 
 #include "../talloc/talloc.h"
 
 
 #include "../talloc/talloc.h"
 
+#include "event.h"
+
 #include "../lib/util/data_blob.h"
 #include "../lib/util/time.h"
 #include "../lib/util/asn1.h"
 #include "../lib/util/data_blob.h"
 #include "../lib/util/time.h"
 #include "../lib/util/asn1.h"
@@ -643,7 +645,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "nsswitch/winbind_client.h"
 #include "spnego.h"
 #include "rpc_client.h"
 #include "nsswitch/winbind_client.h"
 #include "spnego.h"
 #include "rpc_client.h"
-#include "event.h"
 #include "dbwrap.h"
 #include "packet.h"
 #include "ctdbd_conn.h"
 #include "dbwrap.h"
 #include "packet.h"
 #include "ctdbd_conn.h"
index f95038efc0dae7c3ed11d199fede232b47dde9b7..cfac164789003a824497b326761395a829b01b57 100644 (file)
@@ -501,46 +501,6 @@ void display_set_stderr(void);
 NTSTATUS map_nt_error_from_unix(int unix_error);
 int map_errno_from_nt_status(NTSTATUS status);
 
 NTSTATUS map_nt_error_from_unix(int unix_error);
 int map_errno_from_nt_status(NTSTATUS status);
 
-/* The following definitions come from lib/events.c  */
-
-struct timed_event *event_add_timed(struct event_context *event_ctx,
-                               TALLOC_CTX *mem_ctx,
-                               struct timeval when,
-                               const char *event_name,
-                               void (*handler)(struct event_context *event_ctx,
-                                               struct timed_event *te,
-                                               const struct timeval *now,
-                                               void *private_data),
-                               void *private_data);
-struct fd_event *event_add_fd(struct event_context *event_ctx,
-                             TALLOC_CTX *mem_ctx,
-                             int fd, uint16_t flags,
-                             void (*handler)(struct event_context *event_ctx,
-                                             struct fd_event *event,
-                                             uint16 flags,
-                                             void *private_data),
-                             void *private_data);
-void event_fd_set_writeable(struct fd_event *fde);
-void event_fd_set_not_writeable(struct fd_event *fde);
-void event_fd_set_readable(struct fd_event *fde);
-void event_fd_set_not_readable(struct fd_event *fde);
-bool event_add_to_select_args(struct event_context *event_ctx,
-                             const struct timeval *now,
-                             fd_set *read_fds, fd_set *write_fds,
-                             struct timeval *timeout, int *maxfd);
-bool run_events(struct event_context *event_ctx,
-               int selrtn, fd_set *read_fds, fd_set *write_fds);
-struct timeval *get_timed_events_timeout(struct event_context *event_ctx,
-                                        struct timeval *to_ret);
-int event_loop_once(struct event_context *ev);
-void event_context_reinit(struct event_context *ev);
-struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
-int set_event_dispatch_time(struct event_context *event_ctx,
-                           const char *event_name, struct timeval when);
-int cancel_named_event(struct event_context *event_ctx,
-                      const char *event_name);
-void dump_event_list(struct event_context *event_ctx);
-
 /* The following definitions come from lib/fault.c  */
 void fault_setup(void (*fn)(void *));
 void dump_core_setup(const char *progname);
 /* The following definitions come from lib/fault.c  */
 void fault_setup(void (*fn)(void *));
 void dump_core_setup(const char *progname);
index 7fd4fbb553cc2a9974d31b2f16946e306ff38097..9f6a6f02d788c573a8cc84ae135eb329d42bc01c 100644 (file)
@@ -361,9 +361,6 @@ struct fd_handle {
        unsigned long gen_id;
 };
 
        unsigned long gen_id;
 };
 
-struct event_context;
-struct fd_event;
-struct timed_event;
 struct idle_event;
 struct share_mode_entry;
 struct uuid;
 struct idle_event;
 struct share_mode_entry;
 struct uuid;