Class DBusNodeInfo

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class DBusNodeInfo extends ProxyInstance
Information about nodes in a remote object hierarchy.
Since:
2.26
  • Constructor Details

    • DBusNodeInfo

      public DBusNodeInfo(MemorySegment address)
      Create a DBusNodeInfo proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • DBusNodeInfo

      public DBusNodeInfo(Arena arena)
      Allocate a new DBusNodeInfo.
      Parameters:
      arena - to control the memory allocation scope
    • DBusNodeInfo

      public DBusNodeInfo()
      Allocate a new DBusNodeInfo. The memory is allocated with Arena.ofAuto().
    • DBusNodeInfo

      public DBusNodeInfo(int refCount, String path, DBusInterfaceInfo[] interfaces, DBusNodeInfo[] nodes, DBusAnnotationInfo[] annotations, Arena arena)
      Allocate a new DBusNodeInfo with the fields set to the provided values.
      Parameters:
      refCount - value for the field refCount
      path - value for the field path
      interfaces - value for the field interfaces
      nodes - value for the field nodes
      annotations - value for the field annotations
      arena - to control the memory allocation scope
    • DBusNodeInfo

      public DBusNodeInfo(int refCount, String path, DBusInterfaceInfo[] interfaces, DBusNodeInfo[] nodes, DBusAnnotationInfo[] annotations)
      Allocate a new DBusNodeInfo with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      refCount - value for the field refCount
      path - value for the field path
      interfaces - value for the field interfaces
      nodes - value for the field nodes
      annotations - value for the field annotations
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the DBusNodeInfo class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readRefCount

      public int readRefCount()
      Read the value of the field ref_count.
      Returns:
      The value of the field ref_count
    • writeRefCount

      public void writeRefCount(int refCount)
      Write a value in the field ref_count.
      Parameters:
      refCount - The new value for the field ref_count
    • readPath

      public String readPath()
      Read the value of the field path.
      Returns:
      The value of the field path
    • writePath

      public void writePath(String path, Arena _arena)
      Write a value in the field path.
      Parameters:
      path - The new value for the field path
      _arena - to control the memory allocation scope
    • readInterfaces

      public @Nullable DBusInterfaceInfo @Nullable [] readInterfaces()
      Read the value of the field interfaces.
      Returns:
      The value of the field interfaces
    • writeInterfaces

      public void writeInterfaces(@Nullable DBusInterfaceInfo @Nullable [] interfaces, Arena _arena)
      Write a value in the field interfaces.
      Parameters:
      interfaces - The new value for the field interfaces
      _arena - to control the memory allocation scope
    • readNodes

      public @Nullable DBusNodeInfo @Nullable [] readNodes()
      Read the value of the field nodes.
      Returns:
      The value of the field nodes
    • writeNodes

      public void writeNodes(@Nullable DBusNodeInfo @Nullable [] nodes, Arena _arena)
      Write a value in the field nodes.
      Parameters:
      nodes - The new value for the field nodes
      _arena - to control the memory allocation scope
    • readAnnotations

      public @Nullable DBusAnnotationInfo @Nullable [] readAnnotations()
      Read the value of the field annotations.
      Returns:
      The value of the field annotations
    • writeAnnotations

      public void writeAnnotations(@Nullable DBusAnnotationInfo @Nullable [] annotations, Arena _arena)
      Write a value in the field annotations.
      Parameters:
      annotations - The new value for the field annotations
      _arena - to control the memory allocation scope
    • forXml

      public static DBusNodeInfo forXml(String xmlData) throws GErrorException

      Parses xmlData and returns a GDBusNodeInfo representing the data.

      The introspection XML must contain exactly one top-level <node> element.

      Note that this routine is using a GMarkup-based parser that only accepts a subset of valid XML documents.

      Parameters:
      xmlData - Valid D-Bus introspection XML.
      Returns:
      A GDBusNodeInfo structure or null if error is set. Free with g_dbus_node_info_unref().
      Throws:
      GErrorException - see GError
      Since:
      2.26
    • generateXml

      public void generateXml(int indent, String stringBuilder)

      Appends an XML representation of this DBusNodeInfo (and its children) to stringBuilder.

      This function is typically used for generating introspection XML documents at run-time for handling the org.freedesktop.DBus.Introspectable.Introspect method.

      Parameters:
      indent - Indentation level.
      stringBuilder - A GString to to append XML data to.
      Since:
      2.26
    • lookupInterface

      public @Nullable DBusInterfaceInfo lookupInterface(String name)

      Looks up information about an interface.

      The cost of this function is O(n) in number of interfaces.

      Parameters:
      name - A D-Bus interface name.
      Returns:
      A GDBusInterfaceInfo or null if not found. Do not free, it is owned by info.
      Since:
      2.26
    • ref

      public DBusNodeInfo ref()
      If this DBusNodeInfo is statically allocated does nothing. Otherwise increases the reference count.
      Returns:
      The same info.
      Since:
      2.26
    • unref

      public void unref()
      If this DBusNodeInfo is statically allocated, does nothing. Otherwise decreases the reference count of info. When its reference count drops to 0, the memory used is freed.
      Since:
      2.26