Double underbars are reserved for the compiler and system, so we shouldn't use
them for header guards. Additionally, remove a bunch of these line breaks.
Lots of cross-translation unit messes in here cleaned up finally. This should be
the last change necessary to clean up these refs between translation units.
This is the first half of some major rework of the g13d codebase to make things
a bit more manageable. This splits out a great deal of stuff from helper.h into
separate translation units, and also breaks out a great deal of the g13.h header
into separate translation units as well.
Doing this saves in compilation time as we make changes to the system, and also
helps to clean up a whole bunch of leaking symbols.
Since we start from udev/systemd these days, we should exit when we don't have
any more devices to manage, and let udev/systemd manage things when a new one is
connected.
Migrate to C++11 iteration and clean up the mess of code that this was
originally with a single call to send_event and a proper use of a ternary for
logging.
The sizeof was actually using the size of the statically allocated name instead
of the size of the destination. In practice, it's not a problem, but still, it
should be fixed.
The original code was just throwing away error conditions for write calls to an
fd. Obviously this is bad, but really, we should probably be using an ostream
instead of a raw file handle here. For now, deal with the warning by checking
the result for errors, at least, and later we'll refactor to use ostream
properly.
This preps us for proper system installs to distributions, finding depending
libraries, and allowing us to build the foundation for the GUI and support
tooling next.
The plan is to run g13d as a system daemon managed by systemd. We'll use the
system-wide input group to control access to the daemon.
- Add a CMakeLists for etc so we can install the udev rules.
- Move the src dir to g13d to disambiguate a bit.
- Update the toplevel Makefile so we can still build the old way (for now).