summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-05 18:01:04 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-05 18:01:04 +0100
commit37e6849d451c4f49c6a0c96a78a5ef81baab83d4 (patch)
treed1e443f66fa367340ef04d39349e50e7100b9b5f /source3/include
parentde7dc2cec059305d28cc75a5347bfd88f3cb5c95 (diff)
parent0581094023ba5e561184a2ea57f6e905161de978 (diff)
downloadsamba-37e6849d451c4f49c6a0c96a78a5ef81baab83d4.tar.gz
samba-37e6849d451c4f49c6a0c96a78a5ef81baab83d4.tar.bz2
samba-37e6849d451c4f49c6a0c96a78a5ef81baab83d4.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/event.h26
-rw-r--r--source3/include/includes.h3
-rw-r--r--source3/include/proto.h41
-rw-r--r--source3/include/smb.h3
4 files changed, 26 insertions, 47 deletions
diff --git a/source3/include/event.h b/source3/include/event.h
index 0465fae471..93112a86fa 100644
--- a/source3/include/event.h
+++ b/source3/include/event.h
@@ -18,7 +18,27 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* bits for file descriptor event flags */
-#define EVENT_FD_READ 1
-#define EVENT_FD_WRITE 2
+#define TEVENT_COMPAT_DEFINES
+#include <tevent.h>
+
+#undef event_context_init
+#define event_context_init(mem_ctx) s3_tevent_context_init(mem_ctx)
+
+/* The following definitions come from lib/events.c */
+
+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);
+void event_context_reinit(struct event_context *ev);
+void dump_event_list(struct event_context *event_ctx);
+struct tevent_context *s3_tevent_context_init(TALLOC_CTX *mem_ctx);
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 64be27336d..8b0ff71c4e 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -574,6 +574,8 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#include "../talloc/talloc.h"
+#include "event.h"
+
#include "../lib/util/data_blob.h"
#include "../lib/util/time.h"
#include "../lib/util/asn1.h"
@@ -642,7 +644,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
#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"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 09f12ceb86..22183118e2 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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);
-/* 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 events_pending(struct event_context *event_ctx);
-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);
-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);
@@ -1183,6 +1143,7 @@ int set_blocking(int fd, bool set);
void smb_msleep(unsigned int t);
void become_daemon(bool Fork, bool no_process_group);
bool reinit_after_fork(struct messaging_context *msg_ctx,
+ struct event_context *ev_ctx,
bool parent_longlived);
bool yesno(const char *p);
void *malloc_(size_t size);
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 7fd4fbb553..9f6a6f02d7 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -361,9 +361,6 @@ struct fd_handle {
unsigned long gen_id;
};
-struct event_context;
-struct fd_event;
-struct timed_event;
struct idle_event;
struct share_mode_entry;
struct uuid;