Commit Graph

33 Commits (339df2751d0e62e41d48208763647c601dca3467)

Author SHA1 Message Date
nirenjan d60ab7e1e4 Add logging test cases to EXTRA_DIST 2022-09-22 14:45:15 -07:00
nirenjan 1dcadb9428 Rename test cases and add them to EXTRA_DIST 2022-09-22 11:21:53 -07:00
nirenjan 619d516ccc Add notify API
This change adds a notification API to libx52dcomm. It also pulls in the
logic to join multiple arguments into a single buffer for later use.
2022-09-06 23:19:03 -07:00
nirenjan 6a8dff0a17 Fix mouse test linker failure on macOS 2022-04-28 02:18:13 -07:00
nirenjan 8f9ab9cefd Add tests for mouse configuration
This change adds a test suite for validating mouse configuration. This
only tests the logic for mouse thread enable/disable and mouse speed
calculations.
2022-04-28 01:54:09 -07:00
nirenjan 33e940606c Add daemon communication test cases
This change adds an automated test harness that will spin up an instance
of the X52 daemon, connect to its command socket, send commands and
validate the responses. This first set of test cases simply validates
the basic configuration file handling. Subsequent commits will enhance
the tests to improve code coverage.
2022-04-07 23:24:24 -07:00
nirenjan 09740e0fe9 Update documentation to include communication protocol 2021-11-07 16:38:06 -08:00
nirenjan d8a5a2c3b8 Add daemon command handler loop
This change adds the logic to read a packet from the socket, accept
connections from clients, and close connections from clients that have
hung up. This commit does not yet have support for parsing and handling
the commands, and simply echoes the request back to the client.
2021-11-04 18:32:18 -07:00
nirenjan 5a78492140 Make X52 daemon listen on a Unix socket
This change makes X52 daemon listen on a Unix socket. This is in
preparation for changes that will read from the socket and allow clients
to communicate with and control the daemon.
2021-11-04 13:48:18 -07:00
nirenjan abc74d6e37 Fix linking with libintl on macOS 2021-11-04 11:05:52 -07:00
nirenjan 931f945133 Add x52ctl daemon communication program 2021-11-04 10:50:10 -07:00
nirenjan 18c0c72c74 Add client communication library
This change adds a library to connect to the X52 daemon and send
commands and receive responses. The library is a thin wrapper around the
POSIX sockets API. While a client could implement the functions
themselves, the library makes it a little bit easier, as well as
allowing for third-party clients to connect to and communicate with the
daemon.
2021-11-04 10:48:59 -07:00
nirenjan 16e53b897f Use $(localstatedir)/run instead of $(runstatedir)
`runstatedir` is only available in Autoconf 2.70, but unless the
distribution is a bleeding edge system, it most likely uses Autoconf
2.69. That said, several major distributions have backported runstatedir
support to the older versions, hiding the issue. See #35.

This change replaces all references to runstatedir to use
$localstatedir/run instead, which is what is recommended by the autoconf
manual.

This also updates the build instructions to add --localstatedir and
--sysconfdir. This is because the lack of the options would have them
default to `$(prefix)/var` and `$(prefix)/etc` respectively, and with
prefix set to `/usr`, these would be the bogus directories `/usr/var`
and `/usr/etc`.
2021-09-15 09:06:31 -07:00
nirenjan 42850bc4cd Create I/O thread to read and process events
This change adds a separate thread to initialize and read reports from
the supported X52 device. This will then process and raise input events
for a virtual device.
2021-09-14 13:33:36 -07:00
nirenjan b9e5f34aa4 Add support for building on macOS
Prior to this change, the build would fail on macOS systems because the
evdev sources were only included on Linux systems, and macOS does not
have evdev/libevdev. By separating out the configuration and update
threads, this should build on macOS, but the configuration would be
ignored.
2021-09-14 10:40:48 -07:00
nirenjan 016851478a Add framework for virtual mouse driver
This change adds the configuration and build related changes for
supporting the virtual mouse. Subsequent commits will add support for
reading the IO interface and translating it to mouse commands.
2021-09-14 10:02:21 -07:00
nirenjan a39945f461 Import inih library into source tree
Prior to this change, the user needed to install inih as a dependency,
either from the distribution repositories, or from source. On some
platforms (notably macOS), inih is not available prepackaged, and must
be installed by the user. This tends to cause needless friction.

This change imports the ini.c and ini.h files from the upstream inih
repository into the X52 source tree. This will allow us to build the
repository on any system with the original set of dependencies, and not
have to force the user to install packages themselves.
2021-08-26 22:16:38 -07:00
nirenjan 874c46705a Add config save routines 2021-08-09 22:16:30 -07:00
nirenjan 86960e7e20 Create the log and run directories for daemon to store files 2021-08-05 10:25:45 -07:00
nirenjan 0cf6f247be Add systemd unit file to start X52 daemon 2021-08-05 10:21:28 -07:00
nirenjan 3efdce5abe Fix make distcheck 2021-08-01 23:56:37 -07:00
nirenjan ac68ee07e5 Use non-recursive Automake 2021-07-29 23:53:21 -07:00
nirenjan 7f30863e5d Move libx52io to top level 2021-07-29 21:51:11 -07:00
nirenjan 34adeaec45 Move libx52util to top level 2021-07-29 21:47:07 -07:00
nirenjan e3bccd3ac3 Move libx52 to top level 2021-07-29 21:41:07 -07:00
nirenjan 50906b0a92 Ensure x52d.conf is included in the distribution tarball 2021-07-27 03:07:52 -07:00
nirenjan 009fba0151 Install x52d.conf to sysconfdir 2021-07-27 02:26:32 -07:00
nirenjan bd682cd5c7 Add LED state and brightness functionality 2021-07-23 14:24:22 -07:00
nirenjan 499cad666f Add clock update functionality 2021-07-23 10:13:18 -07:00
nirenjan ac8bb6cdd9 Add threads to find and update X52 device 2021-07-21 00:01:49 -07:00
nirenjan ab946b4a1a Add device manager implementation 2021-07-16 00:30:27 -07:00
nirenjan 81002444d7 Add LTLIBINTL to enable i18n 2021-07-15 21:53:42 -07:00
nirenjan cbe7f00a5a Add daemon framework
This change adds the daemon configuration parser and command line
argument parser. This also adds the associated strings to the
translation files, and integrates the daemon into the existing autotools
build framework.
2021-07-15 15:53:56 -07:00