Class CookieJarDB

All Implemented Interfaces:
SessionFeature, Proxy

@Generated("org.javagi.JavaGI") public final class CookieJarDB extends CookieJar implements SessionFeature

Database-based Cookie Jar.

CookieJarDB is a CookieJar that reads cookies from and writes them to a sqlite database in the new Mozilla format.

(This is identical to SoupCookieJarSqlite in libsoup-gnome; it has just been moved into libsoup proper, and renamed to avoid conflicting.)

  • Constructor Details

    • CookieJarDB

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

      public CookieJarDB(String filename, boolean readOnly)

      Creates a CookieJarDB.

      filename will be read in at startup to create an initial set of cookies. If readOnly is false, then the non-session cookies will be written to filename when the CookieJar::changed signal is emitted from the jar. (If readOnly is true, then the cookie jar will only be used for this session, and changes made to it will be lost when the jar is destroyed.)

      Parameters:
      filename - the filename to read to/write from, or null
      readOnly - true if filename is read-only
    • CookieJarDB

      public CookieJarDB()
      Create a new CookieJarDB.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the CookieJarDB class.
      Returns:
      the GType
    • getMemoryLayout

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

      protected CookieJarDB asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class CookieJar
      Returns:
      the instance as if it were its parent type
    • builder

      public static CookieJarDB.Builder<? extends CookieJarDB.Builder> builder()
      A CookieJarDB.Builder object constructs a CookieJarDB with the specified properties. Use the various set...() methods to set properties, and finish construction with CookieJarDB.Builder.build().
      Returns:
      the builder object