1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 14:01:08 +01:00

Add ServiceDiscoveryManager.serverSupportsFeature()

This commit is contained in:
Florian Schmaus 2015-01-10 18:47:47 +01:00
parent b71039660b
commit 98c69f6895
4 changed files with 18 additions and 5 deletions

View file

@ -637,6 +637,21 @@ public class ServiceDiscoveryManager extends Manager {
connection().createPacketCollectorAndSend(discoverItems).nextResultOrThrow();
}
/**
* Returns true if the server supports the given feature.
*
* @param feature
* @return true if the server supports the given feature.
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @since 4.1
*/
public boolean serverSupportsFeature(String feature) throws NoResponseException, XMPPErrorException,
NotConnectedException {
return supportsFeature(connection().getServiceName(), feature);
}
/**
* Queries the remote entity for it's features and returns true if the given feature is found.
*