• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
khtml_pagecache.h
Go to the documentation of this file.
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2000 Waldo Bastian <bastian@kde.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 #ifndef __khtml_pagecache_h__
21 #define __khtml_pagecache_h__
22 
23 #include <QtCore/QObject>
24 
25 class KHTMLPageCachePrivate;
26 
38 class KHTMLPageCache : public QObject
39 {
40  Q_OBJECT
41 public:
47  static KHTMLPageCache *self();
48  ~KHTMLPageCache();
49 
55  long createCacheEntry();
56 
60  void addData(long id, const QByteArray &data);
61 
66  void endData(long id);
67 
71  void cancelEntry(long id);
72 
78  bool isValid(long id);
79 
84  bool isComplete(long id);
85 
90  void fetchData(long id, QObject *recvObj, const char *recvSlot);
91 
95  void cancelFetch(QObject *recvObj);
96 
97 public Q_SLOTS:
101  void saveData(long id, QDataStream *str);
102 
103 private Q_SLOTS:
104  void sendData();
105 
106 private:
107  KHTMLPageCache();
108 
109  KHTMLPageCachePrivate* const d;
110 };
111 
112 class QIODevice;
113 class KHTMLPageCacheDelivery : public QObject
114 {
115  friend class KHTMLPageCache;
116 Q_OBJECT
117 public:
118  KHTMLPageCacheDelivery(QIODevice *_file): file(_file) {}
119  ~KHTMLPageCacheDelivery();
120 
121 Q_SIGNALS:
122  void emitData(const QByteArray &data);
123 
124 public:
125  QObject *recvObj;
126  QIODevice *file;
127 };
128 
129 
130 #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:206
KHTMLPageCacheDelivery::emitData
void emitData(const QByteArray &data)
KHTMLPageCacheDelivery::file
QIODevice * file
Definition: khtml_pagecache.h:126
KHTMLPageCacheDelivery::KHTMLPageCacheDelivery
KHTMLPageCacheDelivery(QIODevice *_file)
Definition: khtml_pagecache.h:118
QObject
KHTMLPageCache::isComplete
bool isComplete(long id)
Definition: khtml_pagecache.cpp:197
KHTMLPageCache::isValid
bool isValid(long id)
Definition: khtml_pagecache.cpp:191
KHTMLPageCacheDelivery
Definition: khtml_pagecache.h:113
KHTMLPageCache::cancelFetch
void cancelFetch(QObject *recvObj)
Cancel sending data to recvObj.
Definition: khtml_pagecache.cpp:224
KHTMLPageCache::cancelEntry
void cancelEntry(long id)
Cancel the entry.
Definition: khtml_pagecache.cpp:180
KHTMLPageCache::~KHTMLPageCache
~KHTMLPageCache()
Definition: khtml_pagecache.cpp:143
KHTMLPageCache
Singleton Object that handles a binary cache on top of the http cache management of kio...
Definition: khtml_pagecache.h:38
KHTMLPageCache::createCacheEntry
long createCacheEntry()
Create a new cache entry.
Definition: khtml_pagecache.cpp:151
KHTMLPageCache::saveData
void saveData(long id, QDataStream *str)
Save the data of cache entry id to the datastream str.
Definition: khtml_pagecache.cpp:267
KHTMLPageCacheDelivery::recvObj
QObject * recvObj
Definition: khtml_pagecache.h:125
QIODevice
KHTMLPageCache::addData
void addData(long id, const QByteArray &data)
Add data to the cache entry with id id.
Definition: khtml_pagecache.cpp:163
KHTMLPageCacheDelivery::~KHTMLPageCacheDelivery
~KHTMLPageCacheDelivery()
Definition: khtml_pagecache.cpp:289
KHTMLPageCache::endData
void endData(long id)
Signal end of data for the cache entry with id id.
Definition: khtml_pagecache.cpp:172
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal