<table><tr><td style="">marten created this revision.<br />Restricted Application added a project: Plasma.<br />Restricted Application added a subscriber: plasma-devel.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5112" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The tar, zip and ar ioslaves are implemented in kio-extras/archive by a single plugin (class ArchiveProtocol).  This uses the URL scheme to determine which archive decoder to use - KTar, KZip or KAr all from the KArchive (tier 1) framework.  Unfortunately, it is not possible to use this ioslave as a base for another archive format plugin to be distributed and built outside of the KDE source tree, because the supported protocols and their decoders are hardcoded in the depths of ArchiveProtocol::checkNewFile().  This means that a new ioslave for another archive format would need to copy and adapt the whole of the ArchiveProtocol source.</p>

<p>This change makes it possible to do that by moving most of ArchiveProtocol into an abstract base class ArchiveProtocolBase, compiled into an library and installed along with its supporting files.  This is not a framework library (and is not ever intended to be), but a support library similar to libkonq.  It calls a virtual function in a derived class to create the KArchive-based decoder depending on the URL scheme.  The ioslave plugin for the existing archive formats is a single derived class (although it could just as easily be three) which is installed in the same way as before.</p>

<p>With this change, it is then possible to build and install an additional out-of-tree ioslave plugin, deriving from ArchiveProtocolBase and using its installed headers and library, without needing any further changes to kio-extras.</p>

<p>The additional files installed are:</p>

<p>lib/cmake/KF5KioArchive/KF5KioArchiveConfig.cmake<br />
lib/cmake/KF5KioArchive/KF5KioArchiveConfigVersion.cmake<br />
lib/cmake/KF5KioArchive/KF5KioArchiveTargets.cmake<br />
lib/cmake/KF5KioArchive/KF5KioArchiveTargets-debug.cmake<br />
include/KF5/kio_archivebase.h<br />
include/KF5/libkioarchive_export.h<br />
lib/libKF5KioArchive.so.5.97.0<br />
lib/libKF5KioArchive.so.6 -> libKF5KioArchive.so.5.97.0<br />
lib/libKF5KioArchive.so -> libKF5KioArchive.so.6</p>

<p>The .so versions are set as for libkonq, although they can easily be changed if required.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Built kio-extras with this change, all autotests pass.<br />
Konqueror operates correctly to browse tar and zip archives.<br />
External archive format plugin builds and works correctly.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5112" rel="noreferrer">https://phabricator.kde.org/D5112</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>archive/CMakeLists.txt<br />
archive/KF5KioArchiveConfig.cmake.in<br />
archive/kio_archive.cpp<br />
archive/kio_archive.h<br />
archive/kio_archivebase.cpp<br />
archive/kio_archivebase.h</div></div></div><br /><div><strong>To: </strong>marten, Plasma, dfaure<br /><strong>Cc: </strong>plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>