summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-watch.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-04-18 04:18:57 +0000
committerHavoc Pennington <hp@redhat.com>2003-04-18 04:18:57 +0000
commit3df260c07102745c5606c313af862558f105f83e (patch)
treeb0a9d23fc820a3bc61da1cd7e63fc810423a2210 /dbus/dbus-watch.h
parent88cd5da3c0ec86fed29942b062c2f7bf0f8fda44 (diff)
2003-04-18 Havoc Pennington <hp@pobox.com>
* glib/dbus-gmain.c: adapt to watch changes * bus/bus.c, bus/activation.c, etc.: adjust to watch changes * dbus/dbus-server.h: remove dbus_server_handle_watch * dbus/dbus-connection.h: remove dbus_connection_handle_watch * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work like DBusTimeout, so we don't need dbus_connection_handle_watch etc.
Diffstat (limited to 'dbus/dbus-watch.h')
-rw-r--r--dbus/dbus-watch.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/dbus/dbus-watch.h b/dbus/dbus-watch.h
index 7a9ec57c..355a9b7e 100644
--- a/dbus/dbus-watch.h
+++ b/dbus/dbus-watch.h
@@ -32,15 +32,26 @@ DBUS_BEGIN_DECLS;
typedef struct DBusWatchList DBusWatchList;
-DBusWatch* _dbus_watch_new (int fd,
- unsigned int flags,
- dbus_bool_t enabled);
-void _dbus_watch_ref (DBusWatch *watch);
-void _dbus_watch_unref (DBusWatch *watch);
-void _dbus_watch_invalidate (DBusWatch *watch);
+typedef dbus_bool_t (* DBusWatchHandler) (DBusWatch *watch,
+ unsigned int flags,
+ void *data);
+
+DBusWatch* _dbus_watch_new (int fd,
+ unsigned int flags,
+ dbus_bool_t enabled,
+ DBusWatchHandler handler,
+ void *data,
+ DBusFreeFunction free_data_function);
+void _dbus_watch_ref (DBusWatch *watch);
+void _dbus_watch_unref (DBusWatch *watch);
+void _dbus_watch_invalidate (DBusWatch *watch);
+void _dbus_watch_sanitize_condition (DBusWatch *watch,
+ unsigned int *condition);
+void _dbus_watch_set_handler (DBusWatch *watch,
+ DBusWatchHandler handler,
+ void *data,
+ DBusFreeFunction free_data_function);
-void _dbus_watch_sanitize_condition (DBusWatch *watch,
- unsigned int *condition);
DBusWatchList* _dbus_watch_list_new (void);
void _dbus_watch_list_free (DBusWatchList *watch_list);