Package org.gnome.soup
Class MessageHeadersIter
java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.soup.MessageHeadersIter
- All Implemented Interfaces:
Proxy
An opaque type used to iterate over a
SoupMessageHeaders
structure.
After intializing the iterator with init(org.gnome.soup.MessageHeadersIter, org.gnome.soup.MessageHeaders), call
next(org.gnome.soup.MessageHeadersIter, org.javagi.base.Out<java.lang.String>, org.javagi.base.Out<java.lang.String>) to fetch data from it.
You may not modify the headers while iterating over them.
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a new MessageHeadersIter.MessageHeadersIter(Arena arena) Allocate a new MessageHeadersIter.MessageHeadersIter(MemorySegment address) Create a MessageHeadersIter proxy instance for the provided memory address.MessageHeadersIter(MemorySegment[] dummy) Allocate a new MessageHeadersIter with the fields set to the provided values.MessageHeadersIter(MemorySegment[] dummy, Arena arena) Allocate a new MessageHeadersIter with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.static voidinit(MessageHeadersIter iter, MessageHeaders hdrs) Initializesiterfor iteratinghdrs.static booleanYields the next name/value pair in theMessageHeadersbeing iterated byiter.@Nullable MemorySegment @Nullable []Read the value of the fielddummy.voidwriteDummy(@Nullable MemorySegment @Nullable [] dummy, Arena _arena) Write a value in the fielddummy.Methods inherited from class org.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
MessageHeadersIter
Create a MessageHeadersIter proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
MessageHeadersIter
Allocate a new MessageHeadersIter.- Parameters:
arena- to control the memory allocation scope
-
MessageHeadersIter
public MessageHeadersIter()Allocate a new MessageHeadersIter. The memory is allocated withArena.ofAuto(). -
MessageHeadersIter
Allocate a new MessageHeadersIter with the fields set to the provided values.- Parameters:
dummy- value for the fielddummyarena- to control the memory allocation scope
-
MessageHeadersIter
Allocate a new MessageHeadersIter with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
dummy- value for the fielddummy
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readDummy
Read the value of the fielddummy.- Returns:
- The value of the field
dummy
-
writeDummy
Write a value in the fielddummy.- Parameters:
dummy- The new value for the fielddummy
-
init
Initializesiterfor iteratinghdrs.- Parameters:
iter- a pointer to aSoupMessageHeadersIterstructurehdrs- aSoupMessageHeaders
-
next
Yields the next name/value pair in theMessageHeadersbeing iterated byiter.If
iterhas already yielded the last header, thennext(org.gnome.soup.MessageHeadersIter, org.javagi.base.Out<java.lang.String>, org.javagi.base.Out<java.lang.String>)will returnfalseandnameandvaluewill be unchanged.- Parameters:
iter- aSoupMessageHeadersItername- pointer to a variable to return the header name invalue- pointer to a variable to return the header value in- Returns:
trueif another name and value were returned,falseif the end of the headers has been reached.
-