Commit 1f863f3d authored by Méven Car's avatar Méven Car
Browse files

Archive Ioslave: convert to json metadata

parent 6be61a4b
......@@ -71,4 +71,3 @@ add_library(kio_archive MODULE kio_archive.cpp kio_archive_debug.cpp)
target_link_libraries(kio_archive KF5::KIOCore KF5::Archive kioarchive Qt5::Network)
set_target_properties(kio_archive PROPERTIES OUTPUT_NAME "archive")
install(TARGETS kio_archive DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio)
install(FILES tar.protocol ar.protocol zip.protocol sevenz.protocol DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
[Protocol]
exec=kf5/kio/archive
protocol=ar
archiveMimetype=application/x-archive
input=filesystem
output=filesystem
listing=Name,Type,Size,Date,Access,Owner,Group,Link
reading=true
source=true
Icon=package-x-generic
Class=:local
{
"KDE-KIO-Protocols": {
"ar": {
"protocol": "ar",
"archiveMimetype": ["application/x-archive"],
"source": true,
"exec": "kf5/kio/archive",
"Icon": "package-x-generic",
"Class":"local",
"listing": [
"Name",
"Type",
"Size",
"Date",
"Access",
"Owner",
"Group",
"Link"
],
"copyFromFile": false,
"copyToFile": true,
"deleting": false,
"linking": false,
"makedir": false,
"moving": false,
"reading": true,
"writing": false
},
"tar": {
"protocol": "tar",
"archiveMimetype": [
"application/x-tar",
"application/x-compressed-tar",
"application/x-bzip-compressed-tar",
"application/x-webarchive",
"application/x-lzma-compressed-tar",
"application/x-xz-compressed-tar"
],
"X-DocPath": "kioslave5/tar/index.html",
"source": true,
"exec": "kf5/kio/archive",
"Icon": "package-x-generic",
"Class":"local",
"listing": [
"Name",
"Type",
"Size",
"Date",
"Access",
"Owner",
"Group",
"Link"
],
"copyFromFile": false,
"copyToFile": true,
"deleting": false,
"linking": false,
"makedir": false,
"moving": false,
"reading": true,
"writing": false
},
"sevenz": {
"protocol": "sevenz",
"archiveMimetype": ["application/x-7z-compressed"],
"source": true,
"exec": "kf5/kio/archive",
"Icon": "package-x-generic",
"Class":"local",
"listing": [
"Name",
"Type",
"Size",
"Date",
"Access",
"Owner",
"Group",
"Link"
],
"copyFromFile": false,
"copyToFile": true,
"deleting": false,
"linking": false,
"makedir": false,
"moving": false,
"reading": true,
"writing": false
},
"zip": {
"protocol": "zip",
"archiveMimetype": ["application/zip"],
"source": true,
"exec": "kf5/kio/archive",
"Icon": "package-x-generic",
"Class":"local",
"listing": [
"Name",
"Type",
"Size",
"Date",
"Access",
"Owner",
"Group",
"Link"
],
"copyFromFile": false,
"copyToFile": true,
"deleting": false,
"linking": false,
"makedir": false,
"moving": false,
"reading": true,
"writing": false
}
}
}
......@@ -29,6 +29,13 @@
#include "kio_archive_debug.h"
// Pseudo plugin class to embed meta data
class KIOPluginForMetaData : public QObject
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.kde.kio.slave.archive" FILE "archive.json")
};
using namespace KIO;
extern "C" { int Q_DECL_EXPORT kdemain(int argc, char **argv); }
......@@ -84,4 +91,7 @@ KArchive *ArchiveProtocol::createArchive( const QString & proto, const QString &
}
}
// needed for JSON file embedding
#include "kio_archive.moc"
// kate: space-indent on; indent-width 4; replace-tabs on;
[Protocol]
exec=kf5/kio/archive
protocol=sevenz
archiveMimetype=application/x-7z-compressed
input=filesystem
output=filesystem
listing=Name,Type,Size,Date,Access,Owner,Group,Link
reading=true
source=true
Icon=package-x-generic
Class=:local
[Protocol]
exec=kf5/kio/archive
protocol=tar
archiveMimetype=application/x-tar,application/x-compressed-tar,application/x-bzip-compressed-tar,application/x-webarchive,application/x-lzma-compressed-tar,application/x-xz-compressed-tar
input=filesystem
output=filesystem
listing=Name,Type,Size,Date,Access,Owner,Group,Link
reading=true
source=true
X-DocPath=kioslave5/tar/index.html
Icon=package-x-generic
Class=:local
[Protocol]
exec=kf5/kio/archive
protocol=zip
archiveMimetype=application/zip
input=filesystem
output=filesystem
listing=Name,Type,Size,Date,Access,Owner,Group,Link
reading=true
source=true
#DocPath=kioslave/zip/index.html
Icon=package-x-generic
Class=:local
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment