KDocTools
kio_help.h
Go to the documentation of this file.
00001 #ifndef __help_h__ 00002 #define __help_h__ 00003 00004 /* This file is part of the KDE libraries 00005 Copyright (C) 2000 Matthias Hoelzer-Kluepfel <hoelzer@kde.org> 00006 Copyright (C) 2001 Stephan Kulow <coolo@kde.org> 00007 Copyright (C) 2003 Cornelius Schumacher <schumacher@kde.org> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to 00021 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 */ 00024 00025 #include <kio/global.h> 00026 #include <kio/slavebase.h> 00027 00028 #include <QtCore/QString> 00029 00030 #include <sys/types.h> 00031 #include <sys/stat.h> 00032 00033 #include <stdio.h> 00034 #include <unistd.h> 00035 00036 class HelpProtocol : public KIO::SlaveBase 00037 { 00038 public: 00039 00040 HelpProtocol( bool ghelp, const QByteArray &pool, const QByteArray &app); 00041 virtual ~HelpProtocol() { } 00042 00043 virtual void get( const KUrl& url ); 00044 00045 virtual void mimetype( const KUrl& url ); 00046 00047 private: 00048 00049 QString langLookup(const QString &fname); 00050 void emitFile( const KUrl &url ); 00051 void get_file( const KUrl& url ); 00052 QString lookupFile(const QString &fname, const QString &query, 00053 bool &redirect); 00054 00055 void unicodeError( const QString &t ); 00056 00057 QString mParsed; 00058 bool mGhelp; 00059 }; 00060 00061 00062 #endif
KDE 4.6 API Reference