28 #ifndef DBUS_POLLABLE_SET_H
29 #define DBUS_POLLABLE_SET_H
31 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 #include <dbus/dbus.h>
34 #include <dbus/dbus-sysdeps.h>
41 typedef struct DBusPollableSet DBusPollableSet;
43 typedef struct DBusPollableSetClass DBusPollableSetClass;
44 struct DBusPollableSetClass {
45 void (*free) (DBusPollableSet *
self);
50 void (*
remove) (DBusPollableSet *
self,
52 void (*enable) (DBusPollableSet *
self,
55 void (*disable) (DBusPollableSet *
self,
57 int (*poll) (DBusPollableSet *
self,
58 DBusPollableEvent *revents,
63 struct DBusPollableSet {
64 DBusPollableSetClass *cls;
67 DBusPollableSet *_dbus_pollable_set_new (
int size_hint);
70 _dbus_pollable_set_free (DBusPollableSet *
self)
72 (
self->cls->free) (
self);
76 _dbus_pollable_set_add (DBusPollableSet *
self,
81 return (self->cls->add) (
self, fd, flags, enabled);
85 _dbus_pollable_set_remove (DBusPollableSet *
self,
88 (
self->cls->remove) (
self, fd);
92 _dbus_pollable_set_enable (DBusPollableSet *
self,
96 (
self->cls->enable) (
self, fd, flags);
100 _dbus_pollable_set_disable (DBusPollableSet *
self,
103 (
self->cls->disable) (
self, fd);
108 _dbus_pollable_set_poll (DBusPollableSet *
self,
109 DBusPollableEvent *revents,
113 return (self->cls->poll) (
self, revents, max_events, timeout_ms);
118 extern DBusPollableSetClass _dbus_pollable_set_poll_class;
119 extern DBusPollableSetClass _dbus_pollable_set_epoll_class;
121 DBusPollableSet *_dbus_pollable_set_poll_new (
int size_hint);
122 DBusPollableSet *_dbus_pollable_set_epoll_new (
void);
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.