Package org.gnome.soup
Enum Class CookieJarAcceptPolicy
- All Implemented Interfaces:
Enumeration
,Serializable
,Comparable<CookieJarAcceptPolicy>
,Constable
@Generated("io.github.jwharm.JavaGI")
public enum CookieJarAcceptPolicy
extends Enum<CookieJarAcceptPolicy>
implements Enumeration
The policy for accepting or rejecting cookies returned in
responses.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionaccept all cookies unconditionally.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.reject all cookies unconditionally.accept all cookies set by the main document loaded in the application using libsoup. -
Method Summary
Modifier and TypeMethodDescriptionstatic Type
getType()
Get the GType of the CookieJarAcceptPolicy classint
getValue()
Get the numeric value of this enumstatic CookieJarAcceptPolicy
of
(int value) Create a new CookieJarAcceptPolicy for the provided valuestatic CookieJarAcceptPolicy
Returns the enum constant of this class with the specified name.static CookieJarAcceptPolicy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALWAYS
accept all cookies unconditionally. -
NEVER
reject all cookies unconditionally. -
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 callMessage.setFirstParty(org.gnome.glib.Uri)
on each outgoingMessage
, setting theGLib.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
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 callMessage.setFirstParty(org.gnome.glib.Uri)
on each outgoingSoupMessage
, setting theGLib.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
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
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 nameNullPointerException
- if the argument is null
-
of
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 interfaceEnumeration
- Returns:
- the enum value
-
getType
-