khtml_pagecache.h
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
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 
00081   bool isValid(long id);
00082 
00087   bool isComplete(long id);
00088   
00093   void fetchData(long id, QObject *recvObj, const char *recvSlot);
00094 
00098   void cancelFetch(QObject *recvObj);
00099 
00103   void saveData(long id, QDataStream *str);
00104 
00105 private slots:
00106   void sendData();
00107 
00108 private:  
00109   KHTMLPageCache();
00110 
00111   static KHTMLPageCache *_self;
00112 
00113   KHTMLPageCachePrivate *d;  
00114 };
00115 
00116 class KHTMLPageCacheDelivery : public QObject
00117 {
00118    friend class KHTMLPageCache;
00119 Q_OBJECT
00120 public:
00121    KHTMLPageCacheDelivery(int _fd)
00122     : fd(_fd) { }
00123    ~KHTMLPageCacheDelivery();
00124 
00125 signals:
00126    void emitData(const QByteArray &data);
00127 
00128 public: 
00129    QObject *recvObj;
00130    int fd;      
00131 };
00132 
00133 
00134 #endif
 
This file is part of the documentation for khtml Library Version 3.2.0.