Class DBusInterfaceInfo
-
Constructor Summary
ConstructorDescriptionAllocate a new DBusInterfaceInfo.DBusInterfaceInfo
(int refCount, String name, DBusMethodInfo[] methods, DBusSignalInfo[] signals, DBusPropertyInfo[] properties, DBusAnnotationInfo[] annotations) Allocate a new DBusInterfaceInfo with the fields set to the provided values.DBusInterfaceInfo
(int refCount, String name, DBusMethodInfo[] methods, DBusSignalInfo[] signals, DBusPropertyInfo[] properties, DBusAnnotationInfo[] annotations, Arena arena) Allocate a new DBusInterfaceInfo with the fields set to the provided values.DBusInterfaceInfo
(Arena arena) Allocate a new DBusInterfaceInfo.DBusInterfaceInfo
(MemorySegment address) Create a DBusInterfaceInfo proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Builds a lookup-cache to speed up g_dbus_interface_info_lookup_method(), g_dbus_interface_info_lookup_signal() and g_dbus_interface_info_lookup_property().void
Decrements the usage count for the cache for this DBusInterfaceInfo built by g_dbus_interface_info_cache_build() (if any) and frees the resources used by the cache if the usage count drops to zero.void
generateXml
(int indent, GString stringBuilder) Appends an XML representation of this DBusInterfaceInfo (and its children) tostringBuilder
.static MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the DBusInterfaceInfo classlookupMethod
(String name) Looks up information about a method.lookupProperty
(String name) Looks up information about a property.lookupSignal
(String name) Looks up information about a signal.Read the value of the fieldannotations
.Read the value of the fieldmethods
.readName()
Read the value of the fieldname
.Read the value of the fieldproperties
.int
Read the value of the fieldref_count
.Read the value of the fieldsignals
.ref()
If this DBusInterfaceInfo is statically allocated does nothing.void
unref()
If this DBusInterfaceInfo is statically allocated, does nothing.void
writeAnnotations
(DBusAnnotationInfo[] annotations, Arena _arena) Write a value in the fieldannotations
.void
writeMethods
(DBusMethodInfo[] methods, Arena _arena) Write a value in the fieldmethods
.void
Write a value in the fieldname
.void
writeProperties
(DBusPropertyInfo[] properties, Arena _arena) Write a value in the fieldproperties
.void
writeRefCount
(int refCount) Write a value in the fieldref_count
.void
writeSignals
(DBusSignalInfo[] signals, Arena _arena) Write a value in the fieldsignals
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
DBusInterfaceInfo
Create a DBusInterfaceInfo proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
DBusInterfaceInfo
Allocate a new DBusInterfaceInfo.- Parameters:
arena
- to control the memory allocation scope
-
DBusInterfaceInfo
public DBusInterfaceInfo()Allocate a new DBusInterfaceInfo. The memory is allocated withArena.ofAuto()
. -
DBusInterfaceInfo
public DBusInterfaceInfo(int refCount, String name, DBusMethodInfo[] methods, DBusSignalInfo[] signals, DBusPropertyInfo[] properties, DBusAnnotationInfo[] annotations, Arena arena) Allocate a new DBusInterfaceInfo with the fields set to the provided values.- Parameters:
refCount
- value for the fieldrefCount
name
- value for the fieldname
methods
- value for the fieldmethods
signals
- value for the fieldsignals
properties
- value for the fieldproperties
annotations
- value for the fieldannotations
arena
- to control the memory allocation scope
-
DBusInterfaceInfo
public DBusInterfaceInfo(int refCount, String name, DBusMethodInfo[] methods, DBusSignalInfo[] signals, DBusPropertyInfo[] properties, DBusAnnotationInfo[] annotations) Allocate a new DBusInterfaceInfo with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
refCount
- value for the fieldrefCount
name
- value for the fieldname
methods
- value for the fieldmethods
signals
- value for the fieldsignals
properties
- value for the fieldproperties
annotations
- value for the fieldannotations
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readRefCount
public int readRefCount()Read the value of the fieldref_count
.- Returns:
- The value of the field
ref_count
-
writeRefCount
public void writeRefCount(int refCount) Write a value in the fieldref_count
.- Parameters:
refCount
- The new value for the fieldref_count
-
readName
-
writeName
-
readMethods
Read the value of the fieldmethods
.- Returns:
- The value of the field
methods
-
writeMethods
Write a value in the fieldmethods
.- Parameters:
methods
- The new value for the fieldmethods
_arena
- to control the memory allocation scope
-
readSignals
Read the value of the fieldsignals
.- Returns:
- The value of the field
signals
-
writeSignals
Write a value in the fieldsignals
.- Parameters:
signals
- The new value for the fieldsignals
_arena
- to control the memory allocation scope
-
readProperties
Read the value of the fieldproperties
.- Returns:
- The value of the field
properties
-
writeProperties
Write a value in the fieldproperties
.- Parameters:
properties
- The new value for the fieldproperties
_arena
- to control the memory allocation scope
-
readAnnotations
Read the value of the fieldannotations
.- Returns:
- The value of the field
annotations
-
writeAnnotations
Write a value in the fieldannotations
.- Parameters:
annotations
- The new value for the fieldannotations
_arena
- to control the memory allocation scope
-
cacheBuild
public void cacheBuild()Builds a lookup-cache to speed up g_dbus_interface_info_lookup_method(), g_dbus_interface_info_lookup_signal() and g_dbus_interface_info_lookup_property().If this has already been called with this DBusInterfaceInfo, the existing cache is used and its use count is increased.
Note that this DBusInterfaceInfo cannot be modified until g_dbus_interface_info_cache_release() is called.
-
cacheRelease
public void cacheRelease()Decrements the usage count for the cache for this DBusInterfaceInfo built by g_dbus_interface_info_cache_build() (if any) and frees the resources used by the cache if the usage count drops to zero. -
generateXml
Appends an XML representation of this DBusInterfaceInfo (and its children) tostringBuilder
.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
- AGString
to to append XML data to.
-
lookupMethod
Looks up information about a method.The cost of this function is O(n) in number of methods unless g_dbus_interface_info_cache_build() has been used on this DBusInterfaceInfo.
- Parameters:
name
- A D-Bus method name (typically in CamelCase)- Returns:
- A
GDBusMethodInfo
ornull
if not found. Do not free, it is owned by this DBusInterfaceInfo.
-
lookupProperty
Looks up information about a property.The cost of this function is O(n) in number of properties unless g_dbus_interface_info_cache_build() has been used on this DBusInterfaceInfo.
- Parameters:
name
- A D-Bus property name (typically in CamelCase).- Returns:
- A
GDBusPropertyInfo
ornull
if not found. Do not free, it is owned by this DBusInterfaceInfo.
-
lookupSignal
Looks up information about a signal.The cost of this function is O(n) in number of signals unless g_dbus_interface_info_cache_build() has been used on this DBusInterfaceInfo.
- Parameters:
name
- A D-Bus signal name (typically in CamelCase)- Returns:
- A
GDBusSignalInfo
ornull
if not found. Do not free, it is owned by this DBusInterfaceInfo.
-
ref
If this DBusInterfaceInfo is statically allocated does nothing. Otherwise increases the reference count.- Returns:
- The same this DBusInterfaceInfo.
-
unref
public void unref()If this DBusInterfaceInfo is statically allocated, does nothing. Otherwise decreases the reference count of this DBusInterfaceInfo. When its reference count drops to 0, the memory used is freed.
-