File indexing completed on 2024-05-05 05:44:46

0001 #ifndef KIO_PERLDOC_H_
0002 #define KIO_PERLDOC_H_
0003 
0004 /*
0005  * perldoc.h
0006  *
0007  * Borrowed from KDevelop's perldoc ioslave, and improved.
0008  * Copyright 2007 Michael Pyne <michael.pyne@kdemail.net>
0009  *
0010  * No copyright header was present in KDevelop's perldoc io slave source
0011  * code.  However, source code revision history indicates it was written and
0012  * imported by Bernd Gehrmann <bernd@mail.berlios.de>.  KDevelop is distributed
0013  * under the terms of the GNU General Public License v2.  Therefore, so is
0014  * this software.
0015  *
0016  * All changes made by Michael Pyne are licensed under the terms of the GNU
0017  * GPL version 2 or (at your option) any later version.
0018  *
0019  * Uses the Pod::HtmlEasy Perl module by M. P. Graciliano and
0020  * Geoffrey Leach.  It is distributed under the same terms as Perl.
0021  * See pod2html.pl for more information.
0022  */
0023 
0024 // KF
0025 #include <KIO/WorkerBase>
0026 
0027 class PerldocProtocol : public KIO::WorkerBase
0028 {
0029 public:
0030     PerldocProtocol(const QByteArray &pool, const QByteArray &app);
0031     ~PerldocProtocol() override;
0032 
0033     KIO::WorkerResult get(const QUrl &url) override;
0034     KIO::WorkerResult stat(const QUrl &url) override;
0035     KIO::WorkerResult listDir(const QUrl &url) override;
0036 
0037     bool topicExists(const QString &topic);
0038 
0039 protected:
0040     QByteArray errorMessage();
0041     KIO::WorkerResult failAndQuit();
0042 
0043     QString m_pod2htmlPath;
0044     QString m_cssLocation;
0045 };
0046 
0047 #endif
0048 
0049 // vim: set et sw=4 ts=8: