# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# decoder.h

    00001 /*
    00002     This file is part of the KDE libraries
    00003
    00004     Copyright (C) 1999 Lars Knoll (knoll@mpi-hd.mpg.de)
    00005
    00006     This library is free software; you can redistribute it and/or
    00007     modify it under the terms of the GNU Library General Public
    00008     License as published by the Free Software Foundation; either
    00009     version 2 of the License, or (at your option) any later version.
    00010
    00011     This library is distributed in the hope that it will be useful,
    00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014     Library General Public License for more details.
    00015
    00016     You should have received a copy of the GNU Library General Public License
    00017     along with this library; see the file COPYING.LIB.  If not, write to
    00018     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00019     Boston, MA 02111-1307, USA.
    00020
    00021     $Id: decoder.h,v 1.14.10.1 2003/05/18 12:34:39 mueller Exp $
    00022 */
    00023 #ifndef KHTMLDECODER_H
    00024 #define KHTMLDECODER_H
    00025
    00026 #include <qstring.h>
    00027 class QTextCodec;
    00028 class QTextDecoder;
    00029
    00030 namespace khtml {
    00034 class Decoder
    00035 {
    00036 public:
    00037     Decoder();
    00038     ~Decoder();
    00039
    00040     void setEncoding(const char *encoding, bool force = false);
    00041     const char *encoding() const;
    00042
    00043     QString decode(const char *data, int len);
    00044
    00045     bool visuallyOrdered() const { return visualRTL; }
    00046
    00047     const QTextCodec *codec() const { return m_codec; }
    00048
    00049     QString flush() const;
    00050
    00051 protected:
    00052     // codec used for decoding. default is Latin1.
    00053     QTextCodec *m_codec;
    00054     QTextDecoder *m_decoder; // only used for utf16
    00055     QCString enc;
    00056
    00057     QCString buffer;
    00058
    00059     bool body;
    00060     bool beginning;
    00061     bool visualRTL;
    00062     bool haveEncoding;
    00063 };
    00064
    00065 }
    00066 #endif

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:35 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001