The current implementation of that portal has two methods: EmulateInput to
authenticate and Connect to get the fd to the EIS implementation. The portal
implementation is in charge of finding EIS and restricting it if need be.
This uses libsystemd because we can integrate that with epoll and our
libei_dispatch() method. GDBus requires a glib mainloop, so it's not really
suitable here. Given how simple this is anyway, it's easy to just do the DBus
bits in the caller and then hand the fd to ei_setup_backend_fd().
A eis-fake-portal is provided for testing, this "portal" can use the custom
portal bus name and connect the eis-demo-client to the eis-demo-server.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
And add the tests for the list and string helpers as a first use-case, copied
from the libinput tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Re-ordering commands in buildtype=release means recvfd may not be set by the
time _cleanup_ is called (due to the goto outs). Replace those with return
statements, it's more logical here anyway.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Initial implementation only handled this correctly if the fds were over
multiple message headers, not multiple fds in the same message header.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
In case the RESUMED isn't written on the wire yet (or it's written with
sendmsg and thus a separate message on its own) we don't have the RESUMED
ready for us yet. Let's call another dispatch to make sure it's processed.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is the proto parser and it'll know when we need an fd on the message, so
let's make sure we have everything in place to fetch the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This is the proto parser and it'll know when we need an fd on the message, so
let's make sure we have everything in place to fetch the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This was intentional here but valgrind doesn't like it, so let's just set it
to something that should look odd.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Building with a releaes build reshuffles things so this ends causing potential
issues. Initialize to NULL to avoid around this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Mostly copied from libinput and simplified so we only test on Fedora for now.
Good enough that it should catch accidental breakages.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The logger utilities are useful for quick prototyping, but we've reached the
point where we need the "proper" implementation of a log handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The logger utilities are useful for quick prototyping, but we've reached the
point where we need the "proper" implementation of a log handler.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>