diff options
author | paweldomas <pawel.domas@jitsi.org> | 2014-12-08 13:40:45 +0100 |
---|---|---|
committer | paweldomas <pawel.domas@jitsi.org> | 2014-12-08 13:40:45 +0100 |
commit | 4a17fc226794bfaf5768fe6c01bcc7ba31abda1b (patch) | |
tree | b1e3117be5d44d92fb25ac7b30a1645984a73bfb /src/net/java/sip/communicator/service | |
parent | fbf0877aa1e01148c3048f826cb8dd11671d51cd (diff) | |
parent | 22bc098d4f0162ed8459e33a5ccfbda45e60dc6d (diff) | |
download | jitsi-4a17fc226794bfaf5768fe6c01bcc7ba31abda1b.zip jitsi-4a17fc226794bfaf5768fe6c01bcc7ba31abda1b.tar.gz jitsi-4a17fc226794bfaf5768fe6c01bcc7ba31abda1b.tar.bz2 |
Merge branch 'sipgateway'
Conflicts:
lib/installer-exclude/fmj.jar
lib/installer-exclude/ice4j.jar
lib/installer-exclude/libjitsi.jar
src/net/java/sip/communicator/impl/protocol/irc/IrcStack.java
src/net/java/sip/communicator/impl/protocol/jabber/CallPeerMediaHandlerJabberImpl.java
src/net/java/sip/communicator/impl/protocol/jabber/extensions/colibri/ColibriConferenceIQ.java
src/net/java/sip/communicator/impl/protocol/jabber/extensions/jingle/CandidatePacketExtension.java
src/net/java/sip/communicator/impl/protocol/jabber/jinglesdp/JingleUtils.java
Diffstat (limited to 'src/net/java/sip/communicator/service')
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java | 79 | ||||
-rw-r--r-- | src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java | 7 |
2 files changed, 85 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java b/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java new file mode 100644 index 0000000..8cf4af5 --- /dev/null +++ b/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java @@ -0,0 +1,79 @@ +/* + * Jitsi, the OpenSource Java VoIP and Instant Messaging client. + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package net.java.sip.communicator.service.protocol; + +import org.jivesoftware.smack.packet.*; + +/** + * The operation set provides functionality specific to Jitsi Meet WebRTC + * conference and is currently used in the SIP gateway. + * + * @author Pawel Domas + */ +public interface OperationSetJitsiMeetTools + extends OperationSet +{ + /** + * Adds given feature to communication protocol capabilities list of parent + * {@link ProtocolProviderService}. + * + * @param featureName feature name to be added to the capabilities list. + */ + public void addSupportedFeature(String featureName); + + /** + * Includes given <tt>PacketExtension</tt> in multi user chat presence and + * sends presence update packet to the chat room. + * @param chatRoom the <tt>ChatRoom</tt> for which the presence will be + * updated. + * @param extension the <tt>PacketExtension</tt> to be included in MUC + * presence. + */ + public void sendPresenceExtension(ChatRoom chatRoom, + PacketExtension extension); + + /** + * Sets the status message of our MUC presence and sends presence status + * update packet to the server. + * @param chatRoom the <tt>ChatRoom</tt> for which the presence status + * message will be changed. + * @param statusMessage the text that will be used as our presence status + * message in the MUC. + */ + public void setPresenceStatus(ChatRoom chatRoom, String statusMessage); + + /** + * Adds given <tt>listener</tt> to the list of + * {@link JitsiMeetRequestListener}s. + * @param listener the {@link JitsiMeetRequestListener} to be notified about + * future events. + */ + public void addRequestListener(JitsiMeetRequestListener listener); + + /** + * Removes given <tt>listener</tt> from the list of + * {@link JitsiMeetRequestListener}s. + * @param listener the {@link JitsiMeetRequestListener} that will be no + * longer notified about Jitsi Meet events. + */ + public void removeRequestListener(JitsiMeetRequestListener listener); + + /** + * Interface used to handle Jitsi Meet conference requests. + */ + interface JitsiMeetRequestListener + { + /** + * Events is fired for an incoming call that contains information about + * Jitsi Meet conference room to be joined. + * @param call the incoming {@link Call} instance. + * @param jitsiMeetRoom the name of multi user chat room that is hosting + * Jitsi Meet conference. + */ + void onJoinJitsiMeetRequest(Call call, String jitsiMeetRoom); + } +} diff --git a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java index 5caf298..20822b0 100644 --- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java @@ -611,6 +611,8 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>> return audioDirectionUserPreference; case VIDEO: return videoDirectionUserPreference; + case DATA: + return MediaDirection.INACTIVE; default: throw new IllegalArgumentException("mediaType"); } @@ -655,7 +657,10 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>> */ protected List<RTPExtension> getExtensionsForType(MediaType type) { - return getDefaultDevice(type).getSupportedExtensions(); + MediaDevice device = getDefaultDevice(type); + return device != null + ? device.getSupportedExtensions() + : new ArrayList<RTPExtension>(); } /** |