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
 
 public static class Udev.UdevContext extends PointerType All functions require a libudev context to operate. This context can be created viaUdev.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 Constructor Description UdevContext()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Udev.UdevDevicedeviceNewFromSyspath(java.lang.String syspath)Creates a udev device object based on information found in/sys, annotated with properties from the udev-internal device database.Udev.UdevEnumerateenumerateNew()Create a udev enumerate object.Udev.UdevContextref()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
 
- 
 
- 
- 
- 
Method Detail- 
refpublic Udev.UdevContext ref() Acquire 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.
 - 
enumerateNewpublic Udev.UdevEnumerate enumerateNew() Create 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.
 
 - 
deviceNewFromSyspathpublic Udev.UdevDevice deviceNewFromSyspath(java.lang.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- The path of the device in- /sys.
- Returns:
- the allocated udev device. On failure, NULL is returned, and
         errnois set appropriately.
 
 
- 
 
-