Top Description Inners Fields Methods
com.sun.jna.platform.linux

public Interface Udev

extends Library
Imports
com.sun.jna.Library, .Native, .PointerType

libudev.h provides APIs to introspect and enumerate devices on the local system. Udev objects are opaque and must not be accessed by the caller via different means than functions provided by libudev.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Udev.UdevContext

All functions require a libudev context to operate.

public static class
Udev.UdevDevice

To introspect a local device on a system, a udev device object can be created via UdevContext#deviceNewFromSyspath(String) and friends.

public static class
Udev.UdevEnumerate

To enumerate local devices on the system, an enumeration object can be created via UdevContext#enumerateNew().

public 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.

Field Summary

Modifier and TypeField and Description
public static final Udev
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a pointer to a constant string that describes the devnode. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.
udev_device_get_devnode
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the devnode of a udev device

public String

Returns:

a pointer to a constant string that describes the devtype. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.
udev_device_get_devtype
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the devtype of a udev device

public Udev.UdevDevice

Returns:

a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.
udev_device_get_parent
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the parent of a udev device

public Udev.UdevDevice

Returns:

a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.
udev_device_get_parent_with_subsystem_devtype
(Udev.UdevDevice
A udev device object.
udev_device
,
String
The subsystem to match
subsystem
,
String
The device type to match
devtype
)

Gets the parent of a udev device matching a subsystem and devtype

public String

Returns:

a pointer to a constant string of the requested value. On error, NULL is returned.
udev_device_get_property_value
(Udev.UdevDevice
A udev device object.
udev_device
,
String
The property to retrieve.
key
)

Retrieves a device property from a udev device.

public String

Returns:

a pointer to a constant string that describes the subsystem. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.
udev_device_get_subsystem
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the subsystem of a udev device

public String

Returns:

a pointer to a constant string of the requested value. On error, NULL is returned. Attributes that may contain NUL bytes should not be retrieved with udev_device_get_sysattr_value(); instead, read them directly from the files within the device's syspath.
udev_device_get_sysattr_value
(Udev.UdevDevice
A udev device object.
udev_device
,
String
The attribute to retrieve.
sysattr
)

Retrieves a device attributesfrom a udev device.

public String

Returns:

a pointer to a constant string that describes the sysname. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.
udev_device_get_sysname
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the sysname of a udev device

public String

Returns:

a pointer to a constant string that describes the syspath. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.
udev_device_get_syspath
(Udev.UdevDevice
A udev device object.
udev_device
)

Gets the syspath of a udev device

public Udev.UdevDevice

Returns:

a pointer to the allocated udev device. On failure, NULL is returned, and errno is set appropriately.
udev_device_new_from_syspath
(Udev.UdevContext
A udev context object.
udev
,
String
The path of the device in /sys.
syspath
)

Allocates a new udev device object and returns a pointer to it.

public Udev.UdevDevice

Returns:

the argument that was passed, unmodified.
udev_device_ref
(Udev.UdevDevice
A udev device object.
udev_device
)

Acquire further references to a udev device object.

public Udev.UdevDevice

Returns:

always returns NULL.
udev_device_unref
(Udev.UdevDevice
A udev device object.
udev_device
)

Drop a reference to a udev device object.

public int

Returns:

an integer greater than, or equal to, 0 on success.
udev_enumerate_add_match_subsystem
(Udev.UdevEnumerate
The udev enumerate object to modify.
udev_enumerate
,
String
The subsystem to match
subsystem
)

Modify filters of a udev enumerate object to match a subsystem.

public Udev.UdevListEntry

Returns:

On success, returns a pointer to the first entry in the list of found devices. If the list is empty, or on failure, NULL is returned.
udev_enumerate_get_list_entry
(Udev.UdevEnumerate
The udev enumerate object.
udev_enumerate
)

Get the first list entry from a udev enumerate object.

public Udev.UdevEnumerate

Returns:

