[SCM] ktp-common-internals packaging branch, master, updated. debian/15.12.1-2-1839-gf0635e9

Maximiliano Curia maxy at moszumanska.debian.org
Mon May 9 09:08:20 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-common-internals.git;a=commitdiff;h=89dc0c1

The following commit has been merged in the master branch:
commit 89dc0c1f121964b54026ad4c28528d7f1b5f08d6
Author: Marcin Ziemiński <zieminn at gmail.com>
Date:   Sun Jul 27 21:08:36 2014 +0200

    Spec update. Trust fingeprint method added.
    
    Signed-off-by: Marcin Ziemiński <zieminn at gmail.com>
---
 otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp |  10 ++
 otr-proxy/KTpProxy/otr-proxy-channel-adaptee.h   |   3 +
 otr-proxy/KTpProxy/svc-channel-proxy.cpp         |  15 +++
 otr-proxy/KTpProxy/svc-channel-proxy.h           |  46 ++++++++-
 otr-proxy/spec/ChannelProxy_Interface_OTR.xml    | 126 ++++++++++++++++++++++-
 5 files changed, 192 insertions(+), 8 deletions(-)

diff --git a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
index 3bde745..09342e5 100644
--- a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
+++ b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.cpp
@@ -228,6 +228,16 @@ void OtrProxyChannel::Adaptee::stop(const Tp::Service::ChannelProxyInterfaceOTRA
     context->setFinished();
 }
 
+void OtrProxyChannel::Adaptee::trustFingerprint(const QString& fingerprint, bool trust,
+        const Tp::Service::ChannelProxyInterfaceOTRAdaptor::TrustFingerprintContextPtr &context)
+{
+    // TODO implement
+    Q_UNUSED(fingerprint);
+    Q_UNUSED(trust);
+
+    context->setFinished();
+}
+
 void OtrProxyChannel::Adaptee::onMessageReceived(const Tp::ReceivedMessage &receivedMessage)
 {
     const uint id = receivedMessage.header()[QLatin1String("pending-message-id")].variant().toUInt(nullptr);
diff --git a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.h b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.h
index 35d5e82..efa8eb7 100644
--- a/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.h
+++ b/otr-proxy/KTpProxy/otr-proxy-channel-adaptee.h
@@ -60,6 +60,8 @@ class OtrProxyChannel::Adaptee : public QObject
 
         void initialize(const Tp::Service::ChannelProxyInterfaceOTRAdaptor::InitializeContextPtr &context);
         void stop(const Tp::Service::ChannelProxyInterfaceOTRAdaptor::StopContextPtr &context);
+        void trustFingerprint(const QString& fingerprint, bool trust,
+                const Tp::Service::ChannelProxyInterfaceOTRAdaptor::TrustFingerprintContextPtr &context);
 
         void onMessageReceived(const Tp::ReceivedMessage &receivedMessage);
         void onPendingMessageRemoved(const Tp::ReceivedMessage &receivedMessage);
@@ -72,6 +74,7 @@ class OtrProxyChannel::Adaptee : public QObject
         void pendingMessagesRemoved(const Tp::UIntList &ids);
         void sessionRefreshed();
         void closed();
+        void trustLevelChanged(uint trustLevel);
 
     private:
         Tp::Service::ChannelProxyInterfaceOTRAdaptor *adaptor;
diff --git a/otr-proxy/KTpProxy/svc-channel-proxy.cpp b/otr-proxy/KTpProxy/svc-channel-proxy.cpp
index 10e2155..fa38008 100644
--- a/otr-proxy/KTpProxy/svc-channel-proxy.cpp
+++ b/otr-proxy/KTpProxy/svc-channel-proxy.cpp
@@ -15,6 +15,7 @@ ChannelProxyInterfaceOTRAdaptor::ChannelProxyInterfaceOTRAdaptor(const QDBusConn
     connect(adaptee, SIGNAL(messageReceived(const Tp::MessagePartList&)), SIGNAL(MessageReceived(const Tp::MessagePartList&)));
     connect(adaptee, SIGNAL(pendingMessagesRemoved(const Tp::UIntList&)), SIGNAL(PendingMessagesRemoved(const Tp::UIntList&)));
     connect(adaptee, SIGNAL(sessionRefreshed()), SIGNAL(SessionRefreshed()));
+    connect(adaptee, SIGNAL(trustLevelChanged(uint)), SIGNAL(TrustLevelChanged(uint)));
 }
 
 ChannelProxyInterfaceOTRAdaptor::~ChannelProxyInterfaceOTRAdaptor()
@@ -132,5 +133,19 @@ void ChannelProxyInterfaceOTRAdaptor::Stop(const QDBusMessage& dbusMessage)
         Q_ARG(Tp::Service::ChannelProxyInterfaceOTRAdaptor::StopContextPtr, ctx));
 }
 
