Package org.gnome.gio
Class DBusAnnotationInfo
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.gio.DBusAnnotationInfo
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new DBusAnnotationInfo.DBusAnnotationInfo(int refCount, String key, String value, DBusAnnotationInfo[] annotations) Allocate a new DBusAnnotationInfo with the fields set to the provided values.DBusAnnotationInfo(int refCount, String key, String value, DBusAnnotationInfo[] annotations, Arena arena) Allocate a new DBusAnnotationInfo with the fields set to the provided values.DBusAnnotationInfo(Arena arena) Allocate a new DBusAnnotationInfo.DBusAnnotationInfo(MemorySegment address) Create a DBusAnnotationInfo proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the DBusAnnotationInfo classstatic @Nullable Stringlookup(@Nullable DBusAnnotationInfo @Nullable [] annotations, String name) Looks up the value of an annotation.@Nullable DBusAnnotationInfo @Nullable []Read the value of the fieldannotations.readKey()Read the value of the fieldkey.intRead the value of the fieldref_count.Read the value of the fieldvalue.ref()If this DBusAnnotationInfo is statically allocated does nothing.voidunref()If this DBusAnnotationInfo is statically allocated, does nothing.voidwriteAnnotations(@Nullable DBusAnnotationInfo @Nullable [] annotations, Arena _arena) Write a value in the fieldannotations.voidWrite a value in the fieldkey.voidwriteRefCount(int refCount) Write a value in the fieldref_count.voidwriteValue(String value, Arena _arena) Write a value in the fieldvalue.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
DBusAnnotationInfo
Create a DBusAnnotationInfo proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
DBusAnnotationInfo
Allocate a new DBusAnnotationInfo.- Parameters:
arena- to control the memory allocation scope
-
DBusAnnotationInfo
public DBusAnnotationInfo()Allocate a new DBusAnnotationInfo. The memory is allocated withArena.ofAuto(). -
DBusAnnotationInfo
public DBusAnnotationInfo(int refCount, String key, String value, DBusAnnotationInfo[] annotations, Arena arena) Allocate a new DBusAnnotationInfo with the fields set to the provided values.- Parameters:
refCount- value for the fieldrefCountkey- value for the fieldkeyvalue- value for the fieldvalueannotations- value for the fieldannotationsarena- to control the memory allocation scope
-
DBusAnnotationInfo
Allocate a new DBusAnnotationInfo with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
refCount- value for the fieldrefCountkey- value for the fieldkeyvalue- value for the fieldvalueannotations- value for the fieldannotations
-
-
Method Details
-
getType
Get the GType of the DBusAnnotationInfo 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
-
readKey
-
writeKey
-
readValue
-
writeValue
-
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
-
lookup
public static @Nullable String lookup(@Nullable DBusAnnotationInfo @Nullable [] annotations, String name) Looks up the value of an annotation.The cost of this function is O(n) in number of annotations.
- Parameters:
annotations- Anull-terminated array of annotations ornull.name- The name of the annotation to look up.- Returns:
- The value or
nullif not found. Do not free, it is owned byannotations. - Since:
- 2.26
-
ref
If this DBusAnnotationInfo is statically allocated does nothing. Otherwise increases the reference count.- Returns:
- The same
info. - Since:
- 2.26
-
unref
public void unref()If this DBusAnnotationInfo 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
-