On success, returns a pointer to the allocated udev monitor. On failure, NULL is returned.
udev_enumerate_new
(Udev.UdevContext
A udev context object.
udev
)

Create a udev enumerate object.

public Udev.UdevEnumerate

Returns:

the argument that was passed, unmodified.
udev_enumerate_ref
(Udev.UdevEnumerate
A udev enumerate object.
udev_enumerate
)

Acquire further references to a udev enumerate object.

public int

Returns:

an integer greater than, or equal to, 0 on success.
udev_enumerate_scan_devices
(Udev.UdevEnumerate
The udev enumerate object, with optional filters.
udev_enumerate
)

Query a udev enumerate object.

public Udev.UdevEnumerate

Returns:

always returns NULL.
udev_enumerate_unref
(Udev.UdevEnumerate
A udev enumerate object.
udev_enumerate
)

Drop a reference to a udev enumerate object.

public String

Returns:

a pointer to a constant string representing the requested value. The string is bound to the lifetime of the list entry itself. On failure, NULL is returned.
udev_list_entry_get_name
(Udev.UdevListEntry
A udev list entry
list_entry
)

Get the name of the udev list entry

public Udev.UdevListEntry

Returns:

On success, returns a pointer to the next list entry. If no such entry can be found, or on failure, NULL is returned.
udev_list_entry_get_next
(Udev.UdevListEntry
the current list entry
list_entry
)

Gets the next entry in the enumeration.

public Udev.UdevContext

Returns:

On success, returns a pointer to the allocated udev context. On failure, NULL is returned.
udev_new
()

Allocates a new udev context object and returns a pointer to it.

public Udev.UdevContext

Returns:

the argument that was passed, unmodified.
udev_ref
(Udev.UdevContext
A udev context object.
udev
)

Acquire further references to a udev context object.

public Udev.UdevContext

Returns:

always returns NULL.
udev_unref
(Udev.UdevContext
A udev context object.
udev
)

Drop a reference to a udev context object.

Field Detail

INSTANCEback to summary
public static final Udev INSTANCE

Method Detail

udev_device_get_devnodeback to summary
public String udev_device_get_devnode(Udev.UdevDevice udev_device)

Gets the devnode of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:String

a pointer to a constant string that describes the devnode. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.

udev_device_get_devtypeback to summary
public String udev_device_get_devtype(Udev.UdevDevice udev_device)

Gets the devtype of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:String

a pointer to a constant string that describes the devtype. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.

udev_device_get_parentback to summary
public Udev.UdevDevice udev_device_get_parent(Udev.UdevDevice udev_device)

Gets the parent of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:Udev.UdevDevice

a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.

udev_device_get_parent_with_subsystem_devtypeback to summary
public Udev.UdevDevice udev_device_get_parent_with_subsystem_devtype(Udev.UdevDevice udev_device, String subsystem, String devtype)

Gets the parent of a udev device matching a subsystem and devtype

Parameters
udev_device:Udev.UdevDevice

A udev device object.

subsystem:String

The subsystem to match

devtype:String

The device type to match

Returns:Udev.UdevDevice

a pointer to the parent device. No additional reference to this device is acquired, but the child device owns a reference to such a parent device. On failure, NULL is returned.

udev_device_get_property_valueback to summary
public String udev_device_get_property_value(Udev.UdevDevice udev_device, String key)

Retrieves a device property from a udev device.

Parameters
udev_device:Udev.UdevDevice

A udev device object.

key:String

The property to retrieve.

Returns:String

a pointer to a constant string of the requested value. On error, NULL is returned.

udev_device_get_subsystemback to summary
public String udev_device_get_subsystem(Udev.UdevDevice udev_device)

Gets the subsystem of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:String

a pointer to a constant string that describes the subsystem. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.

udev_device_get_sysattr_valueback to summary
public String udev_device_get_sysattr_value(Udev.UdevDevice udev_device, String sysattr)

Retrieves a device attributesfrom a udev device.

Parameters
udev_device:Udev.UdevDevice

A udev device object.

