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

KIO

  • sources
  • kde-4.12
  • kdelibs
  • 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 
26 class KGzipFilter;
27 #include <QBuffer>
28 
29 #include <QObject>
30 #include <kcodecs.h>
31 
32 class HTTPFilterBase : public QObject
33 {
34  Q_OBJECT
35 public:
36  HTTPFilterBase();
37  ~HTTPFilterBase();
38 
39  void chain(HTTPFilterBase *previous);
40 
41 public Q_SLOTS:
42  virtual void slotInput(const QByteArray &d) = 0;
43 
44 Q_SIGNALS:
45  void output(const QByteArray &d);
46  void error(const QString &);
47 
48 protected:
49  HTTPFilterBase *last;
50 };
51 
52 class HTTPFilterChain : public HTTPFilterBase
53 {
54  Q_OBJECT
55 public:
56  HTTPFilterChain();
57 
58  void addFilter(HTTPFilterBase *filter);
59 
60 public Q_SLOTS:
61  void slotInput(const QByteArray &d);
62 
63 private:
64  HTTPFilterBase *first;
65 };
66 
67 class HTTPFilterMD5 : public HTTPFilterBase
68 {
69  Q_OBJECT
70 public:
71  HTTPFilterMD5();
72 
73  QString md5();
74 
75 public Q_SLOTS:
76  void slotInput(const QByteArray &d);
77 
78 private:
79  KMD5 context;
80 };
81 
82 
83 class HTTPFilterGZip : public HTTPFilterBase
84 {
85  Q_OBJECT
86 public:
87  HTTPFilterGZip(bool deflate = false /* for subclass HTTPFilterDeflate */ );
88  ~HTTPFilterGZip();
89 
90 public Q_SLOTS:
91  void slotInput(const QByteArray &d);
92 
93 private:
94  bool m_deflateMode;
95  bool m_firstData;
96  bool m_finished;
97  KGzipFilter* m_gzipFilter;
98 };
99 
100 class HTTPFilterDeflate : public HTTPFilterGZip
101 {
102  Q_OBJECT
103 public:
104  HTTPFilterDeflate();
105 };
106 
107 #endif
HTTPFilterBase::error
void error(const QString &)
HTTPFilterChain::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:72
HTTPFilterGZip::HTTPFilterGZip
HTTPFilterGZip(bool deflate=false)
Definition: httpfilter.cc:98
HTTPFilterMD5::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:91
HTTPFilterMD5::md5
QString md5()
Definition: httpfilter.cc:85
QString
QObject
HTTPFilterBase::HTTPFilterBase
HTTPFilterBase()
Definition: httpfilter.cc:29
HTTPFilterMD5::HTTPFilterMD5
HTTPFilterMD5()
Definition: httpfilter.cc:80
KGzipFilter
HTTPFilterChain
Definition: httpfilter.h:52
HTTPFilterBase::~HTTPFilterBase
~HTTPFilterBase()
Definition: httpfilter.cc:34
HTTPFilterBase::output
void output(const QByteArray &d)
HTTPFilterDeflate
Definition: httpfilter.h:100
HTTPFilterBase::chain
void chain(HTTPFilterBase *previous)
Definition: httpfilter.cc:40
HTTPFilterChain::HTTPFilterChain
HTTPFilterChain()
Definition: httpfilter.cc:47
KMD5
HTTPFilterGZip::slotInput
void slotInput(const QByteArray &d)
Definition: httpfilter.cc:125
HTTPFilterDeflate::HTTPFilterDeflate
HTTPFilterDeflate()
Definition: httpfilter.cc:186
HTTPFilterBase::slotInput
virtual void slotInput(const QByteArray &d)=0
HTTPFilterGZip::~HTTPFilterGZip
~HTTPFilterGZip()
Definition: httpfilter.cc:109
HTTPFilterGZip
Definition: httpfilter.h:83
HTTPFilterChain::addFilter
void addFilter(HTTPFilterBase *filter)
Definition: httpfilter.cc:53
kcodecs.h
HTTPFilterBase::last
HTTPFilterBase * last
Definition: httpfilter.h:49
HTTPFilterMD5
Definition: httpfilter.h:67
HTTPFilterBase
Definition: httpfilter.h:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:01 by doxygen 1.8.7 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 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