[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:26:44 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=049c708

The following commit has been merged in the master branch:
commit 049c708743f699e0acf630a7a14585fbeb38a3c4
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Tue Aug 13 06:35:58 2013 +0200

    Mpris plugin to new format +commited missing files
    
    Added files missing from previous commits (KDevelop git support fault :)
    Fixed includes in linkprovider.h
    Added icons to plugins
---
 daemon/linkproviders/linkprovider.h                |  3 +-
 daemon/plugins/CMakeLists.txt                      |  1 +
 daemon/plugins/kdeconnect_plugin.desktop           |  5 +++
 daemon/plugins/mpris/CMakeLists.txt                | 12 --------
 daemon/plugins/mpriscontrol/CMakeLists.txt         | 36 ++++++++++++++++++++++
 .../kdeconnect_mpriscontrol.desktop}               | 10 +++---
 .../mpriscontrolplugin.cpp}                        | 32 ++++++++++---------
 .../mpriscontrolplugin.h}                          | 18 ++++++-----
 .../{mpris => mpriscontrol}/mprisdbusinterface.xml |  2 +-
 .../propertiesInterface.xml                        |  0
 daemon/plugins/pausemusic/CMakeLists.txt           | 20 ++++++++++++
 .../kdeconnect_pausemusic.desktop}                 | 10 +++---
 12 files changed, 101 insertions(+), 48 deletions(-)

diff --git a/daemon/linkproviders/linkprovider.h b/daemon/linkproviders/linkprovider.h
index 792662b..e1f1310 100644
--- a/daemon/linkproviders/linkprovider.h
+++ b/daemon/linkproviders/linkprovider.h
@@ -25,8 +25,7 @@
 #include <QVector>
 #include <QNetworkSession>
 
-#include "devicelinks/devicelink.h"
-#include "device.h"
+#include "../networkpackage.h"
 
 class DeviceLink;
 
diff --git a/daemon/plugins/CMakeLists.txt b/daemon/plugins/CMakeLists.txt
index 494973a..fa90ebf 100644
--- a/daemon/plugins/CMakeLists.txt
+++ b/daemon/plugins/CMakeLists.txt
@@ -3,4 +3,5 @@ install(FILES kdeconnect_plugin.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR})
 
 add_subdirectory(ping)
 add_subdirectory(pausemusic)
+add_subdirectory(mpriscontrol)
 
