KIOSlave
kcookiejar.cpp
Go to the documentation of this file.
63 #define IP_ADDRESS_EXPRESSION "(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
105 "%:B%t%d%t%H:%M:%S%t%Y%t%Z", /* ANSI C's asctime() format (#145244): Jan 01 00:00:00 1970 GMT */
106 "%:B%t%d%t%Y%t%H:%M:%S%t%Z", /* A variation on the above format seen @ amazon.com: Jan 01 1970 00:00:00 GMT */
315 static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie& cookiePtr, bool nameMatchOnly=false, bool updateWindowId=false)
350 QString KCookieJar::findCookies(const QString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies)
1320 cookie.name().isEmpty() ? cookie.value().toLatin1().constData() : cookie.name().toLatin1().constData(),
1534 m_preferredPolicy = static_cast<KCookieDefaultPolicy>(dlgGroup.readEntry("PreferredPolicy", 0));
1541 m_globalAdvice = strToAdvice(policyGroup.readEntry("CookieGlobalAdvice", QString(QL1S("Accept"))));
1548 for (QStringList::ConstIterator it = domainSettings.constBegin(), itEnd = domainSettings.constEnd();
KHttpCookieList * getCookieList(const QString &_domain, const QString &_fqdn)
Get a list of all cookies in the cookie jar originating from _domain.
Definition: kcookiejar.cpp:1144
KHttpCookieList makeDOMCookies(const QString &_url, const QByteArray &cookie_domstr, long windowId)
This function parses cookie_headers and returns a linked list of valid KHttpCookie objects for all co...
Definition: kcookiejar.cpp:863
bool match(const QString &fqdn, const QStringList &domainList, const QString &path, int port=-1) const
Definition: kcookiejar.cpp:238
void sync()
static QString extractHostAndPorts(const QString &str, QList< int > *ports=0)
Definition: kcookiejar.cpp:1363
void setDomainAdvice(const QString &_domain, KCookieAdvice _advice)
This function sets the advice for all cookies originating from _domain.
Definition: kcookiejar.cpp:1080
bool isValid() const
static KCookieAdvice strToAdvice(const QString &_str)
Definition: kcookiejar.cpp:143
Definition: kcookiejar.h:49
static const char * parseNameValue(const char *header, QString &Name, QString &Value, bool keepQuotes=false, bool rfcQuotes=false)
Definition: kcookiejar.cpp:461
bool isExpired(qint64 currentDate=-1) const
If currentDate is -1, the default, then the current timestamp in UTC is used for comparison against t...
Definition: kcookiejar.cpp:196
Definition: kcookiejar.h:43
virtual bool open(OpenMode flags=QIODevice::ReadWrite)
static const char * parseField(char *&buffer, bool keepQuotes=false)
Definition: kcookiejar.cpp:1332
const char * name(StandardAction id)
static KDateTime fromString(const QString &string, TimeFormat format=ISODate, bool *negZero=0)
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
KHttpCookie(const QString &_host=QString(), const QString &_domain=QString(), const QString &_path=QString(), const QString &_name=QString(), const QString &_value=QString(), qint64 _expireDate=0, int _protocolVersion=0, bool _secure=false, bool _httpOnly=false, bool _explicitPath=false)
Definition: kcookiejar.cpp:168
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void stripDomain(const QString &_fqdn, QString &_domain) const
Definition: kcookiejar.cpp:547
Definition: kcookiejar.h:45
void addCookie(KHttpCookie &cookie)
This function hands a KHttpCookie object over to the cookie jar.
Definition: kcookiejar.cpp:934
void setGlobalAdvice(KCookieAdvice _advice)
This function sets the global advice for cookies.
Definition: kcookiejar.cpp:1126
void loadConfig(KConfig *_config, bool reparse=false)
Load the cookie configuration.
Definition: kcookiejar.cpp:1527
void eatCookie(KHttpCookieList::iterator cookieIterator)
Remove & delete a cookie from the jar.
Definition: kcookiejar.cpp:1161
QString protocol() const
KDateTime toUtc() const
QDateTime dateTime() const
bool cookieIsPersistent(const KHttpCookie &cookie) const
This function tells whether a single KHttpCookie object should be considered persistent.
Definition: kcookiejar.cpp:1046
Definition: kcookiejar.h:113
QString path(AdjustPathOption trailing=LeaveTrailingSlash) const
bool saveCookies(const QString &_filename)
Store all the cookies in a safe(?) place.
Definition: kcookiejar.cpp:1267
bool finalize()
KGuiItem ok()
const QStringList & getDomainList()
Get a list of all domains known to the cookie jar.
Definition: kcookiejar.cpp:1136
void extractDomains(const QString &_fqdn, QStringList &_domainList) const
Returns a list of domains in _domainList relevant for this host.
Definition: kcookiejar.cpp:594
QHash< QString, KHttpCookieList * > m_cookieDomains
Definition: kcookiejar.h:385
KCookieAdvice cookieAdvice(const KHttpCookie &cookie) const
This function advices whether a single KHttpCookie object should be added to the cookie jar...
Definition: kcookiejar.cpp:1010
Definition: kcookiejar.h:44
unsigned int version()
QString findCookies(const QString &_url, bool useDOMFormat, long windowId, KHttpCookieList *pendingCookies=0)
Looks for cookies in the cookie jar which are appropriate for _url.
Definition: kcookiejar.cpp:350
void reparseConfiguration()
KCookieAdvice getDomainAdvice(const QString &_domain) const
This function gets the advice for all cookies originating from _domain.
Definition: kcookiejar.cpp:1063
bool loadCookies(const QString &_filename)
Load all the cookies from file and add them to the cookie jar.
Definition: kcookiejar.cpp:1390
KHttpCookieList makeCookies(const QString &_url, const QByteArray &cookie_headers, long windowId)
This function parses cookie_headers and returns a linked list of valid KHttpCookie objects for all co...
Definition: kcookiejar.cpp:665
void eatCookiesForDomain(const QString &domain)
Remove & delete all cookies for domain.
Definition: kcookiejar.cpp:1181
Definition: kcookiejar.h:42
KCookieAdvice getUserSelectedAdvice() const
Definition: kcookiejar.h:107
static bool compareCookies(const KHttpCookie &item1, const KHttpCookie &item2)
Definition: kcookiejar.cpp:908
T readEntry(const QString &key, const T &aDefault) const
void eatSessionCookies(long windowId)
Removes all end of session cookies set by the session windId.
Definition: kcookiejar.cpp:1196
static bool parseUrl(const QString &_url, QString &_fqdn, QString &_path, int *port=0)
Parses _url and returns the FQDN (_fqdn) and path (_path).
Definition: kcookiejar.cpp:569
static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie &cookiePtr, bool nameMatchOnly=false, bool updateWindowId=false)
Definition: kcookiejar.cpp:315
QStringList list(const QString &fileClass)
static QString adviceToStr(KCookieAdvice _advice)
Definition: kcookiejar.cpp:131
Definition: kcookiejar.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.