hid-recorder: store and use the device index

Actually use it so that when several devices are multiplexed, the device
index is produced.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: calloc the list of recorded devices

hid-replay can replay several multiplexed devices at a time, hid-recorder
should be able to record several at a time.

First step is to calloc the list of devices, so we can have a random
number of recorded devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: implement poll of multiplexed devices

hid-recorder can now record several hidraw device nodes at a time.

Add a note in the usage.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: handle device disconnect

With polling, device disconnects are a little bit more tricky to handle.
We need to close the device, and remove it from the list of polled device.

To be consistent with the index, we need to also stack the existing devices
to the left in fds and devices.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-replay: install signal handler

Alows to clean up gently the allocated memory when hitting Ctrl-C

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Release version 0.7

- Allow to multiplex several hidraw nodes with the tag "D:"
- lots of valgrind memleaks fixed
- add a GUI to edit the report descriptors in tools (requires Python and Qt)
- add several tools in the tools directory to automate capturing from usbmon
  and evemu

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
hid-recorder: start time should be global, not per device

When multiplexing devices, the origin of the time is global accross
devices. Using a per device start time does not give any benefit.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Release 0.7.1

- forgot about the starttime which was not global

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>