virtual-device-listener: Add a device socket handler class

Instead of repeating the same code in both the virtual-image and the
virtual-device drivers, implement a class to handle the socket listening
an data reading.

Co-authored-by: Marco Trevisan (Treviño) <mail@3v1n0.net>
This commit is contained in:
Benjamin Berg
2021-01-05 15:54:12 +01:00
parent 5df14206d8
commit 253750ec08
4 changed files with 524 additions and 187 deletions

View File

@@ -155,6 +155,9 @@ foreach driver: drivers
if driver == 'virtual_image'
drivers_sources += [ 'drivers/virtual-image.c' ]
endif
if driver.startswith('virtual_')
drivers_sources += [ 'drivers/virtual-device-listener.c' ]
endif
if driver == 'synaptics'
drivers_sources += [
'drivers/synaptics/synaptics.c',