Move all generated dbus interfaces to kdeconnectinterfaces exclude them from clazy
* Moves the XML definitions of DBus interfaces and code generation from the different plugins to kdeconnectinterfaces. Before each plugin had their own, some of them duplicated. * Appends `// clazy:skip` to the generated interface files, so Clazy doesn't emit warnings about them because they are missing the NOTIFY/CONSTANT keywords on Q_PROPERTIES. * Makes kdeconnectinterfaces static on Qt5 as well (removes a difference with Qt6). * Moves the generated files to a `generated` directory and updates the includes so they are easily distinguished from other header files.
This commit is contained in:
parent
e1408ef72d
commit
59adbc2da4
22 changed files with 102 additions and 306 deletions
|
@ -1,16 +1,34 @@
|
||||||
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\")
|
add_definitions(-DTRANSLATION_DOMAIN=\"kdeconnect-interfaces\")
|
||||||
|
|
||||||
function(geninterface source_h output_h)
|
# geninterface generates a Qt class that is an interface to DBus
|
||||||
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/generated/${output_h}.xml)
|
# source_file can a DBus XML definition or QObject class header that is exposed through DBus
|
||||||
qt_generate_dbus_interface( ${source_h} ${xml_file})
|
# output_basename is the path and filename that will be generated (.h and .cpp will be appended to this)
|
||||||
|
# The new targets are appended to the ${interfaces_SRC} variable in the parent scope.
|
||||||
|
function(geninterface source_file output_basename)
|
||||||
|
if(${source_file} MATCHES ".*\.xml$")
|
||||||
|
set(xml_file ${source_file})
|
||||||
|
else()
|
||||||
|
set(xml_file ${CMAKE_CURRENT_BINARY_DIR}/${output_basename}.xml)
|
||||||
|
qt_generate_dbus_interface(${source_file} ${xml_file})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Fixes "redefinition of 'MediaPlayer2' as different kind of symbol"
|
||||||
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
set_source_files_properties(${xml_file} PROPERTIES NO_NAMESPACE true)
|
||||||
|
|
||||||
qt_add_dbus_interface(libkdeconnect_SRC ${xml_file} generated/${output_h})
|
qt_add_dbus_interface(generated_sources ${xml_file} ${output_basename})
|
||||||
set(libkdeconnect_SRC ${libkdeconnect_SRC} PARENT_SCOPE)
|
|
||||||
|
# Hack to append clazy:skip to generated files
|
||||||
|
set(fake_file ${output_basename}_replaced)
|
||||||
|
add_custom_command(OUTPUT ${fake_file}
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E echo "// clazy:skip" >> ${output_basename}.h
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E touch ${fake_file}
|
||||||
|
DEPENDS ${output_basename}.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(interfaces_SRC ${interfaces_SRC} ${generated_sources} ${fake_file} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
set(libkdeconnect_SRC
|
set(interfaces_SRC
|
||||||
dbusinterfaces.cpp
|
dbusinterfaces.cpp
|
||||||
devicesmodel.cpp
|
devicesmodel.cpp
|
||||||
notificationsmodel.cpp
|
notificationsmodel.cpp
|
||||||
|
@ -23,36 +41,44 @@ set(libkdeconnect_SRC
|
||||||
commandsmodel.cpp
|
commandsmodel.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h daemoninterface)
|
# KDE Connect interfaces
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/core/device.h deviceinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/core/daemon.h generated/daemoninterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/battery/batteryplugin.h batteryinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/core/device.h generated/deviceinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/connectivity-report/connectivity_reportplugin.h connectivityinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/battery/batteryplugin.h generated/batteryinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/sftp/sftpplugin.h devicesftpinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/connectivity-report/connectivity_reportplugin.h generated/connectivityinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notificationsplugin.h devicenotificationsinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sftp/sftpplugin.h generated/devicesftpinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h devicefindmyphoneinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notificationsplugin.h generated/devicenotificationsinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notification.h notificationinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/findmyphone/findmyphoneplugin.h generated/devicefindmyphoneinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h mprisremoteinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/notifications/notification.h generated/notificationinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h remotecontrolinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/mprisremote/mprisremoteplugin.h generated/mprisremoteinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h lockdeviceinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecontrol/remotecontrolplugin.h generated/remotecontrolinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h remotecommandsinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/lockdevice/lockdeviceplugin.h generated/lockdeviceinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h remotekeyboardinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotecommands/remotecommandsplugin.h generated/remotecommandsinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/smsplugin.h smsinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotekeyboard/remotekeyboardplugin.h generated/remotekeyboardinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h conversationsinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/smsplugin.h generated/smsinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/share/shareplugin.h shareinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/sms/conversationsdbusinterface.h generated/conversationsinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h remotesystemvolumeinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/share/shareplugin.h generated/shareinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/bigscreen/bigscreenplugin.h bigscreeninterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/remotesystemvolume/remotesystemvolumeplugin.h generated/remotesystemvolumeinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/virtualmonitor/virtualmonitorplugin.h virtualmonitorinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/bigscreen/bigscreenplugin.h generated/bigscreeninterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/photo/photoplugin.h photointerface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/virtualmonitor/virtualmonitorplugin.h generated/virtualmonitorinterface)
|
||||||
geninterface(${PROJECT_SOURCE_DIR}/plugins/clipboard/clipboardplugin.h deviceclipboardinterface)
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/photo/photoplugin.h generated/photointerface)
|
||||||
|
geninterface(${PROJECT_SOURCE_DIR}/plugins/clipboard/clipboardplugin.h generated/deviceclipboardinterface)
|
||||||
|
|
||||||
if ("${QT_MAJOR_VERSION}" STREQUAL "6")
|
# System dbus interfaces
|
||||||
add_library(kdeconnectinterfaces STATIC)
|
if (UNIX AND NOT APPLE)
|
||||||
set_property(TARGET kdeconnectinterfaces PROPERTY POSITION_INDEPENDENT_CODE ON)
|
geninterface(systeminterfaces/org.freedesktop.login1.xml generated/systeminterfaces/login1)
|
||||||
else()
|
geninterface(systeminterfaces/org.freedesktop.ScreenSaver.xml generated/systeminterfaces/screensaver)
|
||||||
add_library(kdeconnectinterfaces)
|
geninterface(systeminterfaces/org.freedesktop.DBus.Properties.xml generated/systeminterfaces/dbusproperties)
|
||||||
|
geninterface(systeminterfaces/org.mpris.MediaPlayer2.Player.xml generated/systeminterfaces/mprisplayer)
|
||||||
|
geninterface(systeminterfaces/org.mpris.MediaPlayer2.xml generated/systeminterfaces/mprisroot)
|
||||||
|
geninterface(systeminterfaces/org.freedesktop.portal.RemoteDesktop.xml generated/systeminterfaces/remotedesktop)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(kdeconnectinterfaces PRIVATE ${libkdeconnect_SRC})
|
add_library(kdeconnectinterfaces STATIC)
|
||||||
|
set_property(TARGET kdeconnectinterfaces PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
|
|
||||||
|
target_sources(kdeconnectinterfaces PRIVATE ${interfaces_SRC})
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kdeconnectinterfaces
|
ecm_qt_declare_logging_category(kdeconnectinterfaces
|
||||||
HEADER interfaces_conversation_message_debug.h
|
HEADER interfaces_conversation_message_debug.h
|
||||||
IDENTIFIER CONVERSATION_MESSAGE_LOGGING_CATEGORY CATEGORY_NAME kdeconnect.interfaces.conversationmessage
|
IDENTIFIER CONVERSATION_MESSAGE_LOGGING_CATEGORY CATEGORY_NAME kdeconnect.interfaces.conversationmessage
|
||||||
|
@ -71,10 +97,6 @@ set_target_properties(kdeconnectinterfaces PROPERTIES
|
||||||
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
SOVERSION ${KDECONNECT_VERSION_MAJOR}
|
||||||
)
|
)
|
||||||
|
|
||||||
# pretend the dbus generated headers are from the system so that clazy and other similar
|
|
||||||
# tools do not show warnings about their contents
|
|
||||||
target_include_directories(kdeconnectinterfaces SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/generated)
|
|
||||||
|
|
||||||
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
generate_export_header(kdeconnectinterfaces EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectinterfaces_export.h BASE_NAME KDEConnectInterfaces)
|
||||||
|
|
||||||
target_link_libraries(kdeconnectinterfaces
|
target_link_libraries(kdeconnectinterfaces
|
||||||
|
|
|
@ -9,27 +9,27 @@
|
||||||
|
|
||||||
#include "kdeconnectinterfaces_export.h"
|
#include "kdeconnectinterfaces_export.h"
|
||||||
|
|
||||||
#include "batteryinterface.h"
|
#include "generated/batteryinterface.h"
|
||||||
#include "bigscreeninterface.h"
|
#include "generated/bigscreeninterface.h"
|
||||||
#include "connectivityinterface.h"
|
#include "generated/connectivityinterface.h"
|
||||||
#include "conversationsinterface.h"
|
#include "generated/conversationsinterface.h"
|
||||||
#include "daemoninterface.h"
|
#include "generated/daemoninterface.h"
|
||||||
#include "deviceclipboardinterface.h"
|
#include "generated/deviceclipboardinterface.h"
|
||||||
#include "devicefindmyphoneinterface.h"
|
#include "generated/devicefindmyphoneinterface.h"
|
||||||
#include "deviceinterface.h"
|
#include "generated/deviceinterface.h"
|
||||||
#include "devicenotificationsinterface.h"
|
#include "generated/devicenotificationsinterface.h"
|
||||||
#include "devicesftpinterface.h"
|
#include "generated/devicesftpinterface.h"
|
||||||
#include "lockdeviceinterface.h"
|
#include "generated/lockdeviceinterface.h"
|
||||||
#include "mprisremoteinterface.h"
|
#include "generated/mprisremoteinterface.h"
|
||||||
#include "notificationinterface.h"
|
#include "generated/notificationinterface.h"
|
||||||
#include "photointerface.h"
|
#include "generated/photointerface.h"
|
||||||
#include "remotecommandsinterface.h"
|
#include "generated/remotecommandsinterface.h"
|
||||||
#include "remotecontrolinterface.h"
|
#include "generated/remotecontrolinterface.h"
|
||||||
#include "remotekeyboardinterface.h"
|
#include "generated/remotekeyboardinterface.h"
|
||||||
#include "remotesystemvolumeinterface.h"
|
#include "generated/remotesystemvolumeinterface.h"
|
||||||
#include "shareinterface.h"
|
#include "generated/shareinterface.h"
|
||||||
#include "smsinterface.h"
|
#include "generated/smsinterface.h"
|
||||||
#include "virtualmonitorinterface.h"
|
#include "generated/virtualmonitorinterface.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Using these "proxy" classes just in case we need to rename the
|
* Using these "proxy" classes just in case we need to rename the
|
||||||
|
|
|
@ -42,39 +42,5 @@
|
||||||
<method name="configure"/>
|
<method name="configure"/>
|
||||||
<signal name="AboutToLock"/>
|
<signal name="AboutToLock"/>
|
||||||
</interface>
|
</interface>
|
||||||
<interface name="org.freedesktop.DBus.Properties">
|
|
||||||
<method name="Get">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg name="value" type="v" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="Set">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="property_name" type="s" direction="in"/>
|
|
||||||
<arg name="value" type="v" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetAll">
|
|
||||||
<arg name="interface_name" type="s" direction="in"/>
|
|
||||||
<arg name="values" type="a{sv}" direction="out"/>
|
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
|
||||||
</method>
|
|
||||||
<signal name="PropertiesChanged">
|
|
||||||
<arg name="interface_name" type="s" direction="out"/>
|
|
||||||
<arg name="changed_properties" type="a{sv}" direction="out"/>
|
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
|
|
||||||
<arg name="invalidated_properties" type="as" direction="out"/>
|
|
||||||
</signal>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Introspectable">
|
|
||||||
<method name="Introspect">
|
|
||||||
<arg name="xml_data" type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
<interface name="org.freedesktop.DBus.Peer">
|
|
||||||
<method name="Ping"/>
|
|
||||||
<method name="GetMachineId">
|
|
||||||
<arg name="machine_uuid" type="s" direction="out"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
</node>
|
</node>
|
||||||
|
|
|
@ -105,4 +105,3 @@
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
|
|
@ -38,4 +38,3 @@
|
||||||
|
|
||||||
</interface>
|
</interface>
|
||||||
</node>
|
</node>
|
||||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
|
|
@ -4,4 +4,8 @@ set(kdeconnect_bigscreen_SRCS
|
||||||
|
|
||||||
kdeconnect_add_plugin(kdeconnect_bigscreen SOURCES ${kdeconnect_bigscreen_SRCS})
|
kdeconnect_add_plugin(kdeconnect_bigscreen SOURCES ${kdeconnect_bigscreen_SRCS})
|
||||||
|
|
||||||
target_link_libraries(kdeconnect_bigscreen kdeconnectcore Qt${QT_MAJOR_VERSION}::DBus KF${QT_MAJOR_VERSION}::I18n)
|
target_link_libraries(kdeconnect_bigscreen
|
||||||
|
kdeconnectcore
|
||||||
|
kdeconnectinterfaces
|
||||||
|
Qt${QT_MAJOR_VERSION}::DBus
|
||||||
|
KF${QT_MAJOR_VERSION}::I18n)
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
qt_add_dbus_interface(lockdevice_SRCS org.freedesktop.login1.xml login1dbusinterface)
|
|
||||||
qt_add_dbus_interface(lockdevice_SRCS org.freedesktop.DBus.Properties.xml propertiesdbusinterface)
|
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
list(APPEND lockdevice_SRCS lockdeviceplugin-win.cpp)
|
list(APPEND lockdevice_SRCS lockdeviceplugin-win.cpp)
|
||||||
else ()
|
else ()
|
||||||
|
@ -14,8 +11,10 @@ ecm_qt_declare_logging_category(kdeconnect_lockdevice
|
||||||
IDENTIFIER KDECONNECT_PLUGIN_LOCKREMOTE CATEGORY_NAME kdeconnect.plugin.lock
|
IDENTIFIER KDECONNECT_PLUGIN_LOCKREMOTE CATEGORY_NAME kdeconnect.plugin.lock
|
||||||
DEFAULT_SEVERITY Warning
|
DEFAULT_SEVERITY Warning
|
||||||
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin lockremote)")
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin lockremote)")
|
||||||
|
|
||||||
target_link_libraries(kdeconnect_lockdevice
|
target_link_libraries(kdeconnect_lockdevice
|
||||||
kdeconnectcore
|
kdeconnectcore
|
||||||
|
kdeconnectinterfaces
|
||||||
Qt::DBus
|
Qt::DBus
|
||||||
KF${QT_MAJOR_VERSION}::I18n
|
KF${QT_MAJOR_VERSION}::I18n
|
||||||
)
|
)
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
#include <core/kdeconnectplugin.h>
|
#include <core/kdeconnectplugin.h>
|
||||||
|
|
||||||
#include "login1dbusinterface.h"
|
#include "generated/systeminterfaces/dbusproperties.h"
|
||||||
#include "propertiesdbusinterface.h"
|
#include "generated/systeminterfaces/login1.h"
|
||||||
|
|
||||||
#define PACKET_TYPE_LOCK QStringLiteral("kdeconnect.lock")
|
#define PACKET_TYPE_LOCK QStringLiteral("kdeconnect.lock")
|
||||||
#define PACKET_TYPE_LOCK_REQUEST QStringLiteral("kdeconnect.lock.request")
|
#define PACKET_TYPE_LOCK_REQUEST QStringLiteral("kdeconnect.lock.request")
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
|
||||||
<node>
|
|
||||||
<interface name="org.freedesktop.ScreenSaver">
|
|
||||||
<signal name="ActiveChanged">
|
|
||||||
<arg type="b"/>
|
|
||||||
</signal>
|
|
||||||
<method name="Lock">
|
|
||||||
</method>
|
|
||||||
<method name="SimulateUserActivity">
|
|
||||||
</method>
|
|
||||||
<method name="GetActive">
|
|
||||||
<arg type="b" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetActiveTime">
|
|
||||||
<arg name="seconds" type="u" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetSessionIdleTime">
|
|
||||||
<arg name="seconds" type="u" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="SetActive">
|
|
||||||
<arg type="b" direction="out"/>
|
|
||||||
<arg name="e" type="b" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="Inhibit">
|
|
||||||
<arg name="application_name" type="s" direction="in"/>
|
|
||||||
<arg name="reason_for_inhibit" type="s" direction="in"/>
|
|
||||||
<arg name="cookie" type="u" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="UnInhibit">
|
|
||||||
<arg name="cookie" type="u" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<method name="Throttle">
|
|
||||||
<arg name="application_name" type="s" direction="in"/>
|
|
||||||
<arg name="reason_for_inhibit" type="s" direction="in"/>
|
|
||||||
<arg name="cookie" type="u" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="UnThrottle">
|
|
||||||
<arg name="cookie" type="u" direction="in"/>
|
|
||||||
</method>
|
|
||||||
</interface>
|
|
||||||
</node>
|
|
|
@ -1,12 +1,6 @@
|
||||||
kdeconnect_add_plugin(kdeconnect_mousepad SOURCES mousepadplugin.cpp abstractremoteinput.cpp)
|
kdeconnect_add_plugin(kdeconnect_mousepad SOURCES mousepadplugin.cpp abstractremoteinput.cpp)
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if(UNIX AND NOT APPLE)
|
||||||
qt_add_dbus_interface(
|
|
||||||
SRCS
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/xdp_dbus_remotedesktop_interface.xml
|
|
||||||
xdp_dbus_remotedesktop_interface
|
|
||||||
)
|
|
||||||
|
|
||||||
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp ${SRCS})
|
target_sources(kdeconnect_mousepad PUBLIC waylandremoteinput.cpp ${SRCS})
|
||||||
|
|
||||||
target_sources(kdeconnect_mousepad PRIVATE ${wayland_SRCS})
|
target_sources(kdeconnect_mousepad PRIVATE ${wayland_SRCS})
|
||||||
|
@ -32,7 +26,7 @@ endif()
|
||||||
|
|
||||||
configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h)
|
configure_file(config-mousepad.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-mousepad.h)
|
||||||
|
|
||||||
target_link_libraries(kdeconnect_mousepad kdeconnectcore Qt::Gui KF${QT_MAJOR_VERSION}::I18n)
|
target_link_libraries(kdeconnect_mousepad kdeconnectcore kdeconnectinterfaces Qt::Gui KF${QT_MAJOR_VERSION}::I18n)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp)
|
target_sources(kdeconnect_mousepad PUBLIC windowsremoteinput.cpp)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "abstractremoteinput.h"
|
#include "abstractremoteinput.h"
|
||||||
#include "xdp_dbus_remotedesktop_interface.h"
|
#include "generated/systeminterfaces/remotedesktop.h"
|
||||||
#include <QDBusObjectPath>
|
#include <QDBusObjectPath>
|
||||||
|
|
||||||
class FakeInput;
|
class FakeInput;
|
||||||
|
|
|
@ -6,18 +6,6 @@ else()
|
||||||
set(kdeconnect_mpriscontrol_SRCS
|
set(kdeconnect_mpriscontrol_SRCS
|
||||||
mpriscontrolplugin.cpp
|
mpriscontrolplugin.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set_source_files_properties(
|
|
||||||
org.freedesktop.DBus.Properties.xml
|
|
||||||
org.mpris.MediaPlayer2.Player.xml
|
|
||||||
org.mpris.MediaPlayer2.xml
|
|
||||||
PROPERTIES
|
|
||||||
NO_NAMESPACE ON)
|
|
||||||
|
|
||||||
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.freedesktop.DBus.Properties.xml dbusproperties)
|
|
||||||
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer)
|
|
||||||
qt_add_dbus_interface(kdeconnect_mpriscontrol_SRCS org.mpris.MediaPlayer2.xml mprisroot)
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS})
|
kdeconnect_add_plugin(kdeconnect_mpriscontrol SOURCES ${kdeconnect_mpriscontrol_SRCS})
|
||||||
|
@ -27,9 +15,10 @@ ecm_qt_declare_logging_category(kdeconnect_mpriscontrol
|
||||||
IDENTIFIER KDECONNECT_PLUGIN_MPRIS CATEGORY_NAME kdeconnect.plugin.mpris
|
IDENTIFIER KDECONNECT_PLUGIN_MPRIS CATEGORY_NAME kdeconnect.plugin.mpris
|
||||||
DEFAULT_SEVERITY Warning
|
DEFAULT_SEVERITY Warning
|
||||||
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mpris)")
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin mpris)")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp)
|
target_link_libraries(kdeconnect_mpriscontrol kdeconnectcore windowsapp)
|
||||||
target_compile_features(kdeconnect_mpriscontrol PUBLIC cxx_std_17)
|
target_compile_features(kdeconnect_mpriscontrol PUBLIC cxx_std_17)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore)
|
target_link_libraries(kdeconnect_mpriscontrol Qt::DBus kdeconnectcore kdeconnectinterfaces)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
#include <dbushelper.h>
|
#include <dbushelper.h>
|
||||||
|
|
||||||
#include "dbusproperties.h"
|
#include "generated/systeminterfaces/dbusproperties.h"
|
||||||
#include "mprisplayer.h"
|
#include "generated/systeminterfaces/mprisplayer.h"
|
||||||
#include "mprisroot.h"
|
#include "generated/systeminterfaces/mprisroot.h"
|
||||||
#include "plugin_mpris_debug.h"
|
#include "plugin_mpris_debug.h"
|
||||||
|
|
||||||
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
|
K_PLUGIN_CLASS_WITH_JSON(MprisControlPlugin, "kdeconnect_mpriscontrol.json")
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
<?xml version="1.0" ?>
|
|
||||||
<node>
|
|
||||||
<interface name="org.freedesktop.DBus.Properties">
|
|
||||||
<method name="Get">
|
|
||||||
<arg type="s" name="interface_name" direction="in"/>
|
|
||||||
<arg type="s" name="property_name" direction="in"/>
|
|
||||||
<arg type="v" name="value" direction="out"/>
|
|
||||||
</method>
|
|
||||||
<method name="GetAll">
|
|
||||||
<arg type="s" name="interface_name" direction="in"/>
|
|
||||||
<arg type="a{sv}" name="properties" direction="out"/>
|
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
|
||||||
</method>
|
|
||||||
<method name="Set">
|
|
||||||
<arg type="s" name="interface_name" direction="in"/>
|
|
||||||
<arg type="s" name="property_name" direction="in"/>
|
|
||||||
<arg type="v" name="value" direction="in"/>
|
|
||||||
</method>
|
|
||||||
<signal name="PropertiesChanged">
|
|
||||||
<arg type="s" name="interface_name"/>
|
|
||||||
<arg type="a{sv}" name="changed_properties"/>
|
|
||||||
<arg type="as" name="invalidated_properties"/>
|
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMap"/>
|
|
||||||
</signal>
|
|
||||||
</interface>
|
|
||||||
</node>
|
|
||||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
|
|
@ -8,8 +8,6 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
qt_add_dbus_interface(kdeconnect_pausemusic_SRCS org.mpris.MediaPlayer2.Player.xml mprisplayer)
|
|
||||||
|
|
||||||
kdeconnect_add_plugin(kdeconnect_pausemusic SOURCES ${kdeconnect_pausemusic_SRCS})
|
kdeconnect_add_plugin(kdeconnect_pausemusic SOURCES ${kdeconnect_pausemusic_SRCS})
|
||||||
|
|
||||||
ecm_qt_declare_logging_category(kdeconnect_pausemusic
|
ecm_qt_declare_logging_category(kdeconnect_pausemusic
|
||||||
|
@ -17,8 +15,10 @@ ecm_qt_declare_logging_category(kdeconnect_pausemusic
|
||||||
IDENTIFIER KDECONNECT_PLUGIN_PAUSEMUSIC CATEGORY_NAME kdeconnect.plugin.pausemusic
|
IDENTIFIER KDECONNECT_PLUGIN_PAUSEMUSIC CATEGORY_NAME kdeconnect.plugin.pausemusic
|
||||||
DEFAULT_SEVERITY Warning
|
DEFAULT_SEVERITY Warning
|
||||||
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin pausemusic)")
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin pausemusic)")
|
||||||
|
|
||||||
target_link_libraries(kdeconnect_pausemusic
|
target_link_libraries(kdeconnect_pausemusic
|
||||||
kdeconnectcore
|
kdeconnectcore
|
||||||
|
kdeconnectinterfaces
|
||||||
Qt::Core
|
Qt::Core
|
||||||
Qt::DBus
|
Qt::DBus
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,108 +0,0 @@
|
||||||
<?xml version="1.0" ?>
|
|
||||||
<node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
|
|
||||||
<interface name="org.mpris.MediaPlayer2.Player">
|
|
||||||
<method name="Next" tp:name-for-bindings="Next">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="Previous" tp:name-for-bindings="Previous">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="Pause" tp:name-for-bindings="Pause">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="PlayPause" tp:name-for-bindings="PlayPause">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="Stop" tp:name-for-bindings="Stop">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="Play" tp:name-for-bindings="Play">
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="Seek" tp:name-for-bindings="Seek">
|
|
||||||
<arg direction="in" type="x" name="Offset" tp:type="Time_In_Us">
|
|
||||||
</arg>
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="SetPosition" tp:name-for-bindings="Set_Position">
|
|
||||||
<arg direction="in" type="o" tp:type="Track_Id" name="TrackId">
|
|
||||||
</arg>
|
|
||||||
<arg direction="in" type="x" tp:type="Time_In_Us" name="Position">
|
|
||||||
</arg>
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<method name="OpenUri" tp:name-for-bindings="Open_Uri">
|
|
||||||
<arg direction="in" type="s" tp:type="Uri" name="Uri">
|
|
||||||
</arg>
|
|
||||||
</method>
|
|
||||||
|
|
||||||
<property name="PlaybackStatus" tp:name-for-bindings="Playback_Status" type="s" tp:type="Playback_Status" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="LoopStatus" type="s" access="readwrite"
|
|
||||||
tp:name-for-bindings="Loop_Status" tp:type="Loop_Status">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Rate" tp:name-for-bindings="Rate" type="d" tp:type="Playback_Rate" access="readwrite">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Shuffle" tp:name-for-bindings="Shuffle" type="b" access="readwrite">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Metadata" tp:name-for-bindings="Metadata" type="a{sv}" tp:type="Metadata_Map" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Volume" type="d" tp:type="Volume" tp:name-for-bindings="Volume" access="readwrite">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true" />
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="Position" type="x" tp:type="Time_In_Us" tp:name-for-bindings="Position" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="MinimumRate" tp:name-for-bindings="Minimum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="MaximumRate" tp:name-for-bindings="Maximum_Rate" type="d" tp:type="Playback_Rate" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanGoNext" tp:name-for-bindings="Can_Go_Next" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanGoPrevious" tp:name-for-bindings="Can_Go_Previous" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanPlay" tp:name-for-bindings="Can_Play" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanPause" tp:name-for-bindings="Can_Pause" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanSeek" tp:name-for-bindings="Can_Seek" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<property name="CanControl" tp:name-for-bindings="Can_Control" type="b" access="read">
|
|
||||||
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="false"/>
|
|
||||||
</property>
|
|
||||||
|
|
||||||
<signal name="Seeked" tp:name-for-bindings="Seeked">
|
|
||||||
<arg name="Position" type="x" tp:type="Time_In_Us">
|
|
||||||
</arg>
|
|
||||||
</signal>
|
|
||||||
|
|
||||||
</interface>
|
|
||||||
</node>
|
|
||||||
<!-- vim:set sw=2 sts=2 et ft=xml: -->
|
|
|
@ -10,7 +10,7 @@
|
||||||
#include <PulseAudioQt/Context>
|
#include <PulseAudioQt/Context>
|
||||||
#include <PulseAudioQt/Sink>
|
#include <PulseAudioQt/Sink>
|
||||||
|
|
||||||
#include "mprisplayer.h"
|
#include "generated/systeminterfaces/mprisplayer.h"
|
||||||
#include <dbushelper.h>
|
#include <dbushelper.h>
|
||||||
|
|
||||||
#include "plugin_pausemusic_debug.h"
|
#include "plugin_pausemusic_debug.h"
|
||||||
|
|
|
@ -10,7 +10,6 @@ else()
|
||||||
set(kdeconnect_screensaver_inhibit_SRCS
|
set(kdeconnect_screensaver_inhibit_SRCS
|
||||||
screensaverinhibitplugin.cpp
|
screensaverinhibitplugin.cpp
|
||||||
)
|
)
|
||||||
qt_add_dbus_interface(kdeconnect_screensaver_inhibit_SRCS org.freedesktop.ScreenSaver.xml screensaverinterface)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +20,8 @@ ecm_qt_declare_logging_category(kdeconnect_screensaver_inhibit
|
||||||
IDENTIFIER KDECONNECT_PLUGIN_SCREENSAVERINHIBIT CATEGORY_NAME kdeconnect.plugin.screensaverinhibit
|
IDENTIFIER KDECONNECT_PLUGIN_SCREENSAVERINHIBIT CATEGORY_NAME kdeconnect.plugin.screensaverinhibit
|
||||||
DEFAULT_SEVERITY Warning
|
DEFAULT_SEVERITY Warning
|
||||||
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin screensaverinhibit)")
|
EXPORT kdeconnect-kde DESCRIPTION "kdeconnect (plugin screensaverinhibit)")
|
||||||
target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore)
|
|
||||||
|
target_link_libraries(kdeconnect_screensaver_inhibit kdeconnectcore kdeconnectinterfaces)
|
||||||
if(NOT APPLE AND NOT WIN32)
|
if(NOT APPLE AND NOT WIN32)
|
||||||
target_link_libraries(kdeconnect_screensaver_inhibit
|
target_link_libraries(kdeconnect_screensaver_inhibit
|
||||||
Qt::DBus
|
Qt::DBus
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
|
|
||||||
#include "screensaverinhibitplugin.h"
|
#include "screensaverinhibitplugin.h"
|
||||||
|
|
||||||
|
#include "generated/systeminterfaces/screensaver.h"
|
||||||
#include "kdeconnect_screensaverinhibit_debug.h"
|
#include "kdeconnect_screensaverinhibit_debug.h"
|
||||||
#include "screensaverinterface.h"
|
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
|
|
Loading…
Reference in a new issue