Class MessageHeadersIter

java.lang.Object
org.javagi.base.ProxyInstance
org.gnome.soup.MessageHeadersIter
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class MessageHeadersIter extends ProxyInstance

An opaque type used to iterate over a MessageHeaders structure

After intializing the iterator with init(MessageHeadersIter, MessageHeaders), call next(MessageHeadersIter, Out, Out) to fetch data from it.

You may not modify the headers while iterating over them.

  • Constructor Details

    • MessageHeadersIter

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

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

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

      public MessageHeadersIter(MemorySegment[] dummy, Arena arena)
      Allocate a new MessageHeadersIter with the fields set to the provided values.
      Parameters:
      dummy - value for the field dummy
      arena - to control the memory allocation scope
    • MessageHeadersIter

      public MessageHeadersIter(MemorySegment[] dummy)
      Allocate a new MessageHeadersIter with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      dummy - value for the field dummy
  • Method Details

    • getMemoryLayout

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

      public @Nullable MemorySegment @Nullable [] readDummy()
      Read the value of the field dummy.
      Returns:
      The value of the field dummy
    • writeDummy

      public void writeDummy(@Nullable MemorySegment @Nullable [] dummy, Arena _arena)
      Write a value in the field dummy.
      Parameters:
      dummy - The new value for the field dummy
    • init

      public static void init(MessageHeadersIter iter, MessageHeaders hdrs)
      Initializes iter for iterating hdrs.
      Parameters:
      iter - a pointer to a SoupMessageHeadersIter structure
      hdrs - a SoupMessageHeaders
    • next

      public static boolean next(MessageHeadersIter iter, Out<String> name, Out<String> value)

      Yields the next name/value pair in the MessageHeaders being iterated by iter.

      If iter has already yielded the last header, then next(MessageHeadersIter, Out, Out) will return false and name and value will be unchanged.

      Parameters:
      iter - a SoupMessageHeadersIter
      name - pointer to a variable to return the header name in
      value - pointer to a variable to return the header value in
      Returns:
      true if another name and value were returned, false if the end of the headers has been reached.