sysattr:String

The attribute to retrieve.

Returns:String

a pointer to a constant string of the requested value. On error, NULL is returned. Attributes that may contain NUL bytes should not be retrieved with udev_device_get_sysattr_value(); instead, read them directly from the files within the device's syspath.

udev_device_get_sysnameback to summary
public String udev_device_get_sysname(Udev.UdevDevice udev_device)

Gets the sysname of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:String

a pointer to a constant string that describes the sysname. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.

udev_device_get_syspathback to summary
public String udev_device_get_syspath(Udev.UdevDevice udev_device)

Gets the syspath of a udev device

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:String

a pointer to a constant string that describes the syspath. The lifetime of this string is bound to the device it was requested on. On failure, may return NULL.

udev_device_new_from_syspathback to summary
public Udev.UdevDevice udev_device_new_from_syspath(Udev.UdevContext udev, String syspath)

Allocates a new udev device object and returns a pointer to it. This object is opaque and must not be accessed by the caller via different means than functions provided by libudev. Initially, the reference count of the device is 1.

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.

Parameters
udev:Udev.UdevContext

A udev context object.

syspath:String

The path of the device in /sys.

Returns:Udev.UdevDevice

a pointer to the allocated udev device. On failure, NULL is returned, and errno is set appropriately.

udev_device_refback to summary
public Udev.UdevDevice udev_device_ref(Udev.UdevDevice udev_device)

Acquire further references to a udev device object.

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:Udev.UdevDevice

the argument that was passed, unmodified.

udev_device_unrefback to summary
public Udev.UdevDevice udev_device_unref(Udev.UdevDevice udev_device)

Drop a reference to a udev device object. Once the reference count hits 0, the device object is destroyed and freed.

Parameters
udev_device:Udev.UdevDevice

A udev device object.

Returns:Udev.UdevDevice

always returns NULL.

udev_enumerate_add_match_subsystemback to summary
public int udev_enumerate_add_match_subsystem(Udev.UdevEnumerate udev_enumerate, String subsystem)

Modify filters of a udev enumerate object to match a subsystem.

Parameters
udev_enumerate:Udev.UdevEnumerate

The udev enumerate object to modify.

subsystem:String

The subsystem to match

Returns:int

an integer greater than, or equal to, 0 on success.

udev_enumerate_get_list_entryback to summary
public Udev.UdevListEntry udev_enumerate_get_list_entry(Udev.UdevEnumerate udev_enumerate)

Get the first list entry from a udev enumerate object.

Parameters
udev_enumerate:Udev.UdevEnumerate

The udev enumerate object.

Returns:Udev.UdevListEntry

On success, returns a pointer to the first entry in the list of found devices. If the list is empty, or on failure, NULL is returned.

udev_enumerate_newback to summary
public Udev.UdevEnumerate udev_enumerate_new(Udev.UdevContext udev)

Create a udev enumerate object. Initially, the reference count of the enumerate object is 1.

Parameters
udev:Udev.UdevContext

A udev context object.

Returns:Udev.UdevEnumerate

On success, returns a pointer to the allocated udev monitor. On failure, NULL is returned.

udev_enumerate_refback to summary
public Udev.UdevEnumerate udev_enumerate_ref(Udev.UdevEnumerate udev_enumerate)

Acquire further references to a udev enumerate object.

Parameters
udev_enumerate:Udev.UdevEnumerate

A udev enumerate object.

Returns:Udev.UdevEnumerate

the argument that was passed, unmodified.

udev_enumerate_scan_devicesback to summary
public int udev_enumerate_scan_devices(Udev.UdevEnumerate udev_enumerate)

Query a udev enumerate object. Scans /sys for all devices which match the given filters. No matches will return all currently available devices.

Parameters
udev_enumerate:Udev.UdevEnumerate

The udev enumerate object, with optional filters.

Returns:int

an integer greater than, or equal to, 0 on success.

udev_enumerate_unrefback to summary
public Udev.UdevEnumerate udev_enumerate_unref(Udev.UdevEnumerate udev_enumerate)

Drop a reference to a udev enumerate object. Once the reference count hits 0, the enumerate object is destroyed and freed.

Parameters
udev_enumerate:Udev.UdevEnumerate

A udev enumerate object.

Returns:Udev.UdevEnumerate

always returns NULL.

udev_list_entry_get_nameback to summary
public String udev_list_entry_get_name(Udev.UdevListEntry list_entry)

Get the name of the udev list entry

Parameters
list_entry:Udev.UdevListEntry

A udev list entry

Returns:String

a pointer to a constant string representing the requested value. The string is bound to the lifetime of the list entry itself. On failure, NULL is returned.

udev_list_entry_get_nextback to summary
public Udev.UdevListEntry udev_list_entry_get_next(Udev.UdevListEntry list_entry)

Gets the next entry in the enumeration.

Parameters
list_entry:Udev.UdevListEntry

the current list entry

Returns:Udev.UdevListEntry

On success, returns a pointer to the next list entry. If no such entry can be found, or on failure, NULL is returned.

udev_newback to summary
public Udev.UdevContext udev_new()

Allocates a new udev context object and returns a pointer to it. This object is opaque and must not be accessed by the caller via different means than functions provided by libudev. Initially, the reference count of the context is 1.

Returns:Udev.UdevContext

On success, returns a pointer to the allocated udev context. On failure, NULL is returned.

udev_refback to summary
public Udev.UdevContext udev_ref(Udev.UdevContext udev)

Acquire further references to a udev context object.

Parameters
udev:Udev.UdevContext

A udev context object.

Returns:Udev.UdevContext

the argument that was passed, unmodified.

udev_unrefback to summary
public Udev.UdevContext udev_unref(Udev.UdevContext udev)

Drop a reference to a udev context object. Once the reference count hits 0, the context object is destroyed and freed.

Parameters
udev:Udev.UdevContext

A udev context object.

Returns:Udev.UdevContext

always returns NULL.

com.sun.jna.platform.linux back to summary

public Class Udev.UdevContext

extends PointerType
Class Inheritance

All functions require a libudev context to operate. This context can be created via udev_new. It is used to track library state and link objects together. No global state is used by libudev, everything is always linked to a udev context. Furthermore, multiple different udev contexts can be used in parallel by multiple threads. However, a single context must not be accessed by multiple threads in parallel. The caller is responsible for providing suitable locking if they intend to use it from multiple threads.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Udev.UdevDevice

Returns:

the allocated udev device. On failure, NULL is returned, and errno is set appropriately.
deviceNewFromSyspath
(String
The path of the device in /sys.
syspath
)

Creates a udev device object based on information found in /sys, annotated with properties from the udev-internal device database.

public Udev.UdevEnumerate

Returns:

On success, returns the allocated enumerator. On failure, NULL is returned.
enumerateNew
()

Create a udev enumerate object.

public Udev.UdevContext

Returns:

this object, unmodified.
ref
()

Acquire a further reference to this object.

public void
unref()

Drop a reference to this object.

Inherited from com.sun.jna.PointerType:
equalsfromNativegetPointerhashCodenativeTypesetPointertoNativetoString

Constructor Detail

UdevContextback to summary
public UdevContext()

Method Detail

deviceNewFromSyspathback to summary
public Udev.UdevDevice deviceNewFromSyspath(String syspath)

Creates a udev device object based on information found in /sys, annotated with properties from the udev-internal device database. Initially, the reference count of the device is 1.

Parameters
syspath:String

The path of the device in /sys.

Returns:Udev.UdevDevice

the allocated udev device. On failure, NULL is returned, and errno is set appropriately.

enumerateNewback to summary
public Udev.UdevEnumerate enumerateNew()

Create a udev enumerate object. Initially, the reference count of the enumerate object is 1.

Returns:Udev.UdevEnumerate

On success, returns the allocated enumerator. On failure, NULL is returned.

