svn commit: samba r12140 - in branches/SAMBA_4_0/source: gtk/common
lib/events
metze at samba.org
metze at samba.org
Fri Dec 9 16:43:20 GMT 2005
Author: metze
Date: 2005-12-09 16:43:19 +0000 (Fri, 09 Dec 2005)
New Revision: 12140
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12140
Log:
- add an additional_flags field to the fd_event struct, so that
the events backend can store private flags
- add function to access the gtk event loop ops struct
metze
Modified:
branches/SAMBA_4_0/source/gtk/common/gtk_events.c
branches/SAMBA_4_0/source/lib/events/events_internal.h
branches/SAMBA_4_0/source/lib/events/events_liboop.c
branches/SAMBA_4_0/source/lib/events/events_standard.c
Changeset:
Modified: branches/SAMBA_4_0/source/gtk/common/gtk_events.c
===================================================================
--- branches/SAMBA_4_0/source/gtk/common/gtk_events.c 2005-12-09 06:22:09 UTC (rev 12139)
+++ branches/SAMBA_4_0/source/gtk/common/gtk_events.c 2005-12-09 16:43:19 UTC (rev 12140)
@@ -135,6 +135,7 @@
fde->flags = flags;
fde->handler = handler;
fde->private_data = private_data;
+ fde->additional_flags = 0;
fde->additional_data = gtk_fd;
channel = g_io_channel_unix_new(fde->fd);
@@ -340,6 +341,11 @@
.loop_wait = gtk_event_loop_wait,
};
+const struct event_ops *gtk_event_get_ops(void)
+{
+ return >k_event_ops;
+}
+
int gtk_event_loop(void)
{
int ret;
Modified: branches/SAMBA_4_0/source/lib/events/events_internal.h
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events_internal.h 2005-12-09 06:22:09 UTC (rev 12139)
+++ branches/SAMBA_4_0/source/lib/events/events_internal.h 2005-12-09 16:43:19 UTC (rev 12140)
@@ -56,6 +56,7 @@
/* this is private for the specific handler */
void *private_data;
/* this is private for the events_ops implementation */
+ uint16_t additional_flags;
void *additional_data;
};
Modified: branches/SAMBA_4_0/source/lib/events/events_liboop.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events_liboop.c 2005-12-09 06:22:09 UTC (rev 12139)
+++ branches/SAMBA_4_0/source/lib/events/events_liboop.c 2005-12-09 16:43:19 UTC (rev 12140)
@@ -127,6 +127,7 @@
fde->flags = flags;
fde->handler = handler;
fde->private_data = private_data;
+ fde->additional_flags = 0;
fde->additional_data = NULL;
if (fde->flags & EVENT_FD_READ)
@@ -269,7 +270,7 @@
return -1;
}
-static const struct event_ops events_oop_ops = {
+static const struct event_ops event_oop_ops = {
.context_init = oop_event_context_init,
.add_fd = oop_event_add_fd,
.get_fd_flags = oop_event_get_fd_flags,
@@ -279,7 +280,7 @@
.loop_wait = oop_event_loop_wait,
};
-const struct event_ops *events_oop_get_ops(void)
+const struct event_ops *event_liboop_get_ops(void)
{
- return &events_oop_ops;
+ return &event_oop_ops;
}
Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events_standard.c 2005-12-09 06:22:09 UTC (rev 12139)
+++ branches/SAMBA_4_0/source/lib/events/events_standard.c 2005-12-09 16:43:19 UTC (rev 12140)
@@ -209,6 +209,7 @@
fde->flags = flags;
fde->handler = handler;
fde->private_data = private_data;
+ fde->additional_flags = 0;
fde->additional_data = NULL;
DLIST_ADD(std_ev->fd_events, fde);
More information about the samba-cvs
mailing list