Changeset View
Changeset View
Standalone View
Standalone View
archive/kio_archive.h
- This file was copied to archive/kio_archivebase.h.
Show All 14 Lines | 1 | /* This file is part of the KDE libraries | |||
---|---|---|---|---|---|
15 | along with this library; see the file COPYING.LIB. If not, write to | 15 | along with this library; see the file COPYING.LIB. If not, write to | ||
16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | Boston, MA 02110-1301, USA. | 17 | Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #ifndef KIO_ARCHIVE_H | 20 | #ifndef KIO_ARCHIVE_H | ||
21 | #define KIO_ARCHIVE_H | 21 | #define KIO_ARCHIVE_H | ||
22 | 22 | | |||
23 | #include <sys/types.h> | 23 | #include "kio_archivebase.h" | ||
24 | 24 | | |||
25 | #include <kio/global.h> | 25 | class ArchiveProtocol : public ArchiveProtocolBase | ||
26 | #include <kio/slavebase.h> | | |||
27 | | ||||
28 | class KArchive; | | |||
29 | class KArchiveEntry; | | |||
30 | | ||||
31 | class ArchiveProtocol : public KIO::SlaveBase | | |||
32 | { | 26 | { | ||
33 | public: | 27 | public: | ||
34 | ArchiveProtocol( const QByteArray &pool, const QByteArray &app ); | 28 | ArchiveProtocol( const QByteArray &proto, const QByteArray &pool, const QByteArray &app ); | ||
35 | virtual ~ArchiveProtocol(); | 29 | virtual ~ArchiveProtocol() = default; | ||
36 | | ||||
37 | virtual void listDir( const QUrl & url ); | | |||
38 | virtual void stat( const QUrl & url ); | | |||
39 | virtual void get( const QUrl & url ); | | |||
40 | | ||||
41 | private: | | |||
42 | void createRootUDSEntry( KIO::UDSEntry & entry ); | | |||
43 | void createUDSEntry( const KArchiveEntry * tarEntry, KIO::UDSEntry & entry ); | | |||
44 | | ||||
45 | /** | | |||
46 | * \brief find, check and open the archive file | | |||
47 | * \param url The URL of the archive | | |||
48 | * \param path Path where the archive really is (returned value) | | |||
49 | * \param errNum KIO error number (undefined if the function returns true) | | |||
50 | * \return true if file was found, false if there was an error | | |||
51 | */ | | |||
52 | bool checkNewFile( const QUrl & url, QString & path, KIO::Error& errorNum ); | | |||
53 | 30 | | |||
54 | KArchive * m_archiveFile; | 31 | KArchive *createArchive( const QString & proto, const QString & archiveFile ) Q_DECL_OVERRIDE; | ||
55 | QString m_archiveName; | | |||
56 | QString m_user, m_group; | | |||
57 | time_t m_mtime; | | |||
58 | }; | 32 | }; | ||
59 | 33 | | |||
60 | #endif // KIO_ARCHIVE_H | 34 | #endif // KIO_ARCHIVE_H |