Class DBusInterfaceInfo
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate 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 TypeMethodDescriptionvoidBuilds 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().voidDecrements 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.voidgenerateXml(int indent, String stringBuilder) Appends an XML representation of this DBusInterfaceInfo (and its children) tostringBuilder.static MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the DBusInterfaceInfo class@Nullable DBusMethodInfolookupMethod(String name) Looks up information about a method.@Nullable DBusPropertyInfolookupProperty(String name) Looks up information about a property.@Nullable DBusSignalInfolookupSignal(String name) Looks up information about a signal.@Nullable DBusAnnotationInfo @Nullable []Read the value of the fieldannotations.@Nullable DBusMethodInfo @Nullable []Read the value of the fieldmethods.readName()Read the value of the fieldname.@Nullable DBusPropertyInfo @Nullable []Read the value of the fieldproperties.intRead the value of the fieldref_count.@Nullable DBusSignalInfo @Nullable []Read the value of the fieldsignals.ref()If this DBusInterfaceInfo is statically allocated does nothing.voidunref()If this DBusInterfaceInfo is statically allocated, does nothing.voidwriteAnnotations(@Nullable DBusAnnotationInfo @Nullable [] annotations, Arena _arena) Write a value in the fieldannotations.voidwriteMethods(@Nullable DBusMethodInfo @Nullable [] methods, Arena _arena) Write a value in the fieldmethods.voidWrite a value in the fieldname.voidwriteProperties(@Nullable DBusPropertyInfo @Nullable [] properties, Arena _arena) Write a value in the fieldproperties.voidwriteRefCount(int refCount) Write a value in the fieldref_count.voidwriteSignals(@Nullable DBusSignalInfo @Nullable [] signals, Arena _arena) Write a value in the fieldsignals.Methods inherited from class org.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 fieldrefCountname- value for the fieldnamemethods- value for the fieldmethodssignals- value for the fieldsignalsproperties- value for the fieldpropertiesannotations- value for the fieldannotationsarena- 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 fieldrefCountname- value for the fieldnamemethods- value for the fieldmethodssignals- value for the fieldsignalsproperties- value for the fieldpropertiesannotations- value for the fieldannotations
-
-
Method Details
-
getType
Get the GType of the DBusInterfaceInfo class- Returns:
- the GType
-
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
info,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.
- Since:
- 2.30
-
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.- Since:
- 2.30
-
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.Introspectmethod.- Parameters:
indent- Indentation level.stringBuilder- AGStringto to append XML data to.- Since:
- 2.26
-
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
info.- Parameters:
name- A D-Bus method name (typically in CamelCase)- Returns:
- A
GDBusMethodInfoornullif not found. Do not free, it is owned byinfo. - Since:
- 2.26
-
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
info.- Parameters:
name- A D-Bus property name (typically in CamelCase).- Returns:
- A
GDBusPropertyInfoornullif not found. Do not free, it is owned byinfo. - Since:
- 2.26
-
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
info.- Parameters:
name- A D-Bus signal name (typically in CamelCase)- Returns:
- A
GDBusSignalInfoornullif not found. Do not free, it is owned byinfo. - Since:
- 2.26
-
ref
If this DBusInterfaceInfo is statically allocated does nothing. Otherwise increases the reference count.- Returns:
- The same
info. - Since:
- 2.26
-
unref
public void unref()If this DBusInterfaceInfo is statically allocated, does nothing. Otherwise decreases the reference count ofinfo.When its reference count drops to 0, the memory used is freed.- Since:
- 2.26
-