26 #ifndef DBUS_POLLABLE_SET_H
27 #define DBUS_POLLABLE_SET_H
29 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 #include <dbus/dbus.h>
32 #include <dbus/dbus-sysdeps.h>
39 typedef struct DBusPollableSet DBusPollableSet;
41 typedef struct DBusPollableSetClass DBusPollableSetClass;
42 struct DBusPollableSetClass {
43 void (*free) (DBusPollableSet *
self);
48 void (*remove) (DBusPollableSet *
self,
50 void (*enable) (DBusPollableSet *
self,
53 void (*disable) (DBusPollableSet *
self,
55 int (*poll) (DBusPollableSet *
self,
56 DBusPollableEvent *revents,
61 struct DBusPollableSet {
62 DBusPollableSetClass *cls;
65 DBusPollableSet *_dbus_pollable_set_new (
int size_hint);
68 _dbus_pollable_set_free (DBusPollableSet *
self)
70 (
self->cls->free) (
self);
74 _dbus_pollable_set_add (DBusPollableSet *
self,
79 return (self->cls->add) (
self, fd, flags, enabled);
83 _dbus_pollable_set_remove (DBusPollableSet *
self,
86 (
self->cls->remove) (
self, fd);
90 _dbus_pollable_set_enable (DBusPollableSet *
self,
94 (
self->cls->enable) (
self, fd, flags);
98 _dbus_pollable_set_disable (DBusPollableSet *
self,
101 (
self->cls->disable) (
self, fd);
106 _dbus_pollable_set_poll (DBusPollableSet *
self,
107 DBusPollableEvent *revents,
111 return (self->cls->poll) (
self, revents, max_events, timeout_ms);
116 extern DBusPollableSetClass _dbus_pollable_set_poll_class;
117 extern DBusPollableSetClass _dbus_pollable_set_epoll_class;
119 DBusPollableSet *_dbus_pollable_set_poll_new (
int size_hint);
120 DBusPollableSet *_dbus_pollable_set_epoll_new (
void);
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.