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 
00025 class KHTMLPageCachePrivate;
00026 
00038 class KHTMLPageCache : public QObject
00039 {
00040   Q_OBJECT
00041 public:
00047   static KHTMLPageCache *self();
00048   ~KHTMLPageCache();
00049   
00055   long createCacheEntry();
00056 
00060   void addData(long id, const QByteArray &data);
00061 
00066   void endData(long id);
00067 
00071   void cancelEntry(long id);
00072 
00077   bool isValid(long id);
00078   
00083   void fetchData(long id, QObject *recvObj, const char *recvSlot);
00084 
00088   void cancelFetch(QObject *recvObj);
00089 
00093   void saveData(long id, QDataStream *str);
00094 
00095 private slots:
00096   void sendData();
00097 
00098 private:  
00099   KHTMLPageCache();
00100 
00101   static KHTMLPageCache *_self;
00102 
00103   KHTMLPageCachePrivate *d;  
00104 };
00105 
00106 class KHTMLPageCacheDelivery : public QObject
00107 {
00108    friend class KHTMLPageCache;
00109 Q_OBJECT
00110 public:
00111    KHTMLPageCacheDelivery(int _fd)
00112     : fd(_fd) { }
00113    ~KHTMLPageCacheDelivery();
00114 
00115 signals:
00116    void emitData(const QByteArray &data);
00117 
00118 public: 
00119    QObject *recvObj;
00120    int fd;      
00121 };
00122 
00123 
00124 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.4.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 27 22:16:36 2005 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001