12 #ifndef __NET_NETWORKCOOKIE_H__
13 #define __NET_NETWORKCOOKIE_H__
60 bool hasMatchingDomain(
const UT_Url &url)
const;
62 bool hasMatchingPath(
const UT_Url &url)
const;
66 return myName == cookie.myName && myDomain == cookie.myDomain
67 && myPath == cookie.myPath;
71 bool hasExpired()
const;
89 int maxAge()
const {
return myMaxAge; }
98 myHasExpires = !myExpirationDate.isNull();
99 setPersistent(myHasExpires);
105 myHasExpires = result && !myExpirationDate.isNull();
106 setPersistent(myHasExpires);
112 void setSecure(
bool is_secure) { myIsSecure = is_secure; }
135 SameSite mySameSite = SAME_SITE_NONE;
144 return myName == cookie.myName && myDomain == cookie.myDomain &&
145 myExpirationDate == cookie.myExpirationDate &&
146 myPath == cookie.myPath && myValue == cookie.myValue &&
147 myHttpOnly == cookie.myHttpOnly && myIsSecure == cookie.myIsSecure &&
148 myIsPersistent == cookie.myIsPersistent &&
149 myHasExpires == cookie.myHasExpires && myMaxAge == cookie.myMaxAge &&
150 mySameSite == cookie.mySameSite;
156 return !(*
this == cookie);
163 if (!cookie.isValid())
166 writer.jsonValue(cookie.toString());
174 if (!
data.import(str_cookie))
177 return cookie.parseCookie(str_cookie);
180 #endif // __NET_NETWORKCOOKIE_H__
bool setExpiration(const UT_StringRef &date)
void setHttpOnly(bool http_only)
void setDomain(const UT_StringHolder &domain)
void setSecure(bool is_secure)
void setValue(const UT_StringHolder &value)
GLsizei const GLfloat * value
const NET_Time & creation() const
GLsizei const GLchar *const * path
void setCreation(const NET_Time &t)
Class which writes ASCII or binary JSON streams.
**But if you need a result
const UT_StringHolder & name() const
bool isPersistent() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool operator!=(const NET_NetworkCookie &cookie) const
const UT_StringHolder & domain() const
void setPersistent(bool is_persistent)
void setPath(const UT_StringHolder &path)
const NET_Time & expiration() const
void setMaxAge(int max_age)
const UT_StringHolder & path() const
const UT_StringHolder & value() const
SameSite sameSite() const
GLuint const GLchar * name
bool NETserialize< NET_NetworkCookie >(UT_JSONWriter &writer, const NET_NetworkCookie &cookie)
void setSameSite(SameSite same_site)
bool isEquivalent(const NET_NetworkCookie &cookie) const
void setName(const UT_StringHolder &name)
const NET_Time & lastAccess() const
void setLastAccess(const NET_Time &t)
LeafData & operator=(const LeafData &)=delete
void setExpiration(const NET_Time &t)
Class to store JSON objects as C++ objects.
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool operator==(const NET_NetworkCookie &cookie) const
static bool fromUTCString(const UT_StringRef &time_string, NET_Time &time)
constexpr T normalize(UT_FixedVector< T, D > &a) noexcept