You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
99 lines
2.9 KiB
99 lines
2.9 KiB
15 years ago
|
/*
|
||
|
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
|
||
|
|
||
15 years ago
|
#include <tqstringlist.h>
|
||
15 years ago
|
#include <kded/kdedmodule.h>
|
||
|
|
||
|
class KHttpCookieList;
|
||
|
class KCookieJar;
|
||
|
class KHttpCookie;
|
||
15 years ago
|
class TQTimer;
|
||
15 years ago
|
class RequestList;
|
||
|
class DCOPClient;
|
||
12 years ago
|
class TDEConfig;
|
||
15 years ago
|
|
||
|
class KCookieServer : public KDEDModule
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
K_DCOP
|
||
|
public:
|
||
15 years ago
|
KCookieServer(const TQCString &);
|
||
15 years ago
|
~KCookieServer();
|
||
|
|
||
|
k_dcop:
|
||
14 years ago
|
TQString findCookies(TQString);
|
||
|
TQString findCookies(TQString, long);
|
||
|
TQStringList findDomains();
|
||
|
TQStringList findCookies(TQValueList<int>,TQString,TQString,TQString,TQString);
|
||
|
TQString findDOMCookies(TQString);
|
||
|
TQString findDOMCookies(TQString, long);
|
||
15 years ago
|
void addCookies(TQString, TQCString, long);
|
||
|
void deleteCookie(TQString, TQString, TQString, TQString);
|
||
|
void deleteCookiesFromDomain(TQString);
|
||
15 years ago
|
void deleteSessionCookies(long);
|
||
15 years ago
|
void deleteSessionCookiesFor(TQString, long);
|
||
15 years ago
|
void deleteAllCookies();
|
||
15 years ago
|
void addDOMCookies(TQString, TQCString, long);
|
||
15 years ago
|
/**
|
||
|
* Sets the cookie policy for the domain associated with the specified URL.
|
||
|
*/
|
||
15 years ago
|
void setDomainAdvice(TQString url, TQString advice);
|
||
15 years ago
|
/**
|
||
|
* Returns the cookie policy in effect for the specified URL.
|
||
|
*/
|
||
15 years ago
|
TQString getDomainAdvice(TQString url);
|
||
15 years ago
|
void reloadPolicy();
|
||
|
void shutdown();
|
||
|
|
||
|
public:
|
||
15 years ago
|
bool cookiesPending(const TQString &url, KHttpCookieList *cookieList=0);
|
||
|
void addCookies(const TQString &url, const TQCString &cookieHeader,
|
||
15 years ago
|
long windowId, bool useDOMFormat);
|
||
|
void checkCookies(KHttpCookieList *cookieList);
|
||
|
|
||
|
public slots:
|
||
|
void slotSave();
|
||
|
void slotDeleteSessionCookies(long);
|
||
|
|
||
|
protected:
|
||
|
KCookieJar *mCookieJar;
|
||
|
KHttpCookieList *mPendingCookies;
|
||
|
RequestList *mRequestList;
|
||
15 years ago
|
TQTimer *mTimer;
|
||
15 years ago
|
bool mAdvicePending;
|
||
|
DCOPClient *mOldCookieServer;
|
||
12 years ago
|
TDEConfig *mConfig;
|
||
15 years ago
|
|
||
|
private:
|
||
15 years ago
|
virtual int newInstance(TQValueList<TQCString>) { return 0; }
|
||
|
bool cookieMatches(KHttpCookie*, TQString, TQString, TQString, TQString);
|
||
|
void putCookie(TQStringList&, KHttpCookie*, const TQValueList<int>&);
|
||
15 years ago
|
void saveCookieJar();
|
||
|
};
|
||
|
|
||
|
#endif
|