1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Add MultiUserChatManager.getMucServiceDomains()

and deprecate getXMPPServiceDomains().
This commit is contained in:
Florian Schmaus 2018-04-18 09:11:04 +02:00
parent 5fbf2ce75a
commit 4fb34a6952
3 changed files with 23 additions and 7 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2014-2017 Florian Schmaus
* Copyright © 2014-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -338,11 +338,27 @@ public final class MultiUserChatManager extends Manager {
* @throws NotConnectedException
* @throws InterruptedException
*/
public List<DomainBareJid> getXMPPServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
public List<DomainBareJid> getMucServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection());
return sdm.findServices(MUCInitialPresence.NAMESPACE, false, false);
}
/**
* Returns a collection with the XMPP addresses of the Multi-User Chat services.
*
* @return a collection with the XMPP addresses of the Multi-User Chat services.
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotConnectedException
* @throws InterruptedException
* @deprecated use {@link #getMucServiceDomains()} instead.
*/
// TODO: Remove in Smack 4.5
@Deprecated
public List<DomainBareJid> getXMPPServiceDomains() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
return getMucServiceDomains();
}
/**
* Check if the provided domain bare JID provides a MUC service.
*