From 1dc57ea0e5088e34e7611baa8e2af2654bd846c7 Mon Sep 17 00:00:00 2001 From: Filipe Laíns Date: Mon, 10 Aug 2020 20:32:16 +0100 Subject: ioctl/hidraw: add __all__ export MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Filipe Laíns --- ioctl/hidraw.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'ioctl/hidraw.py') diff --git a/ioctl/hidraw.py b/ioctl/hidraw.py index 94cd1b4..d72ec33 100644 --- a/ioctl/hidraw.py +++ b/ioctl/hidraw.py @@ -10,6 +10,13 @@ from typing import BinaryIO, List, Tuple import ioctl +__all__ = [ + 'HidrawReportDescriptor', + 'HidrawDevinfo', + 'Hidraw', +] + + class HidrawReportDescriptor(ctypes.Structure): HID_MAX_DESCRIPTOR_SIZE = 4096 _fields_ = [ @@ -39,7 +46,6 @@ class Hidraw(object): HIDIOCGRAWPHYS = 0x05 HIDIOCSFEATURE = 0x06 HIDIOCGFEATURE = 0x07 - HIDIOCGRAWUNIQ = 0x08 HID_NAME_SIZE = 1024 @@ -119,19 +125,10 @@ class Hidraw(object): @property def phys(self) -> str: ''' - HID physical name of the hidraw node + Physical name of the hidraw node ''' return ioctl.IOCTL.IOR( 'H', self.HIDIOCGRAWPHYS, self.HID_NAME_SIZE ).perform(self._fd).decode('utf-8').strip('\x00') - @property - def uniq(self) -> str: - ''' - HID unique identifier of the hidraw node - ''' - return ioctl.IOCTL.IOR( - 'H', self.HIDIOCGRAWUNIQ, self.HID_NAME_SIZE - ).perform(self._fd).decode('utf-8').strip('\x00') - - # TODO: HIDIOCSFEATURE, HIDIOCGFEATURE + # TODO: HIDIOCSFEATURE, HIDIOCGFEATURE, HIDIOCGRAWUNIQ -- cgit v1.2.3