odbus/Watch: support DBUS_WATCH_{ERROR,HANGUP}
This commit is contained in:
parent
ed1caffc79
commit
7a56837141
@ -48,7 +48,9 @@ static constexpr unsigned
|
||||
DbusToLibevent(unsigned flags) noexcept
|
||||
{
|
||||
return ((flags & DBUS_WATCH_READABLE) != 0) * SocketEvent::READ |
|
||||
((flags & DBUS_WATCH_WRITABLE) != 0) * SocketEvent::WRITE;
|
||||
((flags & DBUS_WATCH_WRITABLE) != 0) * SocketEvent::WRITE |
|
||||
((flags & DBUS_WATCH_ERROR) != 0) * SocketEvent::ERROR |
|
||||
((flags & DBUS_WATCH_HANGUP) != 0) * SocketEvent::HANGUP;
|
||||
}
|
||||
|
||||
void
|
||||
@ -66,7 +68,9 @@ static constexpr unsigned
|
||||
LibeventToDbus(unsigned flags) noexcept
|
||||
{
|
||||
return ((flags & SocketEvent::READ) != 0) * DBUS_WATCH_READABLE |
|
||||
((flags & SocketEvent::WRITE) != 0) * DBUS_WATCH_WRITABLE;
|
||||
((flags & SocketEvent::WRITE) != 0) * DBUS_WATCH_WRITABLE |
|
||||
((flags & SocketEvent::ERROR) != 0) * DBUS_WATCH_ERROR |
|
||||
((flags & SocketEvent::HANGUP) != 0) * DBUS_WATCH_HANGUP;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user