Functions
Find
Eeze » main » udev

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

Functions

EAPI Eina_Listeeze_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. More...
 
EAPI Eina_Listeeze_udev_find_unlisted_similar (Eina_List *list)
 Updates a list of all syspaths that are (or should be) the same device. More...
 
EAPI Eina_Listeeze_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). More...
 
EAPI Eina_Listeeze_udev_find_by_type (Eeze_Udev_Type type, const char *name)
 Find devices using an Eeze_Udev_Type and/or a name. More...
 
EAPI Eina_Listeeze_udev_find_by_filter (const char *subsystem, const char *type, const char *name)
 A more advanced find, allows finds using udev properties. More...
 
EAPI Eina_Listeeze_udev_find_by_subsystem_sysname (const char *subsystem, const char *sysname)
 A more advanced find, allows finds using udev subsystem and sysname. More...
 

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 EINA_LIST_FOREACH, eina_list_prepend(), and eina_stringshare_add().

◆ 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 EINA_LIST_FOREACH.

◆ 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 eina_list_append(), and eina_stringshare_add().

◆ eeze_udev_find_by_type()

EAPI Eina_List* eeze_udev_find_by_type ( Eeze_Udev_Type  type,
const char *  name 
)

◆ 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 eina_list_append(), and eina_stringshare_add().

◆ 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 eina_list_append(), and eina_stringshare_add().

Referenced by ecore_drm_inputs_device_axis_size_set().