[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:04:34 UTC 2016


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

The following commit has been merged in the master branch:
commit b46b1488f02a5a2b62267e2cdd735a97fa50ba5a
Author: George Kiagiadakis <george.kiagiadakis at collabora.com>
Date:   Sat Sep 17 15:45:24 2011 +0300

    Add desktop sharing capability role in the model.
---
 models/accounts-model.h       |  1 +
 models/contact-model-item.cpp | 12 ++++++++++--
 models/contact-model-item.h   |  1 +
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/models/accounts-model.h b/models/accounts-model.h
index 40b915b..47925e1 100644
--- a/models/accounts-model.h
+++ b/models/accounts-model.h
@@ -85,6 +85,7 @@ public:
         VideoCallCapabilityRole,
         UpgradeCallCapabilityRole,
         FileTransferCapabilityRole,
+        DesktopSharingCapabilityRole,
 
         TotalUsersCountRole,
         OnlineUsersCountRole,
diff --git a/models/contact-model-item.cpp b/models/contact-model-item.cpp
index c32b4ff..b35d69e 100644
--- a/models/contact-model-item.cpp
+++ b/models/contact-model-item.cpp
@@ -123,9 +123,10 @@ QVariant ContactModelItem::data(int role) const
         return videoCallCapability();
     case AccountsModel::UpgradeCallCapabilityRole:
         return mPriv->mContact->capabilities().upgradingStreamedMediaCalls();
-    case AccountsModel::FileTransferCapabilityRole: {
+    case AccountsModel::FileTransferCapabilityRole:
         return fileTransferCapability();
-    }
+    case AccountsModel::DesktopSharingCapabilityRole:
+        return desktopSharingCapability();
     default:
         break;
     }
@@ -194,4 +195,11 @@ bool ContactModelItem::fileTransferCapability() const
     return contactCanHandleFiles && selfCanHandleFiles;
 }
 
+bool ContactModelItem::desktopSharingCapability() const
+{
+    bool contactCanHandleRfb = mPriv->mContact->capabilities().streamTubes("rfb");
+    bool selfCanHandleRfb = mPriv->mContact->manager()->connection()->selfContact()->capabilities().streamTubes("rfb");
+    return contactCanHandleRfb && selfCanHandleRfb;
+}
+
 #include "contact-model-item.moc"
diff --git a/models/contact-model-item.h b/models/contact-model-item.h
index cc2a59f..c69d12f 100644
--- a/models/contact-model-item.h
+++ b/models/contact-model-item.h
@@ -50,6 +50,7 @@ private:
     bool audioCallCapability() const;
     bool videoCallCapability() const;
     bool fileTransferCapability() const;
+    bool desktopSharingCapability() const;
 
     struct Private;
     friend struct Private;

-- 
ktp-common-internals packaging



More information about the pkg-kde-commits mailing list