class InputDeviceDispatcher
Defined at line 19 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.h
InputDeviceDispatcher manages all sensor InputDevice instances and
could dispatch a sensor report to its corresponding InputDevice.
Public Methods
bool AddDevice (InputDevice * device, const std::string & name)
Add new InputDevice with |name|.
Returns:
- If |device| or devices with the same |name| already exists, returns
false, and the |device| will be not added.
- Otherwise, returns true.
Defined at line 9 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc
bool RemoveDevice (InputDevice * device)
Remove the device with given |device| pointer.
Returns:
- Returns true if |device| is found and deleted.
- Otherwise returns false.
Defined at line 21 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc
bool RemoveDevice (const std::string & name)
Remove the device with given |name|.
Returns:
- Returns true if the device with |name| is found and deleted.
- Otherwise returns false.
Defined at line 32 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc
InputDevice * GetDevice (const std::string & name)
Get the device pointer of given |name|.
Returns:
- Returns the device pointer if device with |name| is found.
- Otherwise returns nullptr.
Defined at line 43 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc
zx_status_t DispatchReportToDevice (const std::string & name, const SensorReport & rpt)
Dispatch a given SensorReport to device with |name|.
If device not found, returns |ZX_ERR_NOT_FOUND|. Otherwise returns
the result of the dispatch callback |OnReport()|.
Defined at line 50 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc
void DispatchReportToAllDevices (const SensorReport & rpt)
Dispatch a given SensorReport to all available devices.
Defined at line 58 of file ../../src/ui/input/drivers/goldfish_sensor/input_device_dispatcher.cc