Find
Eeze » main » udev

These are functions which find/supplement lists of devices. More...

Functions

EAPI Eina_List * eeze_udev_find_similar_from_syspath (const char *syspath)
 Returns a stringshared list of all syspaths that are (or should be) the same device as the device pointed at by syspath.
EAPI Eina_List * eeze_udev_find_unlisted_similar (Eina_List *list)
 Updates a list of all syspaths that are (or should be) the same device.
EAPI Eina_List * eeze_udev_find_by_sysattr (const char *sysattr, const char *value)
 Find a list of devices by a sysattr (and, optionally, a value of that sysattr).
EAPI Eina_List * eeze_udev_find_by_type (Eeze_Udev_Type type, const char *name)
 Find devices using an Eeze_Udev_Type and/or a name.
EAPI Eina_List * eeze_udev_find_by_filter (const char *subsystem, const char *type, const char *name)
 A more advanced find, allows finds using udev properties.
EAPI Eina_List * eeze_udev_find_by_subsystem_sysname (const char *subsystem, const char *sysname)
 A more advanced find, allows finds using udev subsystem and sysname.

Detailed Description

These are functions which find/supplement lists of devices.

Function Documentation

◆ eeze_udev_find_similar_from_syspath()

EAPI Eina_List * eeze_udev_find_similar_from_syspath ( const char * syspath)

Returns a stringshared list of all syspaths that are (or should be) the same device as the device pointed at by syspath.

Parameters
syspathThe syspath of the device to find matches for
Returns
All devices which are the same as the one passed

References eeze_udev_find_similar_from_syspath(), EINA_LIST_FOREACH, eina_list_prepend(), and eina_stringshare_add().

Referenced by eeze_udev_find_similar_from_syspath().

◆ eeze_udev_find_unlisted_similar()

EAPI Eina_List * eeze_udev_find_unlisted_similar ( Eina_List * list)

Updates a list of all syspaths that are (or should be) the same device.

Parameters
listThe list of devices to update
Returns
The updated list

This function will update list to include all devices matching devices with syspaths currently stored in list. All strings are stringshared.

Note
This is an expensive call, do not use it unless you must.

References eeze_udev_find_unlisted_similar(), and EINA_LIST_FOREACH.

Referenced by eeze_udev_find_unlisted_similar().

◆ eeze_udev_find_by_sysattr()

EAPI Eina_List * eeze_udev_find_by_sysattr ( const char * sysattr,
const char * value )

Find a list of devices by a sysattr (and, optionally, a value of that sysattr).

Parameters
sysattrThe attribute to find
valueOptional: the value that the attribute should have
Returns
A stringshared list of the devices found with the attribute

References eeze_udev_find_by_sysattr(), eina_list_append(), and eina_stringshare_add().

Referenced by eeze_udev_find_by_sysattr().

◆ eeze_udev_find_by_type()

◆ eeze_udev_find_by_filter()

EAPI Eina_List * eeze_udev_find_by_filter ( const char * subsystem,
const char * type,
const char * name )

A more advanced find, allows finds using udev properties.

Parameters
subsystemThe udev subsystem to filter by, or NULL
type"ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", NULL, etc
nameA filter for the device name, or NULL
Returns
A stringshared Eina_List* of matched devices or NULL on failure

Return a list of syspaths (/sys/$syspath) for matching udev devices. Requires at least one filter.

References eeze_udev_find_by_filter(), eina_list_append(), and eina_stringshare_add().

Referenced by eeze_udev_find_by_filter().

◆ eeze_udev_find_by_subsystem_sysname()

EAPI Eina_List * eeze_udev_find_by_subsystem_sysname ( const char * subsystem,
const char * sysname )

A more advanced find, allows finds using udev subsystem and sysname.

Parameters
subsystemThe udev subsystem to filter by, or NULL
sysnameA filter for the device name, or NULL
Returns
A stringshared Eina_List* of matched devices or NULL on failure
A stringshared list of the devices found
Since
1.13

EAPI

References eeze_udev_find_by_subsystem_sysname(), eina_list_append(), and eina_stringshare_add().

Referenced by ecore_drm_inputs_device_axis_size_set(), and eeze_udev_find_by_subsystem_sysname().