From c92339de11a2f27198aee3b4242aa6fccc12a004 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 4 Jan 2003 20:29:46 +0000 Subject: 2003-01-04 Havoc Pennington * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function (_dbus_poll): new function * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro copied from GLib * bus/loop.c: initial code for the daemon main loop --- dbus/dbus-sysdeps.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'dbus/dbus-sysdeps.h') diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h index 73482f06..c76c691a 100644 --- a/dbus/dbus-sysdeps.h +++ b/dbus/dbus-sysdeps.h @@ -96,6 +96,28 @@ dbus_bool_t _dbus_credentials_match (const DBusCredentials *expec dbus_bool_t _dbus_string_append_our_uid (DBusString *str); + + +#define _DBUS_POLLIN 0x0001 /* There is data to read */ +#define _DBUS_POLLPRI 0x0002 /* There is urgent data to read */ +#define _DBUS_POLLOUT 0x0004 /* Writing now will not block */ +#define _DBUS_POLLERR 0x0008 /* Error condition */ +#define _DBUS_POLLHUP 0x0010 /* Hung up */ +#define _DBUS_POLLNVAL 0x0020 /* Invalid request: fd not open */ + +typedef struct +{ + int fd; + short events; + short revents; +} DBusPollFD; + +int _dbus_poll (DBusPollFD *fds, + int n_fds, + int timeout_milliseconds); + +void _dbus_sleep_milliseconds (int milliseconds); + DBUS_END_DECLS; #endif /* DBUS_SYSDEPS_H */ -- cgit