libvirtualhid 18
Cross-platform C++ library for virtual HID devices.
lvh::VirtualDevice Class Referenceabstract

Common interface for virtual device handles. More...

#include <src/include/libvirtualhid/runtime.hpp>

Inheritance diagram for lvh::VirtualDevice:
[legend]

Public Member Functions

virtual OperationStatus close ()=0
 Close the virtual device.
 
virtual DeviceId device_id () const =0
 Get the device identifier assigned by the runtime.
 
virtual std::vector< DeviceNodedevice_nodes () const =0
 Get platform-visible nodes associated with the device.
 
virtual bool is_open () const =0
 Check whether the device is open.
 
virtual const DeviceProfileprofile () const =0
 Get the profile used to create this device.
 
virtual ~VirtualDevice ()=default
 Destroy the virtual device handle.
 

Detailed Description

Common interface for virtual device handles.

Member Function Documentation

◆ close()

virtual OperationStatus lvh::VirtualDevice::close ( )
pure virtual

Close the virtual device.

Returns
Close operation status.

Implemented in lvh::Gamepad, lvh::Keyboard, lvh::Mouse, lvh::Touchscreen, lvh::Trackpad, and lvh::PenTablet.

◆ device_id()

virtual DeviceId lvh::VirtualDevice::device_id ( ) const
pure virtual

Get the device identifier assigned by the runtime.

Returns
Device identifier.

Implemented in lvh::Gamepad, lvh::Keyboard, lvh::Mouse, lvh::Touchscreen, lvh::Trackpad, and lvh::PenTablet.

◆ device_nodes()

virtual std::vector< DeviceNode > lvh::VirtualDevice::device_nodes ( ) const
pure virtual

Get platform-visible nodes associated with the device.

Returns
Device nodes and diagnostic paths currently known to the backend.

Implemented in lvh::Gamepad, lvh::Keyboard, lvh::Mouse, lvh::Touchscreen, lvh::Trackpad, and lvh::PenTablet.

◆ is_open()

virtual bool lvh::VirtualDevice::is_open ( ) const
pure virtual

Check whether the device is open.

Returns
true when the device can accept operations.

Implemented in lvh::Gamepad, lvh::Keyboard, lvh::Mouse, lvh::Touchscreen, lvh::Trackpad, and lvh::PenTablet.

◆ profile()

virtual const DeviceProfile & lvh::VirtualDevice::profile ( ) const
pure virtual

Get the profile used to create this device.

Returns
Device profile.

Implemented in lvh::Gamepad, lvh::Keyboard, lvh::Mouse, lvh::Touchscreen, lvh::Trackpad, and lvh::PenTablet.


The documentation for this class was generated from the following file: