Package com.sun.jna.platform.linux
Class Udev.UdevContext
java.lang.Object
com.sun.jna.PointerType
com.sun.jna.platform.linux.Udev.UdevContext
- All Implemented Interfaces:
- NativeMapped
- Enclosing interface:
- Udev
All functions require a libudev context to operate. This context can be
 created via 
Udev.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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondeviceNewFromSyspath(String syspath) Creates a udev device object based on information found in/sys, annotated with properties from the udev-internal device database.Create a udev enumerate object.ref()Acquire a further reference to this object.voidunref()Drop a reference to this object.Methods inherited from class com.sun.jna.PointerTypeequals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
- 
Constructor Details- 
UdevContextpublic UdevContext()
 
- 
- 
Method Details- 
refAcquire a further reference to this object.- Returns:
- this object, unmodified.
 
- 
unrefpublic void unref()Drop a reference to this object. Once the reference count hits 0, the context object is destroyed and freed.
- 
enumerateNewCreate a udev enumerate object. Initially, the reference count of the enumerate object is 1.- Returns:
- On success, returns the allocated enumerator. On failure, NULL is returned.
 
- 
deviceNewFromSyspathCreates 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- The path of the device in- /sys.
- Returns:
- the allocated udev device. On failure, NULL is returned, and
         errnois set appropriately.
 
 
-