File indexing completed on 2024-12-01 05:20:02

0001 /*
0002     SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org>
0003     SPDX-FileCopyrightText: 2002 Szombathelyi György <gyurco@users.sourceforge.net>
0004     SPDX-FileCopyrightText: 2003 Leo Savernik <l.savernik@aon.at>
0005     SPDX-FileCopyrightText: 2004-2022 Krusader Krew <https://krusader.org>
0006 
0007     This file is heavily based on ktar from kdelibs
0008 
0009     SPDX-License-Identifier: GPL-2.0-or-later
0010 */
0011 
0012 #ifndef ISO_H
0013 #define ISO_H
0014 
0015 // QtCore
0016 #include <QByteArray>
0017 #include <QUrl>
0018 
0019 #include <KIO/SlaveBase>
0020 
0021 #include "kisofile.h"
0022 
0023 class KIso;
0024 
0025 class kio_isoProtocol : public KIO::SlaveBase
0026 {
0027 public:
0028     kio_isoProtocol(const QByteArray &pool, const QByteArray &app);
0029     virtual ~kio_isoProtocol();
0030 
0031     virtual void listDir(const QUrl &url) override;
0032     virtual void stat(const QUrl &url) override;
0033     virtual void get(const QUrl &url) override;
0034 
0035 protected:
0036     void getFile(const KIsoFile *isoFileEntry, const QString &path);
0037     void createUDSEntry(const KArchiveEntry *isoEntry, KIO::UDSEntry &entry);
0038     bool checkNewFile(QString fullPath, QString &path, int startsec);
0039     QString getPath(const QUrl &url);
0040 
0041     KIso *m_isoFile;
0042     time_t m_mtime;
0043     int m_mode;
0044 };
0045 
0046 #endif