khtml Library API Documentation

khtml_pagecache.h

00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2000  Waldo Bastian <bastian@kde.org>
00004  *
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Library General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2 of the License, or (at your option) any later version.
00009  *
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU Library General Public License
00016  * along with this library; see the file COPYING.LIB.  If not, write to
00017  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018  * Boston, MA 02111-1307, USA.
00019  */
00020 #ifndef __khtml_pagecache_h__
00021 #define __khtml_pagecache_h__
00022 
00023 #include <qobject.h>
00024 #include <qcstring.h>
00025 #include <qvaluelist.h>
00026 #include <qptrlist.h>
00027 
00028 class KHTMLPageCachePrivate;
00029 
00041 class KHTMLPageCache : public QObject
00042 {
00043   Q_OBJECT
00044 public:
00050   static KHTMLPageCache *self();
00051   ~KHTMLPageCache();
00052   
00058   long createCacheEntry();
00059 
00063   void addData(long id, const QByteArray &data);
00064 
00069   void endData(long id);
00070 
00074   void cancelEntry(long id);
00075 
00080   bool isValid(long id);
00081   
00086   void fetchData(long id, QObject *recvObj, const char *recvSlot);
00087 
00091   void cancelFetch(QObject *recvObj);
00092 
00096   void saveData(long id, QDataStream *str);
00097 
00098 private slots:
00099   void sendData();
00100 
00101 private:  
00102   KHTMLPageCache();
00103 
00104   static KHTMLPageCache *_self;
00105 
00106   KHTMLPageCachePrivate *d;  
00107 };
00108 
00109 class KHTMLPageCacheDelivery : public QObject
00110 {
00111    friend class KHTMLPageCache;
00112 Q_OBJECT
00113 public:
00114    KHTMLPageCacheDelivery(int _fd)
00115     : fd(_fd) { }
00116    ~KHTMLPageCacheDelivery();
00117 
00118 signals:
00119    void emitData(const QByteArray &data);
00120 
00121 public: 
00122    QObject *recvObj;
00123    int fd;      
00124 };
00125 
00126 
00127 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:38 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001