Enum Class CookieJarAcceptPolicy

java.lang.Object
java.lang.Enum<CookieJarAcceptPolicy>
org.gnome.soup.CookieJarAcceptPolicy
All Implemented Interfaces:
Serializable, Comparable<CookieJarAcceptPolicy>, Constable, Enumeration

@Generated("org.javagi.JavaGI") public enum CookieJarAcceptPolicy extends Enum<CookieJarAcceptPolicy> implements Enumeration
The policy for accepting or rejecting cookies returned in responses.
  • Enum Constant Details

    • ALWAYS

      public static final CookieJarAcceptPolicy ALWAYS
      accept all cookies unconditionally.
    • NEVER

      public static final CookieJarAcceptPolicy NEVER
      reject all cookies unconditionally.
    • NO_THIRD_PARTY

      public static final CookieJarAcceptPolicy NO_THIRD_PARTY
      accept all cookies set by the main document loaded in the application using libsoup. An example of the most common case, web browsers, would be: If http://www.example.com is the page loaded, accept all cookies set by example.com, but if a resource from http://www.third-party.com is loaded from that page reject any cookie that it could try to set. For libsoup to be able to tell apart first party cookies from the rest, the application must call Message.setFirstParty(Uri) on each outgoing Message, setting the GLib.Uri of the main document. If no first party is set in a message when this policy is in effect, cookies will be assumed to be third party by default.
    • GRANDFATHERED_THIRD_PARTY

      public static final CookieJarAcceptPolicy GRANDFATHERED_THIRD_PARTY
      accept all cookies set by the main document loaded in the application using libsoup, and from domains that have previously set at least one cookie when loaded as the main document. An example of the most common case, web browsers, would be: if http://www.example.com is the page loaded, accept all cookies set by example.com, but if a resource from http://www.third-party.com is loaded from that page, reject any cookie that it could try to set unless it already has a cookie in the cookie jar. For libsoup to be able to tell apart first party cookies from the rest, the application must call Message.setFirstParty(Uri) on each outgoing Message, setting the GLib.Uri of the main document. If no first party is set in a message when this policy is in effect, cookies will be assumed to be third party by default.
  • Method Details

    • values

      public static CookieJarAcceptPolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CookieJarAcceptPolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • of

      public static CookieJarAcceptPolicy of(int value)
      Create a new CookieJarAcceptPolicy for the provided value
      Parameters:
      value - the enum value
      Returns:
      the enum for the provided value
    • getValue

      public int getValue()
      Get the numeric value of this enum
      Specified by:
      getValue in interface Enumeration
      Returns:
      the enum value
    • of

      public static CookieJarAcceptPolicy of(MemorySegment address)
      Create a new CookieJarAcceptPolicy for the value in the provided memory address.
      Parameters:
      address - the memory address holding a enum value
      Returns:
      the enum for the value in the provided memory address
    • getType

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