Verified Commit d09472c2 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Embed JSON metadata in KIOSlaves

Task: https://phabricator.kde.org/T14518
parent 124b8b8c
......@@ -17,8 +17,4 @@ target_link_libraries(kio_kamera
${GPHOTO2_LIBRARIES}
)
install(TARGETS kio_kamera DESTINATION ${KDE_INSTALL_PLUGINDIR} )
########### install files ###############
install( FILES camera.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
install(TARGETS kio_kamera DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/kio )
{
"KDE-KIO-Protocols": {
"camera": {
"Class": ":local",
"Icon": "camera-photo",
"deleting": true,
"exec": "kf5/kio/kio_kamera",
"input": "none",
"linking": false,
"listing": [
"Name",
"Type"
],
"makedir": false,
"maxInstances": 1,
"moving": false,
"output": "filesystem",
"protocol": "camera",
"reading": true,
"source": true,
"writing": false
}
}
}
[Protocol]
exec=kio_kamera
protocol=camera
input=none
output=filesystem
listing=Name,Type
reading=true
writing=false
deleting=true
source=true
makedir=false
linking=false
moving=false
Icon=camera-photo
maxInstances=1
Class=:local
......@@ -58,6 +58,13 @@ Q_LOGGING_CATEGORY(KAMERA_KIOSLAVE, "kamera.kio")
using namespace KIO;
// Pseudo plugin class to embed meta data
class KIOPluginForMetaData : public QObject
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.kde.kio.slave.camera" FILE "camera.json")
};
extern "C"
{
Q_DECL_EXPORT int kdemain(int argc, char **argv);
......@@ -1199,3 +1206,5 @@ static void frontendCameraStatus(
object->infoMessage(QString::fromLocal8Bit(status));
#endif
}
#include "kamera.moc"
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