diff options
author | paweldomas <pawel.domas@jitsi.org> | 2016-08-23 12:45:50 -0500 |
---|---|---|
committer | paweldomas <pawel.domas@jitsi.org> | 2016-08-23 12:45:50 -0500 |
commit | 41e320d7ec83f34032d45241e892f4d6e44009bd (patch) | |
tree | ae3aaea58f8869f9480b0b154e2d3dad1faa2586 /src | |
parent | 47d41bd3683ea08a232565ce24d88b6292967386 (diff) | |
download | jitsi-41e320d7ec83f34032d45241e892f4d6e44009bd.zip jitsi-41e320d7ec83f34032d45241e892f4d6e44009bd.tar.gz jitsi-41e320d7ec83f34032d45241e892f4d6e44009bd.tar.bz2 |
Add 'removePresenceExtension' to OperationSetJitsiMeetTools
Diffstat (limited to 'src')
4 files changed, 48 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java index 8a6f3ed..e3d4f12 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/ChatRoomJabberImpl.java @@ -1896,6 +1896,23 @@ public class ChatRoomJabberImpl } /** + * Removes given <tt>PacketExtension</tt> from the MUC presence and + * publishes it immediately. + * @param extension the <tt>PacketExtension</tt> to be removed from the MUC + * presence. + */ + public void removePresenceExtension(PacketExtension extension) + { + if (lastPresenceSent != null) + { + setPacketExtension( + lastPresenceSent, null, extension.getNamespace()); + + provider.getConnection().sendPacket(lastPresenceSent); + } + } + + /** * Returns the ids of the users that has the member role in the room. * When the room is member only, this are the users allowed to join. * @return the ids of the users that has the member role in the room. diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetJitsiMeetToolsJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetJitsiMeetToolsJabberImpl.java index 0fb6979..7ea4453 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetJitsiMeetToolsJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetJitsiMeetToolsJabberImpl.java @@ -72,6 +72,16 @@ public class OperationSetJitsiMeetToolsJabberImpl * {@inheritDoc} */ @Override + public void removePresenceExtension(ChatRoom chatRoom, + PacketExtension extension) + { + ((ChatRoomJabberImpl)chatRoom).removePresenceExtension(extension); + } + + /** + * {@inheritDoc} + */ + @Override public void setPresenceStatus(ChatRoom chatRoom, String statusMessage) { ((ChatRoomJabberImpl)chatRoom).publishPresenceStatus(statusMessage); diff --git a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetJitsiMeetToolsSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetJitsiMeetToolsSipImpl.java index 77a7fae..4997fc1 100644 --- a/src/net/java/sip/communicator/impl/protocol/sip/OperationSetJitsiMeetToolsSipImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/sip/OperationSetJitsiMeetToolsSipImpl.java @@ -142,6 +142,16 @@ public class OperationSetJitsiMeetToolsSipImpl * {@inheritDoc} */ @Override + public void removePresenceExtension(ChatRoom chatRoom, + PacketExtension extension) + { + throw new RuntimeException("Not implemented for SIP"); + } + + /** + * {@inheritDoc} + */ + @Override public void setPresenceStatus(ChatRoom chatRoom, String statusMessage) { throw new RuntimeException("Not implemented for SIP"); diff --git a/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java b/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java index 08c8cff..41af2b4 100644 --- a/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java +++ b/src/net/java/sip/communicator/service/protocol/OperationSetJitsiMeetTools.java @@ -56,6 +56,17 @@ public interface OperationSetJitsiMeetTools PacketExtension extension); /** + * Removes given <tt>PacketExtension</tt> from the 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 removed from the MUC + * presence. + */ + public void removePresenceExtension(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 |