khtml_pagecache.h
/* This file is part of the KDE project
*
* Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __khtml_pagecache_h__
#define __khtml_pagecache_h__
#include <qobject.h>
#include <qcstring.h>
#include <qvaluelist.h>
#include <qptrlist.h>
class KHTMLPageCachePrivate;
class KHTMLPageCache : public QObject
{
Q_OBJECT
public:
static KHTMLPageCache *self();
~KHTMLPageCache();
long createCacheEntry();
void addData(long id, const QByteArray &data);
void endData(long id);
void cancelEntry(long id);
bool isValid(long id);
bool isComplete(long id);
void fetchData(long id, QObject *recvObj, const char *recvSlot);
void cancelFetch(QObject *recvObj);
void saveData(long id, QDataStream *str);
private slots:
void sendData();
private:
KHTMLPageCache();
static KHTMLPageCache *_self;
KHTMLPageCachePrivate *d;
};
class KHTMLPageCacheDelivery : public QObject
{
friend class KHTMLPageCache;
Q_OBJECT
public:
KHTMLPageCacheDelivery(int _fd)
: fd(_fd) { }
~KHTMLPageCacheDelivery();
signals:
void emitData(const QByteArray &data);
public:
QObject *recvObj;
int fd;
};
#endif
KHTMLPageCache::fetchData
void fetchData(long id, QObject *recvObj, const char *recvSlot)
Fetch data for cache entry id and send it to slot recvSlot in the object recvObj. ...
Definition: khtml_pagecache.cpp:200
KHTMLPageCache::isComplete
bool isComplete(long id)
Definition: khtml_pagecache.cpp:191
KHTMLPageCache::isValid
bool isValid(long id)
Definition: khtml_pagecache.cpp:185
KHTMLPageCache::cancelFetch
void cancelFetch(QObject *recvObj)
Cancel sending data to recvObj.
Definition: khtml_pagecache.cpp:218
KHTMLPageCache::cancelEntry
void cancelEntry(long id)
Cancel the entry.
Definition: khtml_pagecache.cpp:174
KHTMLPageCache
Singleton Object that handles a binary cache on top of the http cache management of kio...
Definition: khtml_pagecache.h:41
KHTMLPageCache::createCacheEntry
long createCacheEntry()
Create a new cache entry.
Definition: khtml_pagecache.cpp:143
KHTMLPageCache::saveData
void saveData(long id, QDataStream *str)
Save the data of cache entry id to the datastream str.
Definition: khtml_pagecache.cpp:272
KHTMLPageCache::addData
void addData(long id, const QByteArray &data)
Add data to the cache entry with id id.
Definition: khtml_pagecache.cpp:158
KHTMLPageCache::endData
void endData(long id)
Signal end of data for the cache entry with id id.
Definition: khtml_pagecache.cpp:166

KDE Home | KDE Accessibility Home | Description of Access Keys