aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2011-12-02 14:13:19 +0000
committerYana Stamcheva <yana@jitsi.org>2011-12-02 14:13:19 +0000
commita39663a7106dd7a6ba2ed256ae72b86aa87b9927 (patch)
treeeeff38acc21447d4615883b81653cc862f7ad72b /src/net/java/sip
parentbee005ce7a5ee405f07c5b31a7f21aaedabd1787 (diff)
downloadjitsi-a39663a7106dd7a6ba2ed256ae72b86aa87b9927.zip
jitsi-a39663a7106dd7a6ba2ed256ae72b86aa87b9927.tar.gz
jitsi-a39663a7106dd7a6ba2ed256ae72b86aa87b9927.tar.bz2
Checks for contact capabilities when adding video and desktop streaming buttons in the call.
Diffstat (limited to 'src/net/java/sip')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java37
1 files changed, 33 insertions, 4 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
index 20eb34b..c7cbd96 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallPanel.java
@@ -1174,10 +1174,6 @@ public class CallPanel
*/
private void addOneToOneSpecificComponents()
{
- settingsPanel.add(transferCallButton);
- settingsPanel.add(desktopSharingButton);
- settingsPanel.add(videoButton);
-
Iterator<? extends CallPeer> callPeers = call.getCallPeers();
while (callPeers.hasNext())
@@ -1189,6 +1185,39 @@ public class CallPanel
enableButtons(true);
return;
}
+
+ settingsPanel.add(transferCallButton);
+
+ Contact peerContact = callPeer.getContact();
+
+ ProtocolProviderService callProvider
+ = call.getProtocolProvider();
+
+ OperationSetContactCapabilities capOpSet
+ = callProvider.getOperationSet(
+ OperationSetContactCapabilities.class);
+
+ if (peerContact != null
+ && capOpSet != null)
+ {
+ if (capOpSet.getOperationSet(peerContact,
+ OperationSetDesktopSharingServer.class) != null)
+ settingsPanel.add(desktopSharingButton);
+
+ if (capOpSet.getOperationSet(peerContact,
+ OperationSetVideoTelephony.class) != null)
+ settingsPanel.add(videoButton);
+ }
+ else
+ {
+ if (callProvider.getOperationSet(
+ OperationSetDesktopSharingServer.class) != null)
+ settingsPanel.add(desktopSharingButton);
+
+ if (callProvider.getOperationSet(
+ OperationSetVideoTelephony.class) != null)
+ settingsPanel.add(videoButton);
+ }
}
enableButtons(false);
}