From 741abafaf7d8d589abe41bc938e14e75a605cfe9 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sat, 14 Jun 2014 16:34:00 +0200 Subject: [PATCH] =?UTF-8?q?Move=20the=20plugins=20into=20a=20different=20t?= =?UTF-8?q?op-=C4=BAevel=20directory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed by Albert Vaca --- CMakeLists.txt | 3 +++ macros.cmake => cmake/macros.cmake | 0 core/CMakeLists.txt | 11 +++++------ core/device.cpp | 6 +++--- core/{plugins => }/kdeconnectplugin.cpp | 16 ++++++++++++---- core/{plugins => }/kdeconnectplugin.h | 16 +++++++--------- core/{plugins => }/pluginloader.cpp | 4 ++-- core/{plugins => }/pluginloader.h | 0 {core/plugins => plugins}/CMakeLists.txt | 2 +- {core/plugins => plugins}/battery/CMakeLists.txt | 2 +- {core/plugins => plugins}/battery/README | 0 .../battery/batterydbusinterface.cpp | 2 +- .../battery/batterydbusinterface.h | 0 .../battery/batteryplugin.cpp | 2 +- .../plugins => plugins}/battery/batteryplugin.h | 2 +- .../battery/kdeconnect_battery.desktop | 0 .../plugins => plugins}/clipboard/CMakeLists.txt | 0 {core/plugins => plugins}/clipboard/README | 0 .../clipboard/clipboardplugin.cpp | 0 .../clipboard/clipboardplugin.h | 4 +--- .../clipboard/kdeconnect_clipboard.desktop | 0 .../kdeconnect_plugin.desktop | 0 .../mpriscontrol/CMakeLists.txt | 0 {core/plugins => plugins}/mpriscontrol/README | 0 .../mpriscontrol/kdeconnect_mpriscontrol.desktop | 0 .../mpriscontrol/mpriscontrolplugin.cpp | 3 ++- .../mpriscontrol/mpriscontrolplugin.h | 2 +- .../mpriscontrol/mprisdbusinterface.xml | 0 .../mpriscontrol/propertiesInterface.xml | 0 .../notifications/CMakeLists.txt | 2 +- {core/plugins => plugins}/notifications/README | 0 .../kdeconnect_notifications.desktop | 0 .../notifications/notification.cpp | 2 +- .../notifications/notification.h | 2 +- .../notifications/notificationsdbusinterface.cpp | 4 ++-- .../notifications/notificationsdbusinterface.h | 2 +- .../notifications/notificationsplugin.cpp | 2 +- .../notifications/notificationsplugin.h | 2 +- .../pausemusic/CMakeLists.txt | 8 +------- {core/plugins => plugins}/pausemusic/README | 0 .../pausemusic/kdeconnect_pausemusic.desktop | 0 .../kdeconnect_pausemusic_config.desktop | 0 .../pausemusic/pausemusic_config.cpp | 2 +- .../pausemusic/pausemusic_config.h | 0 .../pausemusic/pausemusic_config.ui | 0 .../pausemusic/pausemusicplugin.cpp | 3 ++- .../pausemusic/pausemusicplugin.h | 2 +- {core/plugins => plugins}/ping/CMakeLists.txt | 0 {core/plugins => plugins}/ping/README | 0 .../ping/kdeconnect_ping.desktop | 0 {core/plugins => plugins}/ping/pingplugin.cpp | 3 ++- {core/plugins => plugins}/ping/pingplugin.h | 2 +- {core/plugins => plugins}/sftp/CMakeLists.txt | 2 +- {core/plugins => plugins}/sftp/README | 0 .../sftp/kdeconnect_sftp.desktop | 0 .../sftp/kdeconnect_sftp_config.desktop | 0 {core/plugins => plugins}/sftp/mounter.cpp | 2 +- {core/plugins => plugins}/sftp/mounter.h | 0 {core/plugins => plugins}/sftp/mountloop.cpp | 0 {core/plugins => plugins}/sftp/mountloop.h | 0 {core/plugins => plugins}/sftp/sftp_config.cpp | 2 +- {core/plugins => plugins}/sftp/sftp_config.h | 0 {core/plugins => plugins}/sftp/sftp_config.ui | 0 {core/plugins => plugins}/sftp/sftpplugin.cpp | 2 +- {core/plugins => plugins}/sftp/sftpplugin.h | 3 ++- {core/plugins => plugins}/share/CMakeLists.txt | 0 {core/plugins => plugins}/share/README | 0 .../share/autoclosingqfile.cpp | 0 .../plugins => plugins}/share/autoclosingqfile.h | 2 +- .../share/kdeconnect_share.desktop | 0 .../share/kdeconnect_share_config.desktop | 0 {core/plugins => plugins}/share/share_config.cpp | 2 +- {core/plugins => plugins}/share/share_config.h | 0 {core/plugins => plugins}/share/share_config.ui | 0 {core/plugins => plugins}/share/shareplugin.cpp | 4 ++-- {core/plugins => plugins}/share/shareplugin.h | 2 +- .../plugins => plugins}/telephony/CMakeLists.txt | 0 {core/plugins => plugins}/telephony/README | 0 .../telephony/kdeconnect_telephony.desktop | 0 .../telephony/telephonyplugin.cpp | 2 +- .../telephony/telephonyplugin.h | 2 +- 81 files changed, 70 insertions(+), 66 deletions(-) rename macros.cmake => cmake/macros.cmake (100%) rename core/{plugins => }/kdeconnectplugin.cpp (73%) rename core/{plugins => }/kdeconnectplugin.h (82%) rename core/{plugins => }/pluginloader.cpp (98%) rename core/{plugins => }/pluginloader.h (100%) rename {core/plugins => plugins}/CMakeLists.txt (79%) rename {core/plugins => plugins}/battery/CMakeLists.txt (94%) rename {core/plugins => plugins}/battery/README (100%) rename {core/plugins => plugins}/battery/batterydbusinterface.cpp (97%) rename {core/plugins => plugins}/battery/batterydbusinterface.h (100%) rename {core/plugins => plugins}/battery/batteryplugin.cpp (98%) rename {core/plugins => plugins}/battery/batteryplugin.h (97%) rename {core/plugins => plugins}/battery/kdeconnect_battery.desktop (100%) rename {core/plugins => plugins}/clipboard/CMakeLists.txt (100%) rename {core/plugins => plugins}/clipboard/README (100%) rename {core/plugins => plugins}/clipboard/clipboardplugin.cpp (100%) rename {core/plugins => plugins}/clipboard/clipboardplugin.h (94%) rename {core/plugins => plugins}/clipboard/kdeconnect_clipboard.desktop (100%) rename {core/plugins => plugins}/kdeconnect_plugin.desktop (100%) rename {core/plugins => plugins}/mpriscontrol/CMakeLists.txt (100%) rename {core/plugins => plugins}/mpriscontrol/README (100%) rename {core/plugins => plugins}/mpriscontrol/kdeconnect_mpriscontrol.desktop (100%) rename {core/plugins => plugins}/mpriscontrol/mpriscontrolplugin.cpp (99%) rename {core/plugins => plugins}/mpriscontrol/mpriscontrolplugin.h (98%) rename {core/plugins => plugins}/mpriscontrol/mprisdbusinterface.xml (100%) rename {core/plugins => plugins}/mpriscontrol/propertiesInterface.xml (100%) rename {core/plugins => plugins}/notifications/CMakeLists.txt (96%) rename {core/plugins => plugins}/notifications/README (100%) rename {core/plugins => plugins}/notifications/kdeconnect_notifications.desktop (100%) rename {core/plugins => plugins}/notifications/notification.cpp (97%) rename {core/plugins => plugins}/notifications/notification.h (98%) rename {core/plugins => plugins}/notifications/notificationsdbusinterface.cpp (98%) rename {core/plugins => plugins}/notifications/notificationsdbusinterface.h (98%) rename {core/plugins => plugins}/notifications/notificationsplugin.cpp (98%) rename {core/plugins => plugins}/notifications/notificationsplugin.h (97%) rename {core/plugins => plugins}/pausemusic/CMakeLists.txt (83%) rename {core/plugins => plugins}/pausemusic/README (100%) rename {core/plugins => plugins}/pausemusic/kdeconnect_pausemusic.desktop (100%) rename {core/plugins => plugins}/pausemusic/kdeconnect_pausemusic_config.desktop (100%) rename {core/plugins => plugins}/pausemusic/pausemusic_config.cpp (98%) rename {core/plugins => plugins}/pausemusic/pausemusic_config.h (100%) rename {core/plugins => plugins}/pausemusic/pausemusic_config.ui (100%) rename {core/plugins => plugins}/pausemusic/pausemusicplugin.cpp (98%) rename {core/plugins => plugins}/pausemusic/pausemusicplugin.h (97%) rename {core/plugins => plugins}/ping/CMakeLists.txt (100%) rename {core/plugins => plugins}/ping/README (100%) rename {core/plugins => plugins}/ping/kdeconnect_ping.desktop (100%) rename {core/plugins => plugins}/ping/pingplugin.cpp (97%) rename {core/plugins => plugins}/ping/pingplugin.h (97%) rename {core/plugins => plugins}/sftp/CMakeLists.txt (97%) rename {core/plugins => plugins}/sftp/README (100%) rename {core/plugins => plugins}/sftp/kdeconnect_sftp.desktop (100%) rename {core/plugins => plugins}/sftp/kdeconnect_sftp_config.desktop (100%) rename {core/plugins => plugins}/sftp/mounter.cpp (99%) rename {core/plugins => plugins}/sftp/mounter.h (100%) rename {core/plugins => plugins}/sftp/mountloop.cpp (100%) rename {core/plugins => plugins}/sftp/mountloop.h (100%) rename {core/plugins => plugins}/sftp/sftp_config.cpp (98%) rename {core/plugins => plugins}/sftp/sftp_config.h (100%) rename {core/plugins => plugins}/sftp/sftp_config.ui (100%) rename {core/plugins => plugins}/sftp/sftpplugin.cpp (99%) rename {core/plugins => plugins}/sftp/sftpplugin.h (97%) rename {core/plugins => plugins}/share/CMakeLists.txt (100%) rename {core/plugins => plugins}/share/README (100%) rename {core/plugins => plugins}/share/autoclosingqfile.cpp (100%) rename {core/plugins => plugins}/share/autoclosingqfile.h (97%) rename {core/plugins => plugins}/share/kdeconnect_share.desktop (100%) rename {core/plugins => plugins}/share/kdeconnect_share_config.desktop (100%) rename {core/plugins => plugins}/share/share_config.cpp (98%) rename {core/plugins => plugins}/share/share_config.h (100%) rename {core/plugins => plugins}/share/share_config.ui (100%) rename {core/plugins => plugins}/share/shareplugin.cpp (98%) rename {core/plugins => plugins}/share/shareplugin.h (97%) rename {core/plugins => plugins}/telephony/CMakeLists.txt (100%) rename {core/plugins => plugins}/telephony/README (100%) rename {core/plugins => plugins}/telephony/kdeconnect_telephony.desktop (100%) rename {core/plugins => plugins}/telephony/telephonyplugin.cpp (98%) rename {core/plugins => plugins}/telephony/telephonyplugin.h (97%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f257cc1c0..c2a5dc17d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,8 @@ project(kdeconnect) cmake_minimum_required(VERSION 2.6) +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") + find_package(KDE4 REQUIRED) find_package(QJSON REQUIRED) find_package(QCA2 REQUIRED) @@ -22,6 +24,7 @@ add_subdirectory(icon) add_subdirectory(interfaces) add_subdirectory(kded) +add_subdirectory(plugins) add_subdirectory(plasmoid) add_subdirectory(cli) diff --git a/macros.cmake b/cmake/macros.cmake similarity index 100% rename from macros.cmake rename to cmake/macros.cmake diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 01cd66156..e1e5f9863 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -3,12 +3,10 @@ project(KDEConnectCore) include_directories( ${KDE4_KIO_LIBS} ${QJSON_INCLUDE_DIR} - ${QCA2_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} + ${QCA2_INCLUDE_DIR} ) -add_subdirectory(plugins) - add_subdirectory(backends/lan) add_subdirectory(backends/loopback) @@ -18,8 +16,8 @@ set(kded_kdeconnect_SRCS backends/linkprovider.cpp backends/devicelink.cpp - plugins/kdeconnectplugin.cpp - plugins/pluginloader.cpp + kdeconnectplugin.cpp + pluginloader.cpp networkpackage.cpp filetransferjob.cpp @@ -39,9 +37,10 @@ PRIVATE ${QT_QTNETWORK_LIBRARY} ${QCA2_LIBRARIES} ) +target_include_directories(kdeconnectcore PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) generate_export_header(kdeconnectcore EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/kdeconnectcore_export.h BASE_NAME KDEConnectCore) -include(../macros.cmake) +include(macros) generate_and_install_dbus_interface( kdeconnectcore diff --git a/core/device.cpp b/core/device.cpp index ee13dcc44..3f50ac0c1 100644 --- a/core/device.cpp +++ b/core/device.cpp @@ -36,8 +36,8 @@ #include #include "kdebugnamespace.h" -#include "plugins/kdeconnectplugin.h" -#include "plugins/pluginloader.h" +#include "kdeconnectplugin.h" +#include "pluginloader.h" #include "backends/devicelink.h" #include "backends/linkprovider.h" #include "networkpackage.h" @@ -483,4 +483,4 @@ QString Device::type2str(Device::DeviceType deviceType) { if (deviceType == Phone) return "phone"; if (deviceType == Tablet) return "tablet"; return "unknown"; -} \ No newline at end of file +} diff --git a/core/plugins/kdeconnectplugin.cpp b/core/kdeconnectplugin.cpp similarity index 73% rename from core/plugins/kdeconnectplugin.cpp rename to core/kdeconnectplugin.cpp index d73fb20b3..0288bf72c 100644 --- a/core/plugins/kdeconnectplugin.cpp +++ b/core/kdeconnectplugin.cpp @@ -20,12 +20,20 @@ #include "kdeconnectplugin.h" -#include "../device.h" +struct KdeConnectPluginPrivate +{ + Device* mDevice; + + // The Initializer object sets things up, and also does cleanup when it goes out of scope + // Since the plugins use their own memory, they need their own initializer in order to send encrypted packages + QCA::Initializer init; +}; KdeConnectPlugin::KdeConnectPlugin(QObject* parent, const QVariantList& args) : QObject(parent) + , d(new KdeConnectPluginPrivate) { - mDevice = qvariant_cast< Device* >(args.first()); + d->mDevice = qvariant_cast< Device* >(args.first()); } KdeConnectPlugin::~KdeConnectPlugin() @@ -34,10 +42,10 @@ KdeConnectPlugin::~KdeConnectPlugin() Device* KdeConnectPlugin::device() { - return mDevice; + return d->mDevice; } Device const* KdeConnectPlugin::device() const { - return mDevice; + return d->mDevice; } diff --git a/core/plugins/kdeconnectplugin.h b/core/kdeconnectplugin.h similarity index 82% rename from core/plugins/kdeconnectplugin.h rename to core/kdeconnectplugin.h index d17f3dfe6..3753c9cae 100644 --- a/core/plugins/kdeconnectplugin.h +++ b/core/kdeconnectplugin.h @@ -24,14 +24,16 @@ #include #include -#include #include #include -#include "../networkpackage.h" -#include "../device.h" +#include "kdeconnectcore_export.h" +#include "networkpackage.h" +#include "device.h" -class KDE_EXPORT KdeConnectPlugin +struct KdeConnectPluginPrivate; + +class KDECONNECTCORE_EXPORT KdeConnectPlugin : public QObject { Q_OBJECT @@ -57,11 +59,7 @@ public Q_SLOTS: virtual void connected() = 0; private: - Device* mDevice; - - // The Initializer object sets things up, and also does cleanup when it goes out of scope - // Since the plugins use their own memory, they need their own initializer in order to send encrypted packages - QCA::Initializer init; + QScopedPointer d; }; diff --git a/core/plugins/pluginloader.cpp b/core/pluginloader.cpp similarity index 98% rename from core/plugins/pluginloader.cpp rename to core/pluginloader.cpp index 737edae36..b430c1516 100644 --- a/core/plugins/pluginloader.cpp +++ b/core/pluginloader.cpp @@ -22,8 +22,8 @@ #include -#include "../kdebugnamespace.h" -#include "../device.h" +#include "kdebugnamespace.h" +#include "device.h" #include "kdeconnectplugin.h" PluginLoader* PluginLoader::instance() diff --git a/core/plugins/pluginloader.h b/core/pluginloader.h similarity index 100% rename from core/plugins/pluginloader.h rename to core/pluginloader.h diff --git a/core/plugins/CMakeLists.txt b/plugins/CMakeLists.txt similarity index 79% rename from core/plugins/CMakeLists.txt rename to plugins/CMakeLists.txt index 1d279c669..e4eeb0e8d 100644 --- a/core/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -1,4 +1,4 @@ - +include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/core ${QCA2_INCLUDE_DIR}) install(FILES kdeconnect_plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR}) add_subdirectory(ping) diff --git a/core/plugins/battery/CMakeLists.txt b/plugins/battery/CMakeLists.txt similarity index 94% rename from core/plugins/battery/CMakeLists.txt rename to plugins/battery/CMakeLists.txt index 482d0aa62..b6da5cbb6 100644 --- a/core/plugins/battery/CMakeLists.txt +++ b/plugins/battery/CMakeLists.txt @@ -10,7 +10,7 @@ target_link_libraries(kdeconnect_battery kdeconnectcore ${KDE4_KDEUI_LIBS}) install(TARGETS kdeconnect_battery DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_battery.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(../../../macros.cmake) +include(macros) generate_and_install_dbus_interface( kdeconnect_battery diff --git a/core/plugins/battery/README b/plugins/battery/README similarity index 100% rename from core/plugins/battery/README rename to plugins/battery/README diff --git a/core/plugins/battery/batterydbusinterface.cpp b/plugins/battery/batterydbusinterface.cpp similarity index 97% rename from core/plugins/battery/batterydbusinterface.cpp rename to plugins/battery/batterydbusinterface.cpp index 6b760f2c3..5960da8d7 100644 --- a/core/plugins/battery/batterydbusinterface.cpp +++ b/plugins/battery/batterydbusinterface.cpp @@ -20,7 +20,7 @@ #include "batterydbusinterface.h" -#include "../../kdebugnamespace.h" +#include BatteryDbusInterface::BatteryDbusInterface(QObject *parent) : QDBusAbstractAdaptor(parent) diff --git a/core/plugins/battery/batterydbusinterface.h b/plugins/battery/batterydbusinterface.h similarity index 100% rename from core/plugins/battery/batterydbusinterface.h rename to plugins/battery/batterydbusinterface.h diff --git a/core/plugins/battery/batteryplugin.cpp b/plugins/battery/batteryplugin.cpp similarity index 98% rename from core/plugins/battery/batteryplugin.cpp rename to plugins/battery/batteryplugin.cpp index c361ba39c..e1884535c 100644 --- a/core/plugins/battery/batteryplugin.cpp +++ b/plugins/battery/batteryplugin.cpp @@ -24,7 +24,7 @@ #include #include -#include "../../kdebugnamespace.h" +#include #include "batterydbusinterface.h" K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< BatteryPlugin >(); ) diff --git a/core/plugins/battery/batteryplugin.h b/plugins/battery/batteryplugin.h similarity index 97% rename from core/plugins/battery/batteryplugin.h rename to plugins/battery/batteryplugin.h index 0902913fd..9ab9c509d 100644 --- a/core/plugins/battery/batteryplugin.h +++ b/plugins/battery/batteryplugin.h @@ -21,7 +21,7 @@ #ifndef BATTERYPLUGIN_H #define BATTERYPLUGIN_H -#include "../kdeconnectplugin.h" +#include #define PACKAGE_TYPE_BATTERY QLatin1String("kdeconnect.battery") diff --git a/core/plugins/battery/kdeconnect_battery.desktop b/plugins/battery/kdeconnect_battery.desktop similarity index 100% rename from core/plugins/battery/kdeconnect_battery.desktop rename to plugins/battery/kdeconnect_battery.desktop diff --git a/core/plugins/clipboard/CMakeLists.txt b/plugins/clipboard/CMakeLists.txt similarity index 100% rename from core/plugins/clipboard/CMakeLists.txt rename to plugins/clipboard/CMakeLists.txt diff --git a/core/plugins/clipboard/README b/plugins/clipboard/README similarity index 100% rename from core/plugins/clipboard/README rename to plugins/clipboard/README diff --git a/core/plugins/clipboard/clipboardplugin.cpp b/plugins/clipboard/clipboardplugin.cpp similarity index 100% rename from core/plugins/clipboard/clipboardplugin.cpp rename to plugins/clipboard/clipboardplugin.cpp diff --git a/core/plugins/clipboard/clipboardplugin.h b/plugins/clipboard/clipboardplugin.h similarity index 94% rename from core/plugins/clipboard/clipboardplugin.h rename to plugins/clipboard/clipboardplugin.h index 9a7cab4f5..c02859abc 100644 --- a/core/plugins/clipboard/clipboardplugin.h +++ b/plugins/clipboard/clipboardplugin.h @@ -24,9 +24,7 @@ #include #include -#include "../kdeconnectplugin.h" -#include "../../networkpackage.h" -#include "../../device.h" +#include #define PACKAGE_TYPE_CLIPBOARD QLatin1String("kdeconnect.clipboard") diff --git a/core/plugins/clipboard/kdeconnect_clipboard.desktop b/plugins/clipboard/kdeconnect_clipboard.desktop similarity index 100% rename from core/plugins/clipboard/kdeconnect_clipboard.desktop rename to plugins/clipboard/kdeconnect_clipboard.desktop diff --git a/core/plugins/kdeconnect_plugin.desktop b/plugins/kdeconnect_plugin.desktop similarity index 100% rename from core/plugins/kdeconnect_plugin.desktop rename to plugins/kdeconnect_plugin.desktop diff --git a/core/plugins/mpriscontrol/CMakeLists.txt b/plugins/mpriscontrol/CMakeLists.txt similarity index 100% rename from core/plugins/mpriscontrol/CMakeLists.txt rename to plugins/mpriscontrol/CMakeLists.txt diff --git a/core/plugins/mpriscontrol/README b/plugins/mpriscontrol/README similarity index 100% rename from core/plugins/mpriscontrol/README rename to plugins/mpriscontrol/README diff --git a/core/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop b/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop similarity index 100% rename from core/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop rename to plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop diff --git a/core/plugins/mpriscontrol/mpriscontrolplugin.cpp b/plugins/mpriscontrol/mpriscontrolplugin.cpp similarity index 99% rename from core/plugins/mpriscontrol/mpriscontrolplugin.cpp rename to plugins/mpriscontrol/mpriscontrolplugin.cpp index 89f964aeb..8be55738f 100644 --- a/core/plugins/mpriscontrol/mpriscontrolplugin.cpp +++ b/plugins/mpriscontrol/mpriscontrolplugin.cpp @@ -28,7 +28,8 @@ #include #include -#include "../../kdebugnamespace.h" +#include +#include #include "mprisdbusinterface.h" #include "propertiesdbusinterface.h" diff --git a/core/plugins/mpriscontrol/mpriscontrolplugin.h b/plugins/mpriscontrol/mpriscontrolplugin.h similarity index 98% rename from core/plugins/mpriscontrol/mpriscontrolplugin.h rename to plugins/mpriscontrol/mpriscontrolplugin.h index 44e9d62d4..7b1e6f505 100644 --- a/core/plugins/mpriscontrol/mpriscontrolplugin.h +++ b/plugins/mpriscontrol/mpriscontrolplugin.h @@ -24,7 +24,7 @@ #include #include -#include "../kdeconnectplugin.h" +#include #define PACKAGE_TYPE_MPRIS QLatin1String("kdeconnect.mpris") diff --git a/core/plugins/mpriscontrol/mprisdbusinterface.xml b/plugins/mpriscontrol/mprisdbusinterface.xml similarity index 100% rename from core/plugins/mpriscontrol/mprisdbusinterface.xml rename to plugins/mpriscontrol/mprisdbusinterface.xml diff --git a/core/plugins/mpriscontrol/propertiesInterface.xml b/plugins/mpriscontrol/propertiesInterface.xml similarity index 100% rename from core/plugins/mpriscontrol/propertiesInterface.xml rename to plugins/mpriscontrol/propertiesInterface.xml diff --git a/core/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt similarity index 96% rename from core/plugins/notifications/CMakeLists.txt rename to plugins/notifications/CMakeLists.txt index 97d95eed6..cc6dd97d7 100644 --- a/core/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(kdeconnect_notifications kdeconnectcore ${KDE4_KDEUI_LIBS} install(TARGETS kdeconnect_notifications DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_notifications.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(../../../macros.cmake) +include(macros) generate_and_install_dbus_interface( kdeconnect_notifications notificationsdbusinterface.h diff --git a/core/plugins/notifications/README b/plugins/notifications/README similarity index 100% rename from core/plugins/notifications/README rename to plugins/notifications/README diff --git a/core/plugins/notifications/kdeconnect_notifications.desktop b/plugins/notifications/kdeconnect_notifications.desktop similarity index 100% rename from core/plugins/notifications/kdeconnect_notifications.desktop rename to plugins/notifications/kdeconnect_notifications.desktop diff --git a/core/plugins/notifications/notification.cpp b/plugins/notifications/notification.cpp similarity index 97% rename from core/plugins/notifications/notification.cpp rename to plugins/notifications/notification.cpp index e30b6ba9a..3c15d47dc 100644 --- a/core/plugins/notifications/notification.cpp +++ b/plugins/notifications/notification.cpp @@ -22,7 +22,7 @@ #include -#include "../../kdebugnamespace.h" +#include Notification::Notification(const NetworkPackage& np, const QString& iconPath, QObject* parent) : QObject(parent) diff --git a/core/plugins/notifications/notification.h b/plugins/notifications/notification.h similarity index 98% rename from core/plugins/notifications/notification.h rename to plugins/notifications/notification.h index 1ce53456d..3c14d26d0 100644 --- a/core/plugins/notifications/notification.h +++ b/plugins/notifications/notification.h @@ -24,7 +24,7 @@ #include #include -#include "../../networkpackage.h" +#include class Notification : public QObject diff --git a/core/plugins/notifications/notificationsdbusinterface.cpp b/plugins/notifications/notificationsdbusinterface.cpp similarity index 98% rename from core/plugins/notifications/notificationsdbusinterface.cpp rename to plugins/notifications/notificationsdbusinterface.cpp index c56a3d84d..25d1bc329 100644 --- a/core/plugins/notifications/notificationsdbusinterface.cpp +++ b/plugins/notifications/notificationsdbusinterface.cpp @@ -26,8 +26,8 @@ #include #include -#include "../../kdebugnamespace.h" -#include "../../filetransferjob.h" +#include +#include #include "notificationsplugin.h" NotificationsDbusInterface::NotificationsDbusInterface(Device* device, QObject *parent) diff --git a/core/plugins/notifications/notificationsdbusinterface.h b/plugins/notifications/notificationsdbusinterface.h similarity index 98% rename from core/plugins/notifications/notificationsdbusinterface.h rename to plugins/notifications/notificationsdbusinterface.h index 9865ae7cc..019c02ac3 100644 --- a/core/plugins/notifications/notificationsdbusinterface.h +++ b/plugins/notifications/notificationsdbusinterface.h @@ -27,7 +27,7 @@ #include #include -#include "../../device.h" +#include #include "notification.h" class NotificationsDbusInterface diff --git a/core/plugins/notifications/notificationsplugin.cpp b/plugins/notifications/notificationsplugin.cpp similarity index 98% rename from core/plugins/notifications/notificationsplugin.cpp rename to plugins/notifications/notificationsplugin.cpp index 1a1dfb011..0440584a1 100644 --- a/core/plugins/notifications/notificationsplugin.cpp +++ b/plugins/notifications/notificationsplugin.cpp @@ -22,7 +22,7 @@ #include -#include "../../kdebugnamespace.h" +#include #include "notificationsdbusinterface.h" K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< NotificationsPlugin >(); ) diff --git a/core/plugins/notifications/notificationsplugin.h b/plugins/notifications/notificationsplugin.h similarity index 97% rename from core/plugins/notifications/notificationsplugin.h rename to plugins/notifications/notificationsplugin.h index 8b800d4d7..a2e782802 100644 --- a/core/plugins/notifications/notificationsplugin.h +++ b/plugins/notifications/notificationsplugin.h @@ -23,7 +23,7 @@ #include -#include "../kdeconnectplugin.h" +#include #define PACKAGE_TYPE_NOTIFICATION QLatin1String("kdeconnect.notification") /* diff --git a/core/plugins/pausemusic/CMakeLists.txt b/plugins/pausemusic/CMakeLists.txt similarity index 83% rename from core/plugins/pausemusic/CMakeLists.txt rename to plugins/pausemusic/CMakeLists.txt index c5254222e..337e95246 100644 --- a/core/plugins/pausemusic/CMakeLists.txt +++ b/plugins/pausemusic/CMakeLists.txt @@ -1,17 +1,11 @@ set(kdeconnect_pausemusic_SRCS pausemusicplugin.cpp - ../kdeconnectplugin.cpp - ../../kdebugnamespace.cpp ) kde4_add_plugin(kdeconnect_pausemusic ${kdeconnect_pausemusic_SRCS}) target_link_libraries(kdeconnect_pausemusic - ${KDE4_KDECORE_LIBS} - ${KDE4_KDEUI_LIBS} - ${QT_QTNETWORK_LIBRARY} - ${QJSON_LIBRARIES} - ${QCA2_LIBRARIES} + kdeconnectcore ) install(TARGETS kdeconnect_pausemusic DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/core/plugins/pausemusic/README b/plugins/pausemusic/README similarity index 100% rename from core/plugins/pausemusic/README rename to plugins/pausemusic/README diff --git a/core/plugins/pausemusic/kdeconnect_pausemusic.desktop b/plugins/pausemusic/kdeconnect_pausemusic.desktop similarity index 100% rename from core/plugins/pausemusic/kdeconnect_pausemusic.desktop rename to plugins/pausemusic/kdeconnect_pausemusic.desktop diff --git a/core/plugins/pausemusic/kdeconnect_pausemusic_config.desktop b/plugins/pausemusic/kdeconnect_pausemusic_config.desktop similarity index 100% rename from core/plugins/pausemusic/kdeconnect_pausemusic_config.desktop rename to plugins/pausemusic/kdeconnect_pausemusic_config.desktop diff --git a/core/plugins/pausemusic/pausemusic_config.cpp b/plugins/pausemusic/pausemusic_config.cpp similarity index 98% rename from core/plugins/pausemusic/pausemusic_config.cpp rename to plugins/pausemusic/pausemusic_config.cpp index 59174f296..7833c2107 100644 --- a/core/plugins/pausemusic/pausemusic_config.cpp +++ b/plugins/pausemusic/pausemusic_config.cpp @@ -24,7 +24,7 @@ #include #include -#include "../../kdebugnamespace.h" +#include #include "ui_pausemusic_config.h" diff --git a/core/plugins/pausemusic/pausemusic_config.h b/plugins/pausemusic/pausemusic_config.h similarity index 100% rename from core/plugins/pausemusic/pausemusic_config.h rename to plugins/pausemusic/pausemusic_config.h diff --git a/core/plugins/pausemusic/pausemusic_config.ui b/plugins/pausemusic/pausemusic_config.ui similarity index 100% rename from core/plugins/pausemusic/pausemusic_config.ui rename to plugins/pausemusic/pausemusic_config.ui diff --git a/core/plugins/pausemusic/pausemusicplugin.cpp b/plugins/pausemusic/pausemusicplugin.cpp similarity index 98% rename from core/plugins/pausemusic/pausemusicplugin.cpp rename to plugins/pausemusic/pausemusicplugin.cpp index 17823a766..a89bd6fe3 100644 --- a/core/plugins/pausemusic/pausemusicplugin.cpp +++ b/plugins/pausemusic/pausemusicplugin.cpp @@ -29,7 +29,8 @@ #include #include -#include "../../kdebugnamespace.h" +#include +#include K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< PauseMusicPlugin >(); ) K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_pausemusic", "kdeconnect-kded") ) diff --git a/core/plugins/pausemusic/pausemusicplugin.h b/plugins/pausemusic/pausemusicplugin.h similarity index 97% rename from core/plugins/pausemusic/pausemusicplugin.h rename to plugins/pausemusic/pausemusicplugin.h index db95c2548..8bfa09c54 100644 --- a/core/plugins/pausemusic/pausemusicplugin.h +++ b/plugins/pausemusic/pausemusicplugin.h @@ -25,7 +25,7 @@ #include #include -#include "../kdeconnectplugin.h" +#include class PauseMusicPlugin : public KdeConnectPlugin diff --git a/core/plugins/ping/CMakeLists.txt b/plugins/ping/CMakeLists.txt similarity index 100% rename from core/plugins/ping/CMakeLists.txt rename to plugins/ping/CMakeLists.txt diff --git a/core/plugins/ping/README b/plugins/ping/README similarity index 100% rename from core/plugins/ping/README rename to plugins/ping/README diff --git a/core/plugins/ping/kdeconnect_ping.desktop b/plugins/ping/kdeconnect_ping.desktop similarity index 100% rename from core/plugins/ping/kdeconnect_ping.desktop rename to plugins/ping/kdeconnect_ping.desktop diff --git a/core/plugins/ping/pingplugin.cpp b/plugins/ping/pingplugin.cpp similarity index 97% rename from core/plugins/ping/pingplugin.cpp rename to plugins/ping/pingplugin.cpp index f0bb2e169..11826e233 100644 --- a/core/plugins/ping/pingplugin.cpp +++ b/plugins/ping/pingplugin.cpp @@ -24,7 +24,8 @@ #include #include -#include "../../kdebugnamespace.h" +#include +#include K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< PingPlugin >(); ) K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_ping", "kdeconnect-kded") ) diff --git a/core/plugins/ping/pingplugin.h b/plugins/ping/pingplugin.h similarity index 97% rename from core/plugins/ping/pingplugin.h rename to plugins/ping/pingplugin.h index 334a35359..f31e66045 100644 --- a/core/plugins/ping/pingplugin.h +++ b/plugins/ping/pingplugin.h @@ -23,7 +23,7 @@ #include -#include "../kdeconnectplugin.h" +#include class KDE_EXPORT PingPlugin : public KdeConnectPlugin diff --git a/core/plugins/sftp/CMakeLists.txt b/plugins/sftp/CMakeLists.txt similarity index 97% rename from core/plugins/sftp/CMakeLists.txt rename to plugins/sftp/CMakeLists.txt index 026f4df17..500067e2f 100644 --- a/core/plugins/sftp/CMakeLists.txt +++ b/plugins/sftp/CMakeLists.txt @@ -11,7 +11,7 @@ target_link_libraries(kdeconnect_sftp kdeconnectcore ${KDE4_KFILE_LIBS}) install(TARGETS kdeconnect_sftp DESTINATION ${PLUGIN_INSTALL_DIR} ) install(FILES kdeconnect_sftp.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -include(../../../macros.cmake) +include(macros) generate_and_install_dbus_interface( kdeconnect_sftp diff --git a/core/plugins/sftp/README b/plugins/sftp/README similarity index 100% rename from core/plugins/sftp/README rename to plugins/sftp/README diff --git a/core/plugins/sftp/kdeconnect_sftp.desktop b/plugins/sftp/kdeconnect_sftp.desktop similarity index 100% rename from core/plugins/sftp/kdeconnect_sftp.desktop rename to plugins/sftp/kdeconnect_sftp.desktop diff --git a/core/plugins/sftp/kdeconnect_sftp_config.desktop b/plugins/sftp/kdeconnect_sftp_config.desktop similarity index 100% rename from core/plugins/sftp/kdeconnect_sftp_config.desktop rename to plugins/sftp/kdeconnect_sftp_config.desktop diff --git a/core/plugins/sftp/mounter.cpp b/plugins/sftp/mounter.cpp similarity index 99% rename from core/plugins/sftp/mounter.cpp rename to plugins/sftp/mounter.cpp index 294f19309..8233399eb 100644 --- a/core/plugins/sftp/mounter.cpp +++ b/plugins/sftp/mounter.cpp @@ -24,7 +24,7 @@ #include #include -#include "../../kdebugnamespace.h" +#include #include "mounter.h" diff --git a/core/plugins/sftp/mounter.h b/plugins/sftp/mounter.h similarity index 100% rename from core/plugins/sftp/mounter.h rename to plugins/sftp/mounter.h diff --git a/core/plugins/sftp/mountloop.cpp b/plugins/sftp/mountloop.cpp similarity index 100% rename from core/plugins/sftp/mountloop.cpp rename to plugins/sftp/mountloop.cpp diff --git a/core/plugins/sftp/mountloop.h b/plugins/sftp/mountloop.h similarity index 100% rename from core/plugins/sftp/mountloop.h rename to plugins/sftp/mountloop.h diff --git a/core/plugins/sftp/sftp_config.cpp b/plugins/sftp/sftp_config.cpp similarity index 98% rename from core/plugins/sftp/sftp_config.cpp rename to plugins/sftp/sftp_config.cpp index 4f67213ce..119fe5b5d 100644 --- a/core/plugins/sftp/sftp_config.cpp +++ b/plugins/sftp/sftp_config.cpp @@ -27,7 +27,7 @@ #include #include "sftpplugin.h" -#include "../../kdebugnamespace.h" +#include #include "ui_sftp_config.h" diff --git a/core/plugins/sftp/sftp_config.h b/plugins/sftp/sftp_config.h similarity index 100% rename from core/plugins/sftp/sftp_config.h rename to plugins/sftp/sftp_config.h diff --git a/core/plugins/sftp/sftp_config.ui b/plugins/sftp/sftp_config.ui similarity index 100% rename from core/plugins/sftp/sftp_config.ui rename to plugins/sftp/sftp_config.ui diff --git a/core/plugins/sftp/sftpplugin.cpp b/plugins/sftp/sftpplugin.cpp similarity index 99% rename from core/plugins/sftp/sftpplugin.cpp rename to plugins/sftp/sftpplugin.cpp index 6a9a5649f..716b52571 100644 --- a/core/plugins/sftp/sftpplugin.cpp +++ b/plugins/sftp/sftpplugin.cpp @@ -35,7 +35,7 @@ #include "sftp_config.h" #include "mounter.h" -#include "../../kdebugnamespace.h" +#include K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SftpPlugin >(); ) K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_sftp", "kdeconnect-kded") ) diff --git a/core/plugins/sftp/sftpplugin.h b/plugins/sftp/sftpplugin.h similarity index 97% rename from core/plugins/sftp/sftpplugin.h rename to plugins/sftp/sftpplugin.h index 6189a2146..9517d8e71 100644 --- a/core/plugins/sftp/sftpplugin.h +++ b/plugins/sftp/sftpplugin.h @@ -21,7 +21,8 @@ #ifndef SFTPPLUGIN_H #define SFTPPLUGIN_H -#include "../kdeconnectplugin.h" +#include +#include #define PACKAGE_TYPE_SFTP QLatin1String("kdeconnect.sftp") diff --git a/core/plugins/share/CMakeLists.txt b/plugins/share/CMakeLists.txt similarity index 100% rename from core/plugins/share/CMakeLists.txt rename to plugins/share/CMakeLists.txt diff --git a/core/plugins/share/README b/plugins/share/README similarity index 100% rename from core/plugins/share/README rename to plugins/share/README diff --git a/core/plugins/share/autoclosingqfile.cpp b/plugins/share/autoclosingqfile.cpp similarity index 100% rename from core/plugins/share/autoclosingqfile.cpp rename to plugins/share/autoclosingqfile.cpp diff --git a/core/plugins/share/autoclosingqfile.h b/plugins/share/autoclosingqfile.h similarity index 97% rename from core/plugins/share/autoclosingqfile.h rename to plugins/share/autoclosingqfile.h index 680e9ad11..c9673d8d9 100644 --- a/core/plugins/share/autoclosingqfile.h +++ b/plugins/share/autoclosingqfile.h @@ -23,7 +23,7 @@ #include -#include "../../kdebugnamespace.h" +#include class AutoClosingQFile : public QFile { diff --git a/core/plugins/share/kdeconnect_share.desktop b/plugins/share/kdeconnect_share.desktop similarity index 100% rename from core/plugins/share/kdeconnect_share.desktop rename to plugins/share/kdeconnect_share.desktop diff --git a/core/plugins/share/kdeconnect_share_config.desktop b/plugins/share/kdeconnect_share_config.desktop similarity index 100% rename from core/plugins/share/kdeconnect_share_config.desktop rename to plugins/share/kdeconnect_share_config.desktop diff --git a/core/plugins/share/share_config.cpp b/plugins/share/share_config.cpp similarity index 98% rename from core/plugins/share/share_config.cpp rename to plugins/share/share_config.cpp index d04bf0788..805f27702 100644 --- a/core/plugins/share/share_config.cpp +++ b/plugins/share/share_config.cpp @@ -26,7 +26,7 @@ #include #include -#include "../../kdebugnamespace.h" +#include #include "ui_share_config.h" diff --git a/core/plugins/share/share_config.h b/plugins/share/share_config.h similarity index 100% rename from core/plugins/share/share_config.h rename to plugins/share/share_config.h diff --git a/core/plugins/share/share_config.ui b/plugins/share/share_config.ui similarity index 100% rename from core/plugins/share/share_config.ui rename to plugins/share/share_config.ui diff --git a/core/plugins/share/shareplugin.cpp b/plugins/share/shareplugin.cpp similarity index 98% rename from core/plugins/share/shareplugin.cpp rename to plugins/share/shareplugin.cpp index 5520a39f0..d310e8541 100644 --- a/core/plugins/share/shareplugin.cpp +++ b/plugins/share/shareplugin.cpp @@ -33,8 +33,8 @@ #include #include -#include "../../kdebugnamespace.h" -#include "../../filetransferjob.h" +#include +#include #include "autoclosingqfile.h" K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< SharePlugin >(); ) diff --git a/core/plugins/share/shareplugin.h b/plugins/share/shareplugin.h similarity index 97% rename from core/plugins/share/shareplugin.h rename to plugins/share/shareplugin.h index 3ef3391e7..72c79d2d9 100644 --- a/core/plugins/share/shareplugin.h +++ b/plugins/share/shareplugin.h @@ -24,7 +24,7 @@ #include #include -#include "../kdeconnectplugin.h" +#include #define PACKAGE_TYPE_SHARE QLatin1String("kdeconnect.share") diff --git a/core/plugins/telephony/CMakeLists.txt b/plugins/telephony/CMakeLists.txt similarity index 100% rename from core/plugins/telephony/CMakeLists.txt rename to plugins/telephony/CMakeLists.txt diff --git a/core/plugins/telephony/README b/plugins/telephony/README similarity index 100% rename from core/plugins/telephony/README rename to plugins/telephony/README diff --git a/core/plugins/telephony/kdeconnect_telephony.desktop b/plugins/telephony/kdeconnect_telephony.desktop similarity index 100% rename from core/plugins/telephony/kdeconnect_telephony.desktop rename to plugins/telephony/kdeconnect_telephony.desktop diff --git a/core/plugins/telephony/telephonyplugin.cpp b/plugins/telephony/telephonyplugin.cpp similarity index 98% rename from core/plugins/telephony/telephonyplugin.cpp rename to plugins/telephony/telephonyplugin.cpp index 9a0740d64..6b9378f22 100644 --- a/core/plugins/telephony/telephonyplugin.cpp +++ b/plugins/telephony/telephonyplugin.cpp @@ -23,7 +23,7 @@ #include #include -#include "../../kdebugnamespace.h" +#include K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< TelephonyPlugin >(); ) K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_telephony", "kdeconnect-kded") ) diff --git a/core/plugins/telephony/telephonyplugin.h b/plugins/telephony/telephonyplugin.h similarity index 97% rename from core/plugins/telephony/telephonyplugin.h rename to plugins/telephony/telephonyplugin.h index c9723aac4..1b11ad20d 100644 --- a/core/plugins/telephony/telephonyplugin.h +++ b/plugins/telephony/telephonyplugin.h @@ -23,7 +23,7 @@ #include -#include "../kdeconnectplugin.h" +#include #include