Configure device classes for evdev devices.
Change-Id: Ia75b71253771d9d558c59411e27f8a51e352fb8b
diff --git a/modules/input/evdev/InputHub.h b/modules/input/evdev/InputHub.h
index dfab3db..1abdc09 100644
--- a/modules/input/evdev/InputHub.h
+++ b/modules/input/evdev/InputHub.h
@@ -56,29 +56,55 @@
*/
class InputDeviceNode {
public:
+ /** Get the Linux device path for the node. */
virtual const std::string& getPath() const = 0;
+ /** Get the name of the device returned by the driver. */
virtual const std::string& getName() const = 0;
+ /** Get the location of the device returned by the driver. */
virtual const std::string& getLocation() const = 0;
+ /** Get the unique id of the device returned by the driver. */
virtual const std::string& getUniqueId() const = 0;
+ /** Get the bus type of the device returned by the driver. */
virtual uint16_t getBusType() const = 0;
+ /** Get the vendor id of the device returned by the driver. */
virtual uint16_t getVendorId() const = 0;
+ /** Get the product id of the device returned by the driver. */
virtual uint16_t getProductId() const = 0;
+ /** Get the version of the device driver. */
virtual uint16_t getVersion() const = 0;
+ /** Returns true if the device has the key. */
virtual bool hasKey(int32_t key) const = 0;
- virtual bool hasRelativeAxis(int axis) const = 0;
- virtual const AbsoluteAxisInfo* getAbsoluteAxisInfo(int32_t axis) const = 0;
+ /** Returns true if the device has a key in the range [startKey, endKey). */
+ virtual bool hasKeyInRange(int32_t startKey, int32_t endKey) const = 0;
+ /** Returns true if the device has the relative axis. */
+ virtual bool hasRelativeAxis(int32_t axis) const = 0;
+ /** Returns true if the device has the absolute axis. */
+ virtual bool hasAbsoluteAxis(int32_t axis) const = 0;
+ /** Returns true if the device has the switch. */
+ virtual bool hasSwitch(int32_t sw) const = 0;
+ /** Returns true if the device has the force feedback method. */
+ virtual bool hasForceFeedback(int32_t ff) const = 0;
+ /** Returns true if the device has the input property. */
virtual bool hasInputProperty(int property) const = 0;
+ /** Returns the state of the key. */
virtual int32_t getKeyState(int32_t key) const = 0;
+ /** Returns the state of the switch. */
virtual int32_t getSwitchState(int32_t sw) const = 0;
+ /** Returns information about the absolute axis. */
+ virtual const AbsoluteAxisInfo* getAbsoluteAxisInfo(int32_t axis) const = 0;
+ /** Returns the value of the absolute axis. */
virtual status_t getAbsoluteAxisValue(int32_t axis, int32_t* outValue) const = 0;
+ /** Vibrate the device for duration ns. */
virtual void vibrate(nsecs_t duration) = 0;
- virtual void cancelVibrate(int32_t deviceId) = 0;
+ /** Stop vibration on the device. */
+ virtual void cancelVibrate() = 0;
+ /** Disable key repeat for the device in the driver. */
virtual void disableDriverKeyRepeat() = 0;
protected: