Commit graph

5 commits

Author SHA1 Message Date
Peter Hutterer
c15fcdc140 util: add a helper for fetching the cmdline.
Better than duplicating this three times.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-03 00:43:02 +00:00
Peter Hutterer
46681e2855 Add SPDX identifiers to all source files
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2022-03-03 00:27:36 +00:00
Peter Hutterer
43be3ddc89 util: add a strreplace function
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2021-09-01 12:26:05 +10:00
Peter Hutterer
b064d435ec test: make a separate binary for the utils tests
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>
2020-08-25 11:37:18 +10:00
Peter Hutterer
f7a24b2fbd Add the minimal implementation for a UNIX socket libeis server
This is the minimum framework to support new clients, added devices and
pointer relative motion events. It's missing a bunch of checks and
verification, most of the server hooks aren't there yet, the only
implementation is a UNIX socket and the protocol is plain text (but at least
the last two makes it netcat-compatible).

Protocol is plain text for now and interaction is like this (S is server, C is client):
S: hello
C: connect myclientname
S: connected
C: add 2 4
S: accept 2
C: rel 2 -1 1
C: rel 2 5 4

Where the last two lines are: add device with id 2 and capability mask 0x4,
send a relative pointer motion event for device 2 with coordinates -1/1, then
5/4.

The implementation relies heavily on some abstraction and macros galore, see
the various util-* files. These are largely copied from libinput, with a few
parts removed and a few other parts added.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-28 19:33:34 +10:00