refback to summary
public Udev.UdevContext ref()

Acquire a further reference to this object.

Returns:Udev.UdevContext

this object, unmodified.

unrefback to summary
public void unref()

Drop a reference to this object. Once the reference count hits 0, the context object is destroyed and freed.

com.sun.jna.platform.linux back to summary

public Class Udev.UdevDevice

extends PointerType
Class Inheritance

To introspect a local device on a system, a udev device object can be created via UdevContext#deviceNewFromSyspath(String) and friends. The device object allows one to query current state, read and write attributes and lookup properties of the device in question.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

a string that describes the devnode. On failure, may return NULL.
getDevnode
()

Gets the devnode of this device

public String

Returns:

a string that describes the devtype. On failure, may return NULL.
getDevtype
()

Gets the devtype of this device

public Udev.UdevDevice

Returns:

the parent device. No additional reference to this device is acquired, but the child device owns a reference to the parent device. On failure, NULL is returned.
getParent
()

Gets the parent of this device

public Udev.UdevDevice

Returns:

the parent device. No additional reference to this device is acquired, but the child device owns a reference to the parent device. On failure, NULL is returned.
getParentWithSubsystemDevtype
(String
The subsystem to match
subsystem
,
String
The device type to match
devtype
)

Gets the parent of this device matching a subsystem and devtype

public String

Returns:

a string of the requested value. On error, NULL is returned.
getPropertyValue
(String
The property to retrieve.
key
)

Retrieves a device property from this device

public String

Returns:

a string that describes the subsystem. On failure, may return NULL.
getSubsystem
()

Gets the subsystem of this device

public String

Returns:

a string of the requested value. On error, NULL is returned. Attributes that may contain NUL bytes should not be retrieved with udev_device_get_sysattr_value(); instead, read them directly from the files within the device's syspath.
getSysattrValue
(String
The attribute to retrieve.
sysattr
)

Retrieves a device attribute from this device

public String

Returns:

a string that describes the sysname. On failure, may return NULL.
getSysname
()

Gets the sysname of this device

public String

Returns:

a string that describes the syspath. On failure, may return NULL.
getSyspath
()

Gets the syspath of this device

public Udev.UdevDevice

Returns:

this object, unmodified.
ref
()

Acquire a further reference to this object.

public void
unref()

Drop a reference to this object.

Inherited from com.sun.jna.PointerType:
equalsfromNativegetPointerhashCodenativeTypesetPointertoNativetoString

Constructor Detail

UdevDeviceback to summary
public UdevDevice()

Method Detail

getDevnodeback to summary
public String getDevnode()

Gets the devnode of this device

Returns:String

a string that describes the devnode. On failure, may return NULL.

getDevtypeback to summary
public String getDevtype()

Gets the devtype of this device

Returns:String

a string that describes the devtype. On failure, may return NULL.

getParentback to summary
public Udev.UdevDevice getParent()

Gets the parent of this device

Returns:Udev.UdevDevice

the parent device. No additional reference to this device is acquired, but the child device owns a reference to the parent device. On failure, NULL is returned.

getParentWithSubsystemDevtypeback to summary
public Udev.UdevDevice getParentWithSubsystemDevtype(String subsystem, String devtype)

Gets the parent of this device matching a subsystem and devtype

Parameters
subsystem:String

The subsystem to match

devtype:String

The device type to match

Returns:Udev.UdevDevice

the parent device. No additional reference to this device is acquired, but the child device owns a reference to the parent device. On failure, NULL is returned.

getPropertyValueback to summary
public String getPropertyValue(String key)

Retrieves a device property from this device

Parameters
key:String

The property to retrieve.

Returns:String

a string of the requested value. On error, NULL is returned.

getSubsystemback to summary
public String getSubsystem()

Gets the subsystem of this device

Returns:String

a string that describes the subsystem. On failure, may return NULL.

getSysattrValueback to summary
public String getSysattrValue(String sysattr)

Retrieves a device attribute from this device

