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

KIO

  • kio
  • httpfilter
httpfilter.h
Go to the documentation of this file.
1/*
2 This file is part of the KDE libraries
3 Copyright (c) 2002 Waldo Bastian <bastian@kde.org>
4 Copyright 2009 David Faure <faure@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
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
21#ifndef _HTTPFILTER_H_
22#define _HTTPFILTER_H_
23
24#include <config.h>
25
26class KGzipFilter;
27#include <QBuffer>
28
29#include <QObject>
30#include <kcodecs.h>
31
32class HTTPFilterBase : public QObject
33{
34 Q_OBJECT
35public:
36 HTTPFilterBase();
37 ~HTTPFilterBase();
38
39 void chain(HTTPFilterBase *previous);
40
41public Q_SLOTS:
42 virtual void slotInput(const QByteArray &d) = 0;
43
44Q_SIGNALS:
45 void output(const QByteArray &d);
46 void error(const QString &);
47
48protected:
49 HTTPFilterBase *last;
50};
51
52class HTTPFilterChain : public HTTPFilterBase
53{
54 Q_OBJECT
55public:
56 HTTPFilterChain();
57
58 void addFilter(HTTPFilterBase *filter);
59
60public Q_SLOTS:
61 void slotInput(const QByteArray &d);
62
63private:
64 HTTPFilterBase *first;
65};
66
67class HTTPFilterMD5 : public HTTPFilterBase
68{
69 Q_OBJECT
70public:
71 HTTPFilterMD5();
72
73 QString md5();
74
75public Q_SLOTS:
76 void slotInput(const QByteArray &d);
77
78private:
79 KMD5 context;
80};
81
82
83class HTTPFilterGZip : public HTTPFilterBase
84{
85 Q_OBJECT
86public:
87 HTTPFilterGZip(bool deflate = false /* for subclass HTTPFilterDeflate */ );
88 ~HTTPFilterGZip();
89
90public Q_SLOTS:
91 void slotInput(const QByteArray &d);
92
93private:
94 bool m_deflateMode;
95 bool m_firstData;
96 bool m_finished;
97 KGzipFilter* m_gzipFilter;
98};
99
100class HTTPFilterDeflate : public HTTPFilterGZip
101{
102 Q_OBJECT
103public:
104 HTTPFilterDeflate();
105};
106
107#endif
HTTPFilterBase
Definition: httpfilter.h:33
HTTPFilterBase::error
void error(const QString &)
HTTPFilterBase::output
void output(const QByteArray &d)
HTTPFilterBase::~HTTPFilterBase
~HTTPFilterBase()
Definition: httpfilter.cc:34
HTTPFilterBase::HTTPFilterBase
HTTPFilterBase()
Definition: httpfilter.cc:29
HTTPFilterBase::slotInput
virtual void slotInput(const QByteArray &d)=0
HTTPFilterBase::last
HTTPFilterBase * last
Definition: httpfilter.h:49
HTTPFilterBase::chain
void chain(HTTPFilterBase *previous)
Definition: httpfilter.cc:40
HTTPFilterChain
Definition: httpfilter.h:53
HTTPFilterChain::HTTPFilterChain
HTTPFilterChain()
Definition: httpfilter.cc:47
HTTPFilterChain::addFilter
void addFilter(HTTPFilterBase *filter)
Definition: httpfilter.cc:53
HTTPFilterChain::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:72
HTTPFilterDeflate
Definition: httpfilter.h:101
HTTPFilterDeflate::HTTPFilterDeflate
HTTPFilterDeflate()
Definition: httpfilter.cc:186
HTTPFilterGZip
Definition: httpfilter.h:84
HTTPFilterGZip::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:125
HTTPFilterGZip::~HTTPFilterGZip
~HTTPFilterGZip()
Definition: httpfilter.cc:109
HTTPFilterMD5
Definition: httpfilter.h:68
HTTPFilterMD5::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:91
HTTPFilterMD5::md5
QString md5()
Definition: httpfilter.cc:85
HTTPFilterMD5::HTTPFilterMD5
HTTPFilterMD5()
Definition: httpfilter.cc:80
KGzipFilter
KMD5
QObject
kcodecs.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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