+void ChannelProxyInterfaceOTRAdaptor::TrustFingerprint(const QString& fingerprint, bool trust, const QDBusMessage& dbusMessage)
+{
+    if (!adaptee()->metaObject()->indexOfMethod("trustFingerprint(QString,bool,Tp::Service::ChannelProxyInterfaceOTRAdaptor::TrustFingerprintContextPtr)") == -1) {
+        dbusConnection().send(dbusMessage.createErrorReply(TP_QT_ERROR_NOT_IMPLEMENTED, QLatin1String("Not implemented")));
+        return;
+    }
+
+    TrustFingerprintContextPtr ctx = TrustFingerprintContextPtr(
+            new Tp::MethodInvocationContext<  >(dbusConnection(), dbusMessage));
+    QMetaObject::invokeMethod(adaptee(), "trustFingerprint",
+        Q_ARG(QString, fingerprint), Q_ARG(bool, trust),
+        Q_ARG(Tp::Service::ChannelProxyInterfaceOTRAdaptor::TrustFingerprintContextPtr, ctx));
+}
+
 }
 }
diff --git a/otr-proxy/KTpProxy/svc-channel-proxy.h b/otr-proxy/KTpProxy/svc-channel-proxy.h
index 088eb70..d4a6d6f 100644
--- a/otr-proxy/KTpProxy/svc-channel-proxy.h
+++ b/otr-proxy/KTpProxy/svc-channel-proxy.h
@@ -55,6 +55,10 @@ class TP_QT_EXPORT ChannelProxyInterfaceOTRAdaptor : public Tp::AbstractAdaptor
 "    </method>
"
 "    <method name=\"Initialize\"/>
"
 "    <method name=\"Stop\"/>
"
+"    <method name=\"TrustFingerprint\">
"
+"      <arg direction=\"in\" type=\"s\" name=\"fingerprint\"/>
"
+"      <arg direction=\"in\" type=\"b\" name=\"trust\"/>
"
+"    </method>
"
 "    <signal name=\"MessageSent\">
"
 "      <arg type=\"aa{sv}\" name=\"content\">
"
 "        <annotation value=\"Tp::MessagePartList\" name=\"com.trolltech.QtDBus.QtTypeName.In0\"/>
"
@@ -71,6 +75,9 @@ class TP_QT_EXPORT ChannelProxyInterfaceOTRAdaptor : public Tp::AbstractAdaptor
 "      <arg type=\"au\" name=\"messageIDs\"/>
"
 "    </signal>
"
 "    <signal name=\"SessionRefreshed\"/>
"
+"    <signal name=\"TrustLevelChanged\">
"
+"      <arg type=\"u\" name=\"trustLevel\"/>
"
+"    </signal>
"
 "  </interface>
"
 "")
     Q_PROPERTY(QDBusObjectPath WrappedChannel READ WrappedChannel )
@@ -90,6 +97,7 @@ public:
     typedef Tp::MethodInvocationContextPtr<  > AcknowledgePendingMessagesContextPtr;
     typedef Tp::MethodInvocationContextPtr<  > InitializeContextPtr;
     typedef Tp::MethodInvocationContextPtr<  > StopContextPtr;
+    typedef Tp::MethodInvocationContextPtr<  > TrustFingerprintContextPtr;
 
 public: // PROPERTIES
     /**
@@ -181,9 +189,8 @@ public: // PROPERTIES
      * 
      * \htmlonly
      * <p>The current fingerprint of the remote contact. Should be displayed
-     * to the user to update its trust level. The first element of the tuple
-     * is the fingerprint formatted to be displayed. The 2nd element is the
-     * fingerprint raw data that can be passed to TrustFingerprint</p>
+     *   to the user to update its trust level. It is shown in human readable format i.e.
+     *   :e .</p>
      * \endhtmlonly
      *
      * 
eturn The value of exported property 
-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list