diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:04:16 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-27 01:04:16 -0600 |
commit | 5159cd2beb2e87806a5b54e9991b7895285c9d3e (patch) | |
tree | 9b70e8be47a390f8f4d56ead812ab0c9dad88709 /tdeioslave/http/kcookiejar/kcookieserver.h | |
parent | c17cb900dcf52b8bd6dc300d4f103392900ec2b4 (diff) | |
download | tdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.tar.gz tdelibs-5159cd2beb2e87806a5b54e9991b7895285c9d3e.zip |
Rename a number of libraries and executables to avoid conflicts with KDE4
Diffstat (limited to 'tdeioslave/http/kcookiejar/kcookieserver.h')
-rw-r--r-- | tdeioslave/http/kcookiejar/kcookieserver.h | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/tdeioslave/http/kcookiejar/kcookieserver.h b/tdeioslave/http/kcookiejar/kcookieserver.h new file mode 100644 index 000000000..2cbb9ccf1 --- /dev/null +++ b/tdeioslave/http/kcookiejar/kcookieserver.h @@ -0,0 +1,98 @@ +/* + This file is part of the KDE File Manager + + Copyright (C) 1998 Waldo Bastian (bastian@kde.org) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This software is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +//---------------------------------------------------------------------------- +// +// KDE Cookie Server +// $Id$ + +#ifndef KCOOKIESERVER_H +#define KCOOKIESERVER_H + +#include <tqstringlist.h> +#include <kded/kdedmodule.h> + +class KHttpCookieList; +class KCookieJar; +class KHttpCookie; +class TQTimer; +class RequestList; +class DCOPClient; +class TDEConfig; + +class KCookieServer : public KDEDModule +{ + Q_OBJECT + K_DCOP +public: + KCookieServer(const TQCString &); + ~KCookieServer(); + +k_dcop: + TQString findCookies(TQString); + TQString findCookies(TQString, long); + TQStringList findDomains(); + TQStringList findCookies(TQValueList<int>,TQString,TQString,TQString,TQString); + TQString findDOMCookies(TQString); + TQString findDOMCookies(TQString, long); + void addCookies(TQString, TQCString, long); + void deleteCookie(TQString, TQString, TQString, TQString); + void deleteCookiesFromDomain(TQString); + void deleteSessionCookies(long); + void deleteSessionCookiesFor(TQString, long); + void deleteAllCookies(); + void addDOMCookies(TQString, TQCString, long); + /** + * Sets the cookie policy for the domain associated with the specified URL. + */ + void setDomainAdvice(TQString url, TQString advice); + /** + * Returns the cookie policy in effect for the specified URL. + */ + TQString getDomainAdvice(TQString url); + void reloadPolicy(); + void shutdown(); + +public: + bool cookiesPending(const TQString &url, KHttpCookieList *cookieList=0); + void addCookies(const TQString &url, const TQCString &cookieHeader, + long windowId, bool useDOMFormat); + void checkCookies(KHttpCookieList *cookieList); + +public slots: + void slotSave(); + void slotDeleteSessionCookies(long); + +protected: + KCookieJar *mCookieJar; + KHttpCookieList *mPendingCookies; + RequestList *mRequestList; + TQTimer *mTimer; + bool mAdvicePending; + DCOPClient *mOldCookieServer; + TDEConfig *mConfig; + +private: + virtual int newInstance(TQValueList<TQCString>) { return 0; } + bool cookieMatches(KHttpCookie*, TQString, TQString, TQString, TQString); + void putCookie(TQStringList&, KHttpCookie*, const TQValueList<int>&); + void saveCookieJar(); +}; + +#endif |