Easy device manipulation. More...
Data Structures | |
struct | _Eeze_Version |
Macros | |
#define | EAPI |
#define | EEZE_VERSION_MAJOR EFL_VERSION_MAJOR |
#define | EEZE_VERSION_MINOR EFL_VERSION_MINOR |
#define | EAPI |
Typedefs | |
typedef struct Eeze_Udev_Watch | Eeze_Udev_Watch |
Opaque structure to hold data for a udev watch. | |
typedef struct _Eeze_Version | Eeze_Version |
typedef void(* | Eeze_Udev_Watch_Cb) (const char *, Eeze_Udev_Event, void *, Eeze_Udev_Watch *) |
Callback type for use with Eeze_Udev_Watch. | |
Enumerations | |
enum | Eeze_Udev_Event { EEZE_UDEV_EVENT_NONE = 0xf0 , EEZE_UDEV_EVENT_ADD = (1 << 1) , EEZE_UDEV_EVENT_REMOVE = (1 << 2) , EEZE_UDEV_EVENT_CHANGE = (1 << 3) , EEZE_UDEV_EVENT_ONLINE = (1 << 4) , EEZE_UDEV_EVENT_OFFLINE = (1 << 5) } |
Flags for watch events. More... | |
enum | Eeze_Udev_Type { EEZE_UDEV_TYPE_NONE , EEZE_UDEV_TYPE_KEYBOARD , EEZE_UDEV_TYPE_MOUSE , EEZE_UDEV_TYPE_TOUCHPAD , EEZE_UDEV_TYPE_DRIVE_MOUNTABLE , EEZE_UDEV_TYPE_DRIVE_INTERNAL , EEZE_UDEV_TYPE_DRIVE_REMOVABLE , EEZE_UDEV_TYPE_DRIVE_CDROM , EEZE_UDEV_TYPE_POWER_AC , EEZE_UDEV_TYPE_POWER_BAT , EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR , EEZE_UDEV_TYPE_NET , EEZE_UDEV_TYPE_V4L , EEZE_UDEV_TYPE_BLUETOOTH , EEZE_UDEV_TYPE_JOYSTICK , EEZE_UDEV_TYPE_DRM , EEZE_UDEV_TYPE_BACKLIGHT , EEZE_UDEV_TYPE_LEDS , EEZE_UDEV_TYPE_GRAPHICS , EEZE_UDEV_TYPE_GPIO } |
Convenience types to simplify udev access. More... | |
Functions | |
EAPI int | eeze_init (void) |
Initialize the eeze library. More... | |
EAPI int | eeze_shutdown (void) |
Shut down the eeze library. More... | |
EAPI void * | eeze_udev_get (void) |
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 . More... | |
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. More... | |
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). More... | |
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. More... | |
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. More... | |
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. More... | |
EAPI const char * | eeze_udev_devpath_get_syspath (const char *devpath) |
Get the syspath of a device from the /dev/ path. More... | |
EAPI const char * | eeze_udev_syspath_get_parent (const char *syspath) |
Find the root device of a device from its syspath. More... | |
EAPI Eina_Stringshare * | eeze_udev_syspath_get_parent_filtered (const char *syspath, const char *subsystem, const char *devtype) |
Find the parent device of a device from its syspath with a filter applied. More... | |
EAPI Eina_List * | eeze_udev_syspath_get_parents (const char *syspath) |
Returns a list of all parent device syspaths for syspath . More... | |
EAPI const char * | eeze_udev_syspath_get_devpath (const char *syspath) |
Get the /dev/ path from the /sys/ path. More... | |
EAPI const char * | eeze_udev_syspath_get_devname (const char *syspath) |
Get the /dev/ name from the /sys/ path. More... | |
EAPI const char * | eeze_udev_syspath_get_subsystem (const char *syspath) |
Get the subsystem of a device from the /sys/ path. More... | |
EAPI Eina_Bool | eeze_udev_syspath_check_property (const char *syspath, const char *property, const char *value) |
Check the property value of a device from the /sys/ path against a provided value. More... | |
EAPI const char * | eeze_udev_syspath_get_property (const char *syspath, const char *property) |
Get the property value of a device from the /sys/ path. More... | |
EAPI const char * | eeze_udev_syspath_get_sysattr (const char *syspath, const char *sysattr) |
Get the sysattr value of a device from the /sys/ path. More... | |
EAPI Eina_Bool | eeze_udev_syspath_check_sysattr (const char *syspath, const char *sysattr, const char *value) |
Check the sysattr value of a device from the /sys/ path against a provided value. More... | |
EAPI Eina_Bool | eeze_udev_syspath_set_sysattr (const char *syspath, const char *sysattr, double value) |
Set the sysattr value of a device from the /sys/ path. More... | |
EAPI Eina_List * | eeze_udev_syspath_get_sysattr_list (const char *syspath) |
Get the sysattr list of a device from the /sys/ path. More... | |
EAPI Eina_Bool | eeze_udev_syspath_is_mouse (const char *syspath) |
Checks whether the device is a mouse. More... | |
EAPI Eina_Bool | eeze_udev_syspath_is_kbd (const char *syspath) |
Checks whether the device is a keyboard. More... | |
EAPI Eina_Bool | eeze_udev_syspath_is_touchpad (const char *syspath) |
Checks whether the device is a touchpad. More... | |
EAPI Eina_Bool | eeze_udev_syspath_is_joystick (const char *syspath) |
Checks whether the device is a joystick. More... | |
EAPI int | eeze_udev_syspath_get_sysnum (const char *syspath) |
Get the sysnum value of a device from the /sys/ path. More... | |
EAPI Eina_Bool | eeze_udev_walk_check_sysattr (const char *syspath, const char *sysattr, const char *value) |
Walks up the device chain starting at syspath , checking each device for sysattr with (optional) value . More... | |
EAPI const char * | eeze_udev_walk_get_sysattr (const char *syspath, const char *sysattr) |
Walks up the device chain starting at syspath , checking each device for sysattr , and returns the value if found. More... | |
EAPI Eeze_Udev_Watch * | eeze_udev_watch_add (Eeze_Udev_Type type, int event, Eeze_Udev_Watch_Cb cb, void *user_data) |
Add a watch for a device type. More... | |
EAPI void * | eeze_udev_watch_del (Eeze_Udev_Watch *watch) |
Deletes a watch. More... | |
Variables | |
EAPI Eeze_Version * | eeze_version |
Easy device manipulation.
Eeze is a library for manipulating devices through udev with a simple and fast api. It interfaces directly with libudev, avoiding such middleman daemons as udisks/upower or hal, to immediately gather device information the instant it becomes known to the system. This can be used to determine such things as:
For udev functions, see udev.
enum Eeze_Udev_Event |
Flags for watch events.
These events are used to specify the events to watch in a Eeze_Udev_Watch. They can be ORed together.
Convenience types to simplify udev access.
These types allow easy access to certain udev device types. They may only be used in specified functions.
EAPI void * eeze_udev_get | ( | void | ) |