Modifier and Type | Interface and Description |
---|---|
static class |
Udev.UdevContext
All functions require a libudev context to operate.
|
static class |
Udev.UdevDevice
To introspect a local device on a system, a udev device object can be created
via
Udev.UdevContext.deviceNewFromSyspath(String) and friends. |
static class |
Udev.UdevEnumerate
To enumerate local devices on the system, an enumeration object can be
created via
Udev.UdevContext.enumerateNew() . |
static class |
Udev.UdevListEntry
Whenever libudev returns a list of objects, the
udev_list_entry API
should be used to iterate, access and modify those lists. |
Library.Handler
Modifier and Type | Field and Description |
---|---|
static Udev |
INSTANCE |
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_TYPE_MAPPER
Modifier and Type | Method and Description |
---|---|
java.lang.String |
udev_device_get_devnode(Udev.UdevDevice udev_device)
Gets the devnode of a udev device
|
java.lang.String |
udev_device_get_devtype(Udev.UdevDevice udev_device)
Gets the devtype of a udev device
|
Udev.UdevDevice |
udev_device_get_parent_with_subsystem_devtype(Udev.UdevDevice udev_device,
java.lang.String subsystem,
java.lang.String devtype)
Gets the parent of a udev device matching a subsystem and devtype
|
Udev.UdevDevice |
udev_device_get_parent(Udev.UdevDevice udev_device)
Gets the parent of a udev device
|
java.lang.String |
udev_device_get_property_value(Udev.UdevDevice udev_device,
java.lang.String key)
Retrieves a device property from a udev device.
|
java.lang.String |
udev_device_get_subsystem(Udev.UdevDevice udev_device)
Gets the subsystem of a udev device
|
java.lang.String |
udev_device_get_sysattr_value(Udev.UdevDevice udev_device,
java.lang.String sysattr)
Retrieves a device attributesfrom a udev device.
|
java.lang.String |
udev_device_get_sysname(Udev.UdevDevice udev_device)
Gets the sysname of a udev device
|
java.lang.String |
udev_device_get_syspath(Udev.UdevDevice udev_device)
Gets the syspath of a udev device
|
Udev.UdevDevice |
udev_device_new_from_syspath(Udev.UdevContext udev,
java.lang.String syspath)
Allocates a new udev device object and returns a pointer to it.
|
Udev.UdevDevice |
udev_device_ref(Udev.UdevDevice udev_device)
Acquire further references to a udev device object.
|
Udev.UdevDevice |
udev_device_unref(Udev.UdevDevice udev_device)
Drop a reference to a udev device object.
|
int |
udev_enumerate_add_match_subsystem(Udev.UdevEnumerate udev_enumerate,
java.lang.String subsystem)
Modify filters of a udev enumerate object to match a subsystem.
|
Udev.UdevListEntry |
udev_enumerate_get_list_entry(Udev.UdevEnumerate udev_enumerate)
Get the first list entry from a udev enumerate object.
|
Udev.UdevEnumerate |
udev_enumerate_new(Udev.UdevContext udev)
Create a udev enumerate object.
|
Udev.UdevEnumerate |
udev_enumerate_ref(Udev.UdevEnumerate udev_enumerate)
Acquire further references to a udev enumerate object.
|
int |
udev_enumerate_scan_devices(Udev.UdevEnumerate udev_enumerate)
Query a udev enumerate object.
|
Udev.UdevEnumerate |
udev_enumerate_unref(Udev.UdevEnumerate udev_enumerate)
Drop a reference to a udev enumerate object.
|
java.lang.String |
udev_list_entry_get_name(Udev.UdevListEntry list_entry)
Get the name of the udev list entry
|
Udev.UdevListEntry |
udev_list_entry_get_next(Udev.UdevListEntry list_entry)
Gets the next entry in the enumeration.
|
Udev.UdevContext |
udev_new()
Allocates a new udev context object and returns a pointer to it.
|
Udev.UdevContext |
udev_ref(Udev.UdevContext udev)
Acquire further references to a udev context object.
|
Udev.UdevContext |
udev_unref(Udev.UdevContext udev)
Drop a reference to a udev context object.
|
static final Udev INSTANCE
Udev.UdevContext udev_new()
Udev.UdevContext udev_ref(Udev.UdevContext udev)
udev
- A udev context object.Udev.UdevContext udev_unref(Udev.UdevContext udev)
udev
- A udev context object.Udev.UdevDevice udev_device_new_from_syspath(Udev.UdevContext udev, java.lang.String syspath)
Creates the device object based on information found in /sys
,
annotated with properties from the udev-internal device database. A syspath
is any subdirectory of /sys
, with the restriction that a subdirectory
of /sys/devices
(or a symlink to one) represents a real device and as
such must contain a uevent file.
udev
- A udev context object.syspath
- The path of the device in /sys
.errno
is set appropriately.Udev.UdevEnumerate udev_enumerate_new(Udev.UdevContext udev)
udev
- A udev context object.Udev.UdevEnumerate udev_enumerate_ref(Udev.UdevEnumerate udev_enumerate)
udev_enumerate
- A udev enumerate object.Udev.UdevEnumerate udev_enumerate_unref(Udev.UdevEnumerate udev_enumerate)
udev_enumerate
- A udev enumerate object.int udev_enumerate_add_match_subsystem(Udev.UdevEnumerate udev_enumerate, java.lang.String subsystem)
udev_enumerate
- The udev enumerate object to modify.subsystem
- The subsystem to matchint udev_enumerate_scan_devices(Udev.UdevEnumerate udev_enumerate)
/sys
for all devices which match
the given filters. No matches will return all currently available devices.udev_enumerate
- The udev enumerate object, with optional filters.Udev.UdevListEntry udev_enumerate_get_list_entry(Udev.UdevEnumerate udev_enumerate)
udev_enumerate
- The udev enumerate object.Udev.UdevListEntry udev_list_entry_get_next(Udev.UdevListEntry list_entry)
list_entry
- the current list entryjava.lang.String udev_list_entry_get_name(Udev.UdevListEntry list_entry)
list_entry
- A udev list entryUdev.UdevDevice udev_device_ref(Udev.UdevDevice udev_device)
udev_device
- A udev device object.Udev.UdevDevice udev_device_unref(Udev.UdevDevice udev_device)
udev_device
- A udev device object.Udev.UdevDevice udev_device_get_parent(Udev.UdevDevice udev_device)
udev_device
- A udev device object.Udev.UdevDevice udev_device_get_parent_with_subsystem_devtype(Udev.UdevDevice udev_device, java.lang.String subsystem, java.lang.String devtype)
udev_device
- A udev device object.subsystem
- The subsystem to matchdevtype
- The device type to matchjava.lang.String udev_device_get_syspath(Udev.UdevDevice udev_device)
udev_device
- A udev device object.java.lang.String udev_device_get_sysname(Udev.UdevDevice udev_device)
udev_device
- A udev device object.java.lang.String udev_device_get_devnode(Udev.UdevDevice udev_device)
udev_device
- A udev device object.java.lang.String udev_device_get_devtype(Udev.UdevDevice udev_device)
udev_device
- A udev device object.java.lang.String udev_device_get_subsystem(Udev.UdevDevice udev_device)
udev_device
- A udev device object.java.lang.String udev_device_get_sysattr_value(Udev.UdevDevice udev_device, java.lang.String sysattr)
udev_device
- A udev device object.sysattr
- The attribute to retrieve.java.lang.String udev_device_get_property_value(Udev.UdevDevice udev_device, java.lang.String key)
udev_device
- A udev device object.key
- The property to retrieve.