kioslave
KCookieJar Class Reference
#include <kcookiejar.h>
Detailed Description
Definition at line 114 of file kcookiejar.h.
Constructor & Destructor Documentation
| KCookieJar::KCookieJar | ( | ) |
Constructs a new cookie jar.
One jar should be enough for all cookies.
Definition at line 252 of file kcookiejar.cpp.
| KCookieJar::~KCookieJar | ( | ) |
Destructs the cookie jar.
Poor little cookies, they will all be eaten by the cookie monster!
Definition at line 273 of file kcookiejar.cpp.
Member Function Documentation
| void KCookieJar::addCookie | ( | KHttpCookiePtr & | cookiePtr | ) |
This function hands a KHttpCookie object over to the cookie jar.
On return cookiePtr is set to 0.
Definition at line 947 of file kcookiejar.cpp.
| QString KCookieJar::adviceToStr | ( | KCookieAdvice | _advice | ) | [static] |
Definition at line 97 of file kcookiejar.cpp.
| bool KCookieJar::changed | ( | ) | const [inline] |
| KCookieAdvice KCookieJar::cookieAdvice | ( | KHttpCookiePtr | cookiePtr | ) |
This function advices whether a single KHttpCookie object should be added to the cookie jar.
Possible return values are:
- KCookieAccept, the cookie should be added
- KCookieReject, the cookie should not be added
- KCookieAsk, the user should decide what to do
Definition at line 1009 of file kcookiejar.cpp.
| void KCookieJar::eatAllCookies | ( | ) |
| void KCookieJar::eatCookie | ( | KHttpCookiePtr | cookiePtr | ) |
Remove & delete a cookie from the jar.
cookiePtr should be one of the entries in a KHttpCookieList. Update your KHttpCookieList by calling getCookieList after calling this function.
Definition at line 1171 of file kcookiejar.cpp.
| void KCookieJar::eatCookiesForDomain | ( | const QString & | domain | ) |
| void KCookieJar::eatSessionCookies | ( | const QString & | fqdn, | |
| long | windowId, | |||
| bool | isFQDN = true | |||
| ) |
Removes all end of session cookies set by the session windId.
Definition at line 1229 of file kcookiejar.cpp.
| void KCookieJar::eatSessionCookies | ( | long | windowId | ) |
Removes all end of session cookies set by the session windId.
Definition at line 1208 of file kcookiejar.cpp.
| void KCookieJar::extractDomains | ( | const QString & | _fqdn, | |
| QStringList & | _domainList | |||
| ) |
Returns a list of domains in _domainList relevant for this host.
The list is sorted with the FQDN listed first and the top-most domain listed last
Definition at line 611 of file kcookiejar.cpp.
| QString KCookieJar::findCookies | ( | const QString & | _url, | |
| bool | useDOMFormat, | |||
| long | windowId, | |||
| KHttpCookieList * | pendingCookies = 0 | |||
| ) |
Looks for cookies in the cookie jar which are appropriate for _url.
Returned is a string containing all appropriate cookies in a format which can be added to a HTTP-header without any additional processing.
If useDOMFormat is true, the string is formatted in a format in compliance with the DOM standard. pendingCookies contains a list of cookies that have not been approved yet by the user but that will be included in the result none the less.
Definition at line 328 of file kcookiejar.cpp.
| const KHttpCookieList * KCookieJar::getCookieList | ( | const QString & | _domain, | |
| const QString & | _fqdn | |||
| ) |
Get a list of all cookies in the cookie jar originating from _domain.
Definition at line 1154 of file kcookiejar.cpp.
| KCookieAdvice KCookieJar::getDomainAdvice | ( | const QString & | _domain | ) |
This function gets the advice for all cookies originating from _domain.
- KCookieDunno, no specific advice for _domain
- KCookieAccept, accept all cookies for _domain
- KCookieReject, reject all cookies for _domain
- KCookieAsk, the user decides what to do with cookies for _domain
Definition at line 1060 of file kcookiejar.cpp.
| const QStringList & KCookieJar::getDomainList | ( | ) |
Get a list of all domains known to the cookie jar.
A domain is known to the cookie jar if:
- It has a cookie originating from the domain
- It has a specific advice set for the domain
Definition at line 1146 of file kcookiejar.cpp.
| KCookieAdvice KCookieJar::getGlobalAdvice | ( | ) | [inline] |
Get the global advice for cookies.
The returned advice can have the following values:
- KCookieAccept, accept cookies
- KCookieReject, reject cookies
- KCookieAsk, the user decides what to do with cookies
The global advice is used if the domain has no advice set.
Definition at line 252 of file kcookiejar.h.
| void KCookieJar::loadConfig | ( | KConfig * | _config, | |
| bool | reparse = false | |||
| ) |
| bool KCookieJar::loadCookies | ( | const QString & | _filename | ) |
Load all the cookies from file and add them to the cookie jar.
Definition at line 1377 of file kcookiejar.cpp.
| KHttpCookieList KCookieJar::makeCookies | ( | const QString & | _url, | |
| const QCString & | cookie_headers, | |||
| long | windowId | |||
| ) |
This function parses cookie_headers and returns a linked list of valid KHttpCookie objects for all cookies found in cookie_headers.
If no cookies could be found 0 is returned.
cookie_headers should be a concatenation of all lines of a HTTP-header which start with "Set-Cookie". The lines should be separated by '
's.
Definition at line 712 of file kcookiejar.cpp.
| KHttpCookieList KCookieJar::makeDOMCookies | ( | const QString & | _url, | |
| const QCString & | cookie_domstring, | |||
| long | windowId | |||
| ) |
This function parses cookie_headers and returns a linked list of valid KHttpCookie objects for all cookies found in cookie_headers.
Parses cookie_domstr and returns a linked list of KHttpCookie objects.
If no cookies could be found 0 is returned.
cookie_domstr should be a concatenation of "name=value" pairs, separated by a semicolon ';'.
cookie_domstr should be a semicolon-delimited list of "name=value" pairs. Any whitespace before "name" or around '=' is discarded. If no cookies are found, 0 is returned.
Definition at line 882 of file kcookiejar.cpp.
Parses _url and returns the FQDN (_fqdn) and path (_path).
Definition at line 573 of file kcookiejar.cpp.
| int KCookieJar::preferredDefaultPolicy | ( | ) | const [inline] |
| void KCookieJar::saveConfig | ( | KConfig * | _config | ) |
| bool KCookieJar::saveCookies | ( | const QString & | _filename | ) |
| void KCookieJar::setDomainAdvice | ( | KHttpCookiePtr | _cookie, | |
| KCookieAdvice | _advice | |||
| ) |
This function sets the advice for all cookies originating from the same domain as _cookie.
_advice can have the following values:
- KCookieDunno, no specific advice for _domain
- KCookieAccept, accept all cookies for _domain
- KCookieReject, reject all cookies for _domain
- KCookieAsk, the user decides what to do with cookies for _domain
Definition at line 1125 of file kcookiejar.cpp.
| void KCookieJar::setDomainAdvice | ( | const QString & | _domain, | |
| KCookieAdvice | _advice | |||
| ) |
This function sets the advice for all cookies originating from _domain.
_advice can have the following values:
- KCookieDunno, no specific advice for _domain
- KCookieAccept, accept all cookies for _domain
- KCookieReject, reject all cookies for _domain
- KCookieAsk, the user decides what to do with cookies for _domain
Definition at line 1081 of file kcookiejar.cpp.
| void KCookieJar::setGlobalAdvice | ( | KCookieAdvice | _advice | ) |
This function sets the global advice for cookies.
_advice can have the following values:
- KCookieAccept, accept cookies
- KCookieReject, reject cookies
- KCookieAsk, the user decides what to do with cookies
The global advice is used if the domain has no advice set.
Definition at line 1136 of file kcookiejar.cpp.
| void KCookieJar::setPreferredDefaultPolicy | ( | int | value | ) | [inline] |
| void KCookieJar::setShowCookieDetails | ( | bool | value | ) | [inline] |
Sets the user's preference of level of detail displayed by the cookie dialog.
Definition at line 344 of file kcookiejar.h.
| bool KCookieJar::showCookieDetails | ( | ) | const [inline] |
| QString KCookieJar::stripDomain | ( | KHttpCookiePtr | cookiePtr | ) | [protected] |
Definition at line 563 of file kcookiejar.cpp.
Definition at line 553 of file kcookiejar.cpp.
| KCookieAdvice KCookieJar::strToAdvice | ( | const QString & | _str | ) | [static] |
Definition at line 108 of file kcookiejar.cpp.
Member Data Documentation
bool KCookieJar::m_autoAcceptSessionCookies [protected] |
Definition at line 360 of file kcookiejar.h.
bool KCookieJar::m_configChanged [protected] |
Definition at line 356 of file kcookiejar.h.
QDict<KHttpCookieList> KCookieJar::m_cookieDomains [protected] |
Definition at line 353 of file kcookiejar.h.
bool KCookieJar::m_cookiesChanged [protected] |
Definition at line 357 of file kcookiejar.h.
QStringList KCookieJar::m_domainList [protected] |
Definition at line 351 of file kcookiejar.h.
KCookieAdvice KCookieJar::m_globalAdvice [protected] |
Definition at line 352 of file kcookiejar.h.
bool KCookieJar::m_ignoreCookieExpirationDate [protected] |
Definition at line 361 of file kcookiejar.h.
int KCookieJar::m_preferredPolicy [protected] |
Definition at line 363 of file kcookiejar.h.
bool KCookieJar::m_rejectCrossDomainCookies [protected] |
Definition at line 359 of file kcookiejar.h.
bool KCookieJar::m_showCookieDetails [protected] |
Definition at line 358 of file kcookiejar.h.
QDict<int> KCookieJar::m_twoLevelTLD [protected] |
Definition at line 354 of file kcookiejar.h.
The documentation for this class was generated from the following files:
KDE 3.5 API Reference