diff --git a/daemon/plugins/kdeconnect_plugin.desktop b/daemon/plugins/kdeconnect_plugin.desktop
new file mode 100644
index 0000000..dd76d92
--- /dev/null
+++ b/daemon/plugins/kdeconnect_plugin.desktop
@@ -0,0 +1,5 @@
+[Desktop Entry]
+Type=ServiceType
+X-KDE-ServiceType=KdeConnect/Plugin
+X-KDE-Derived=KPluginInfo
+Name=KDEConnect Plugin
diff --git a/daemon/plugins/mpris/CMakeLists.txt b/daemon/plugins/mpris/CMakeLists.txt
deleted file mode 100644
index e8ca6d1..0000000
--- a/daemon/plugins/mpris/CMakeLists.txt
+++ /dev/null
@@ -1,12 +0,0 @@
-
-qt4_add_dbus_interface(
-   kded_kdeconnect_SRCS
-   packageinterfaces/mprisdbusinterface.xml
-   mprisdbusinterface
-)
-
-qt4_add_dbus_interface(
-   kded_kdeconnect_SRCS
-   packageinterfaces/propertiesInterface.xml
-   propertiesdbusinterface
-)
diff --git a/daemon/plugins/mpriscontrol/CMakeLists.txt b/daemon/plugins/mpriscontrol/CMakeLists.txt
new file mode 100644
index 0000000..840d614
--- /dev/null
+++ b/daemon/plugins/mpriscontrol/CMakeLists.txt
@@ -0,0 +1,36 @@
+find_package(KDE4 REQUIRED)
+include (KDE4Defaults)
+include_directories(${KDE4_INCLUDES})
+
+set(kdeconnect_mpriscontrol_SRCS
+    mpriscontrolplugin.cpp
+    ../kdeconnectplugin.cpp
+    ../pluginloader.cpp
+    ../../networkpackage.cpp
+    ../../device.cpp
+)
+
+qt4_add_dbus_interface(
+   kdeconnect_mpriscontrol_SRCS
+   mprisdbusinterface.xml
+   mprisdbusinterface
+)
+
+qt4_add_dbus_interface(
+   kdeconnect_mpriscontrol_SRCS
+   propertiesInterface.xml
+   propertiesdbusinterface
+)
+
+kde4_add_plugin(kdeconnect_mpriscontrol ${kdeconnect_mpriscontrol_SRCS})
+
+target_link_libraries(kdeconnect_mpriscontrol
+    ${KDE4_KDECORE_LIBS}
+    ${KDE4_KDEUI_LIBS}
+    ${QT_QTNETWORK_LIBRARY}
+    qjson
+)
+
+install(TARGETS kdeconnect_mpriscontrol DESTINATION ${PLUGIN_INSTALL_DIR} )
+install(FILES kdeconnect_mpriscontrol.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+
diff --git a/daemon/plugins/ping/kdeconnect_ping.desktop b/daemon/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop
similarity index 62%
copy from daemon/plugins/ping/kdeconnect_ping.desktop
copy to daemon/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop
index c225c8d..a93e256 100644
--- a/daemon/plugins/ping/kdeconnect_ping.desktop
+++ b/daemon/plugins/mpriscontrol/kdeconnect_mpriscontrol.desktop
@@ -2,14 +2,14 @@
 Encoding=UTF-8
 Type=Service
 ServiceTypes=KdeConnect/Plugin
-X-KDE-Library=kdeconnect_ping
+X-KDE-Library=kdeconnect_mpriscontrol
 X-KDE-PluginInfo-Author=Albert Vaca
 X-KDE-PluginInfo-Email=albertvaka at gmail.com
-X-KDE-PluginInfo-Name=kdeconnect_ping
+X-KDE-PluginInfo-Name=kdeconnect_mpriscontrol
 X-KDE-PluginInfo-Version=0.1
 X-KDE-PluginInfo-Website=http://albertvaka.wordpress.com
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-Icon=dialog-ok
-Name=Ping
-Comment=Send and receive pings
+Icon=media-playback-start
+Name=Multimedia control receiver
+Comment=Remote control your music and videos
diff --git a/daemon/plugins/mpris/mpriscontrolpackageinterface.cpp b/daemon/plugins/mpriscontrol/mpriscontrolplugin.cpp
similarity index 86%
rename from daemon/plugins/mpris/mpriscontrolpackageinterface.cpp
rename to daemon/plugins/mpriscontrol/mpriscontrolplugin.cpp
index 22df27d..54ec123 100644
--- a/daemon/plugins/mpris/mpriscontrolpackageinterface.cpp
+++ b/daemon/plugins/mpriscontrol/mpriscontrolplugin.cpp
@@ -18,7 +18,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "mpriscontrolpackageinterface.h"
+#include "mpriscontrolplugin.h"
 
 #include "propertiesdbusinterface.h"
 
@@ -29,7 +29,11 @@
 #include <QDBusReply>
 #include <QDBusMessage>
 
-MprisControlPackageInterface::MprisControlPackageInterface()
+K_PLUGIN_FACTORY( KdeConnectPluginFactory, registerPlugin< MprisControlPlugin >(); )
+K_EXPORT_PLUGIN( KdeConnectPluginFactory("kdeconnect_mpriscontrol", "kdeconnect_mpriscontrol") )
+
+MprisControlPlugin::MprisControlPlugin(QObject* parent, const QVariantList& args)
+    : KdeConnectPlugin(parent, args)
 {
 
     //Detect new interfaces
@@ -46,7 +50,7 @@ MprisControlPackageInterface::MprisControlPackageInterface()
 
 }
 
-void MprisControlPackageInterface::serviceOwnerChanged(const QString &name,
+void MprisControlPlugin::serviceOwnerChanged(const QString &name,
                                               const QString &oldOwner,
                                               const QString &newOwner)
 {
@@ -54,7 +58,7 @@ void MprisControlPackageInterface::serviceOwnerChanged(const QString &name,
 
     if (name.startsWith("org.mpris.MediaPlayer2")) {
 
-        qDebug() << "Something (un)registered in bus" << name << oldOwner << newOwner;
+        qDebug() << "Mpris (un)registered in bus" << name << oldOwner << newOwner;
 
         if (oldOwner.isEmpty()) {
             addPlayer(name);
@@ -64,7 +68,7 @@ void MprisControlPackageInterface::serviceOwnerChanged(const QString &name,
     }
 }
 
-void MprisControlPackageInterface::addPlayer(const QString& service)
+void MprisControlPlugin::addPlayer(const QString& service)
 {
     QDBusInterface mprisInterface(service, "/org/mpris/MediaPlayer2", "org.mpris.MediaPlayer2");
     const QString& identity = mprisInterface.property("Identity").toString();
@@ -77,7 +81,7 @@ void MprisControlPackageInterface::addPlayer(const QString& service)
 
 }
 
-void MprisControlPackageInterface::propertiesChanged(const QString& propertyInterface, const QVariantMap& properties)
+void MprisControlPlugin::propertiesChanged(const QString& propertyInterface, const QVariantMap& properties)
 {
 
     NetworkPackage np(PACKAGE_TYPE_MPRIS);
@@ -115,19 +119,18 @@ void MprisControlPackageInterface::propertiesChanged(const QString& propertyInte
         const QString& service = interface->service();
         const QString& player = playerList.key(service);
         np.set("player", player);
-        sendPackage(np);
+        device()->sendPackage(np);
     }
 }
 
-void MprisControlPackageInterface::removePlayer(const QString& ifaceName)
+void MprisControlPlugin::removePlayer(const QString& ifaceName)
 {
     playerList.remove(playerList.key(ifaceName));
     sendPlayerList();
 }
 
-bool MprisControlPackageInterface::receivePackage (const Device& device, const NetworkPackage& np)
+bool MprisControlPlugin::receivePackage (const NetworkPackage& np)
 {
-    Q_UNUSED(device);
 
     if (np.type() != PACKAGE_TYPE_MPRIS) return false;
 
@@ -135,7 +138,7 @@ bool MprisControlPackageInterface::receivePackage (const Device& device, const N
     const QString& player = np.get<QString>("player");
     bool valid_player = playerList.contains(player);
     if (!valid_player || np.get<bool>("requestPlayerList")) {
-        sendPlayerList(&device);
+        sendPlayerList();
         if (!valid_player) {
             return true;
         }
@@ -185,17 +188,16 @@ bool MprisControlPackageInterface::receivePackage (const Device& device, const N
     }
     if (somethingToSend) {
         answer.set("player", player);
-        device.sendPackage(answer);
+        device()->sendPackage(answer);
     }
 
     return true;
 
 }
 
-void MprisControlPackageInterface::sendPlayerList(const Device* device)
+void MprisControlPlugin::sendPlayerList()
 {
     NetworkPackage np(PACKAGE_TYPE_MPRIS);
     np.set("playerList",playerList.keys());
-    if (device == NULL) Q_EMIT sendPackage(np);
-    else device->sendPackage(np);
+    device()->sendPackage(np);
 }
diff --git a/daemon/plugins/mpris/mpriscontrolpackageinterface.h b/daemon/plugins/mpriscontrol/mpriscontrolplugin.h
similarity index 84%
rename from daemon/plugins/mpris/mpriscontrolpackageinterface.h
rename to daemon/plugins/mpriscontrol/mpriscontrolplugin.h
index 51604b8..656f7f4 100644
--- a/daemon/plugins/mpris/mpriscontrolpackageinterface.h
+++ b/daemon/plugins/mpriscontrol/mpriscontrolplugin.h
@@ -21,22 +21,24 @@
 #ifndef MPRISCONTROLPACKAGEINTERFACE_H
 #define MPRISCONTROLPACKAGEINTERFACE_H
 
-#include "packageinterface.h"
-#include "mprisdbusinterface.h"
-
 #include <QSet>
 #include <QString>
 #include <QHash>
 #include <QDBusArgument>
 
-class MprisControlPackageInterface
-    : public PackageInterface
+#include "../kdeconnectplugin.h"
+#include "mprisdbusinterface.h"
+
+class MprisControlPlugin
+    : public KdeConnectPlugin
 {
     Q_OBJECT
 
 public:
-    MprisControlPackageInterface();
-    virtual bool receivePackage(const Device& device, const NetworkPackage& np);
+    explicit MprisControlPlugin(QObject *parent, const QVariantList &args);
+
+public Q_SLOTS:
+    virtual bool receivePackage(const NetworkPackage& np);
 
 private Q_SLOTS:
     void serviceOwnerChanged(const QString &name, const QString &oldOwner, const QString &newOwner);
@@ -46,7 +48,7 @@ private:
     QHash<QString, QString> playerList;
     void addPlayer(const QString& ifaceName);
     void removePlayer(const QString& ifaceName);
-    void sendPlayerList(const Device* device = 0);
+    void sendPlayerList();
     int prevVolume;
 
 };
diff --git a/daemon/plugins/mpris/mprisdbusinterface.xml b/daemon/plugins/mpriscontrol/mprisdbusinterface.xml
similarity index 96%
rename from daemon/plugins/mpris/mprisdbusinterface.xml
rename to daemon/plugins/mpriscontrol/mprisdbusinterface.xml
index 2aaa851..652ff0a 100644
--- a/daemon/plugins/mpris/mprisdbusinterface.xml
+++ b/daemon/plugins/mpriscontrol/mprisdbusinterface.xml
@@ -28,7 +28,7 @@
     <property access="readwrite" type="d" name="Rate"/>
     <property access="readwrite" type="b" name="Shuffle"/>
     <property access="read" type="a{sv}" name="Metadata">
-      <annotation value="QVariantMap" name="com.trolltech.QtDBus.QtTypeName"/>
+      <annotation value="QVariantMap" name="org.qtproject.QtDBus.QtTypeName"/>
     </property>
     <property access="readwrite" type="d" name="Volume"/>
     <property access="read" type="x" name="Position"/>
diff --git a/daemon/plugins/mpris/propertiesInterface.xml b/daemon/plugins/mpriscontrol/propertiesInterface.xml
similarity index 100%
rename from daemon/plugins/mpris/propertiesInterface.xml
rename to daemon/plugins/mpriscontrol/propertiesInterface.xml
diff --git a/daemon/plugins/pausemusic/CMakeLists.txt b/daemon/plugins/pausemusic/CMakeLists.txt
new file mode 100644
index 0000000..d1afc2f
--- /dev/null
+++ b/daemon/plugins/pausemusic/CMakeLists.txt
@@ -0,0 +1,20 @@
+find_package(KDE4 REQUIRED)
+include (KDE4Defaults)
+include_directories(${KDE4_INCLUDES})
+
+set(kdeconnect_pausemusic_SRCS
+    pausemusicplugin.cpp
+    ../kdeconnectplugin.cpp
+)
+
+kde4_add_plugin(kdeconnect_pausemusic ${kdeconnect_pausemusic_SRCS})
+
+target_link_libraries(kdeconnect_pausemusic
+    ${KDE4_KDECORE_LIBS}
+    ${KDE4_KDEUI_LIBS}
+    ${QT_QTNETWORK_LIBRARY}
+    qjson
+)
+
+install(TARGETS kdeconnect_pausemusic DESTINATION ${PLUGIN_INSTALL_DIR} )
+install(FILES kdeconnect_pausemusic.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
diff --git a/daemon/plugins/ping/kdeconnect_ping.desktop b/daemon/plugins/pausemusic/kdeconnect_pausemusic.desktop
similarity index 66%
copy from daemon/plugins/ping/kdeconnect_ping.desktop
copy to daemon/plugins/pausemusic/kdeconnect_pausemusic.desktop
index c225c8d..f28563c 100644
--- a/daemon/plugins/ping/kdeconnect_ping.desktop
+++ b/daemon/plugins/pausemusic/kdeconnect_pausemusic.desktop
@@ -2,14 +2,14 @@
 Encoding=UTF-8
 Type=Service
 ServiceTypes=KdeConnect/Plugin
-X-KDE-Library=kdeconnect_ping
+X-KDE-Library=kdeconnect_pausemusic
 X-KDE-PluginInfo-Author=Albert Vaca
 X-KDE-PluginInfo-Email=albertvaka at gmail.com
-X-KDE-PluginInfo-Name=kdeconnect_ping
+X-KDE-PluginInfo-Name=kdeconnect_pausemusic
 X-KDE-PluginInfo-Version=0.1
 X-KDE-PluginInfo-Website=http://albertvaka.wordpress.com
 X-KDE-PluginInfo-License=GPL
 X-KDE-PluginInfo-EnabledByDefault=true
-Icon=dialog-ok
-Name=Ping
-Comment=Send and receive pings
+Icon=speaker
+Name=Pause music on call
+Comment=Pause music during a phone call

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list