• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/httpfilter
 

tdeio/httpfilter

  • tdeio
  • httpfilter
httpfilter.h
1 /*
2  This file is part of the KDE libraries
3  Copyright (c) 2002 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 version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef _HTTPFILTER_H_
21 #define _HTTPFILTER_H_
22 
23 #include <config.h>
24 
25 #ifdef HAVE_LIBZ
26 #define DO_GZIP
27 #endif
28 
29 #ifdef DO_GZIP
30 #include <zlib.h>
31 #endif
32 
33 #include <tqobject.h>
34 #include <kmdcodec.h>
35 
36 class HTTPFilterBase : public TQObject
37 {
38  TQ_OBJECT
39 public:
40  HTTPFilterBase();
41  ~HTTPFilterBase();
42 
43  void chain(HTTPFilterBase *previous);
44 
45 public slots:
46  virtual void slotInput(const TQByteArray &d) = 0;
47 
48 signals:
49  void output(const TQByteArray &d);
50  void error(int, const TQString &);
51 
52 protected:
53  HTTPFilterBase *last;
54 };
55 
56 class HTTPFilterChain : public HTTPFilterBase
57 {
58  TQ_OBJECT
59 public:
60  HTTPFilterChain();
61 
62  void addFilter(HTTPFilterBase *filter);
63 
64 public slots:
65  void slotInput(const TQByteArray &d);
66 
67 private:
68  HTTPFilterBase *first;
69 };
70 
71 class HTTPFilterMD5 : public HTTPFilterBase
72 {
73  TQ_OBJECT
74 public:
75  HTTPFilterMD5();
76 
77  TQString md5();
78 
79 public slots:
80  void slotInput(const TQByteArray &d);
81 
82 private:
83  KMD5 context;
84 };
85 
86 
87 class HTTPFilterGZip : public HTTPFilterBase
88 {
89  TQ_OBJECT
90 public:
91  HTTPFilterGZip();
92  ~HTTPFilterGZip();
93 
94 public slots:
95  void slotInput(const TQByteArray &d);
96 
97 protected:
98  int get_byte();
99  int checkHeader();
100 #ifdef DO_GZIP
101  z_stream zstr;
102  bool bEof : 1;
103  bool bHasHeader : 1;
104  bool bHasFinished : 1;
105  bool bPlainText : 1;
106  bool bEatTrailer : 1;
107  TQByteArray headerData;
108  int iTrailer;
109 #endif
110 };
111 
112 class HTTPFilterDeflate : public HTTPFilterGZip
113 {
114  TQ_OBJECT
115 public:
116  HTTPFilterDeflate();
117 };
118 
119 #endif

tdeio/httpfilter

Skip menu "tdeio/httpfilter"
  • Main Page
  • File List

tdeio/httpfilter

Skip menu "tdeio/httpfilter"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/httpfilter by doxygen 1.9.1
This website is maintained by Timothy Pearson.