Parameters
sysattr:String

The attribute to retrieve.

Returns:String

a string of the requested value. On error, NULL is returned. Attributes that may contain NUL bytes should not be retrieved with udev_device_get_sysattr_value(); instead, read them directly from the files within the device's syspath.

getSysnameback to summary
public String getSysname()

Gets the sysname of this device

Returns:String

a string that describes the sysname. On failure, may return NULL.

getSyspathback to summary
public String getSyspath()

Gets the syspath of this device

Returns:String

a string that describes the syspath. On failure, may return NULL.

refback to summary
public Udev.UdevDevice ref()

Acquire a further reference to this object.

Returns:Udev.UdevDevice

this object, unmodified.

unrefback to summary
public void unref()

Drop a reference to this object. Once the reference count hits 0, the context object is destroyed and freed.

com.sun.jna.platform.linux back to summary

public Class Udev.UdevEnumerate

extends PointerType
Class Inheritance

To enumerate local devices on the system, an enumeration object can be created via UdevContext#enumerateNew().

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

an integer greater than, or equal to, 0 on success.
addMatchSubsystem
(String
The subsystem to match
subsystem
)

Modify filters of this object to match a subsystem.

public Udev.UdevListEntry

Returns:

On success, returns the first entry in the list of found devices. If the list is empty, or on failure, NULL is returned.
getListEntry
()

Get the first list entry from this object.

public Udev.UdevEnumerate

Returns:

this object, unmodified.
ref
()

Acquire a further reference to this object.

public int

Returns:

an integer greater than, or equal to, 0 on success.
scanDevices
()

Query this object.

public void
unref()

Drop a reference to this object.

Inherited from com.sun.jna.PointerType:
equalsfromNativegetPointerhashCodenativeTypesetPointertoNativetoString

Constructor Detail

UdevEnumerateback to summary
public UdevEnumerate()

Method Detail

addMatchSubsystemback to summary
public int addMatchSubsystem(String subsystem)

Modify filters of this object to match a subsystem.

Parameters
subsystem:String

The subsystem to match

Returns:int

an integer greater than, or equal to, 0 on success.

getListEntryback to summary
public Udev.UdevListEntry getListEntry()

Get the first list entry from this object.

Returns:Udev.UdevListEntry

On success, returns the first entry in the list of found devices. If the list is empty, or on failure, NULL is returned.

refback to summary
public Udev.UdevEnumerate ref()

Acquire a further reference to this object.

Returns:Udev.UdevEnumerate

this object, unmodified.

scanDevicesback to summary
public int scanDevices()

Query this object. Scans /sys for all devices which match the given filters. No filters will return all currently available devices.

Returns:int

an integer greater than, or equal to, 0 on success.

unrefback to summary
public void unref()

Drop a reference to this object. Once the reference count hits 0, the context object is destroyed and freed.

com.sun.jna.platform.linux back to summary

public Class Udev.UdevListEntry

extends PointerType
Class Inheritance

Whenever libudev returns a list of objects, the udev_list_entry API should be used to iterate, access and modify those lists.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

A string representing the syspath. On failure, NULL is returned.
getName
()

Get the name of this entry, which is the path of the device in /sys.

public Udev.UdevListEntry

Returns:

On success, returns the next list entry. If no such entry can be found, or on failure, NULL is returned.
getNext
()

Gets the next entry in the enumeration.

Inherited from com.sun.jna.PointerType:
equalsfromNativegetPointerhashCodenativeTypesetPointertoNativetoString

Constructor Detail

UdevListEntryback to summary
public UdevListEntry()

Method Detail

getNameback to summary
public String getName()

Get the name of this entry, which is the path of the device in /sys.

Returns:String

A string representing the syspath. On failure, NULL is returned.

getNextback to summary
public Udev.UdevListEntry getNext()

Gets the next entry in the enumeration.

Returns:Udev.UdevListEntry

On success, returns the next list entry. If no such entry can be found, or on failure, NULL is returned.