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.
102 lines
2.7 KiB
102 lines
2.7 KiB
15 years ago
|
/**
|
||
|
* kcookiesmanagement.h - Cookies manager
|
||
|
*
|
||
|
* Copyright 2000-2001 Marco Pinelli <pinmc@orion.it>
|
||
|
*
|
||
|
* Contributors:
|
||
|
* Copyright (c) 2000-2001 Dawit Alemayehu <adawit@kde.org>
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation; either version 2 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* This program 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 program; if not, write to the Free Software
|
||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#ifndef __KCOOKIESMANAGEMENT_H
|
||
|
#define __KCOOKIESMANAGEMENT_H
|
||
|
|
||
14 years ago
|
#include <tqdict.h>
|
||
|
#include <tqstringlist.h>
|
||
|
#include <tqlistview.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include <tdecmodule.h>
|
||
15 years ago
|
|
||
|
|
||
|
class DCOPClient;
|
||
|
class KCookiesManagementDlgUI;
|
||
|
|
||
|
struct CookieProp;
|
||
|
|
||
14 years ago
|
class CookieListViewItem : public TQListViewItem
|
||
15 years ago
|
{
|
||
|
public:
|
||
14 years ago
|
CookieListViewItem(TQListView *parent, TQString dom);
|
||
|
CookieListViewItem(TQListViewItem *parent, CookieProp *cookie);
|
||
15 years ago
|
~CookieListViewItem();
|
||
|
|
||
14 years ago
|
TQString domain() const { return mDomain; }
|
||
15 years ago
|
CookieProp* cookie() const { return mCookie; }
|
||
|
CookieProp* leaveCookie();
|
||
|
void setCookiesLoaded() { mCookiesLoaded = true; }
|
||
|
bool cookiesLoaded() const { return mCookiesLoaded; }
|
||
14 years ago
|
virtual TQString text(int f) const;
|
||
15 years ago
|
|
||
|
private:
|
||
|
void init( CookieProp* cookie,
|
||
14 years ago
|
TQString domain = TQString::null,
|
||
15 years ago
|
bool cookieLoaded=false );
|
||
|
CookieProp *mCookie;
|
||
14 years ago
|
TQString mDomain;
|
||
15 years ago
|
bool mCookiesLoaded;
|
||
|
};
|
||
|
|
||
12 years ago
|
class KCookiesManagement : public TDECModule
|
||
15 years ago
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
14 years ago
|
KCookiesManagement(TQWidget *parent = 0 );
|
||
15 years ago
|
~KCookiesManagement();
|
||
|
|
||
|
virtual void load();
|
||
|
virtual void save();
|
||
|
virtual void defaults();
|
||
14 years ago
|
virtual TQString quickHelp() const;
|
||
15 years ago
|
|
||
|
private slots:
|
||
|
void deleteCookie();
|
||
|
void deleteAllCookies();
|
||
|
void getDomains();
|
||
14 years ago
|
void getCookies(TQListViewItem*);
|
||
|
void showCookieDetails(TQListViewItem*);
|
||
15 years ago
|
void doPolicy();
|
||
|
|
||
|
private:
|
||
|
void reset ();
|
||
14 years ago
|
void deleteCookie(TQListViewItem*);
|
||
15 years ago
|
bool cookieDetails(CookieProp *cookie);
|
||
|
void clearCookieDetails();
|
||
|
bool policyenabled();
|
||
|
|
||
|
private:
|
||
|
bool m_bDeleteAll;
|
||
|
|
||
14 years ago
|
TQWidget* mainWidget;
|
||
15 years ago
|
KCookiesManagementDlgUI* dlg;
|
||
|
|
||
14 years ago
|
TQStringList deletedDomains;
|
||
|
typedef TQPtrList<CookieProp> CookiePropList;
|
||
|
TQDict<CookiePropList> deletedCookies;
|
||
15 years ago
|
};
|
||
|
|
||
|
#endif // __KCOOKIESMANAGEMENT_H
|