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

  syspath | The 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

  list | The 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

  sysattr | The attribute to find
  value | Optional: 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 )

Find devices using an Eeze_Udev_Type and/or a name.

Parameters

  type | An Eeze_Udev_Type or 0
  name | A 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.

References EEZE_UDEV_TYPE_BACKLIGHT, EEZE_UDEV_TYPE_BLUETOOTH, EEZE_UDEV_TYPE_DRIVE_CDROM, EEZE_UDEV_TYPE_DRIVE_INTERNAL, EEZE_UDEV_TYPE_DRIVE_MOUNTABLE, EEZE_UDEV_TYPE_DRIVE_REMOVABLE, EEZE_UDEV_TYPE_DRM, EEZE_UDEV_TYPE_GPIO, EEZE_UDEV_TYPE_GRAPHICS, EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR, EEZE_UDEV_TYPE_JOYSTICK, EEZE_UDEV_TYPE_KEYBOARD, EEZE_UDEV_TYPE_LEDS, EEZE_UDEV_TYPE_MOUSE, EEZE_UDEV_TYPE_NET, EEZE_UDEV_TYPE_NONE, EEZE_UDEV_TYPE_POWER_AC, EEZE_UDEV_TYPE_POWER_BAT, EEZE_UDEV_TYPE_TOUCHPAD, EEZE_UDEV_TYPE_V4L, eina_list_append(), and eina_stringshare_add().

Referenced by ecore_drm_device_find().

## 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

  subsystem | The udev subsystem to filter by, or `NULL`
  type | "ID_INPUT_KEY", "ID_INPUT_MOUSE", "ID_INPUT_TOUCHPAD", `NULL`, etc
  name | A 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

  subsystem | The udev subsystem to filter by, or `NULL`
  sysname | A 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().