kremoteencoding.h
/* This file is part of the KDE libraries
Copyright (C) 2003 Thiago Macieira <thiago.macieira@kdemail.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KREMOTEENCODING_H
#define KREMOTEENCODING_H
#include <kurl.h>
#include <qstring.h>
#include <qcstring.h>
#include <qtextcodec.h>
class KRemoteEncodingPrivate;
class KIO_EXPORT KRemoteEncoding
{
public:
explicit KRemoteEncoding(const char *name = 0L);
virtual ~KRemoteEncoding();
QString decode(const QCString& name) const;
QCString encode(const QString& name) const;
QCString encode(const KURL& url) const;
QCString directory(const KURL& url, bool ignore_trailing_slash = true) const;
QCString fileName(const KURL& url) const;
inline const char *encoding() const
{ return codec->name(); }
inline int encodingMib() const
{ return codec->mibEnum(); }
void setEncoding(const char* name);
protected:
QTextCodec *codec;
virtual void virtual_hook(int id, void* data);
private:
// copy constructor
KRemoteEncoding(const KRemoteEncoding&);
KRemoteEncodingPrivate *d;
};
#endif
KRemoteEncoding::encoding
const char * encoding() const
Returns the encoding being used.
Definition: kremoteencoding.h:96
KRemoteEncoding
Allows encoding and decoding properly remote filenames into Unicode.
Definition: kremoteencoding.h:44
KRemoteEncoding::encodingMib
int encodingMib() const
Returns the MIB for the codec being used.
Definition: kremoteencoding.h:102

KDE Home | KDE Accessibility Home | Description of Access Keys