mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
Deprecate legacy disco-publish API of ServiceDiscoveryManager
This commit is contained in:
parent
41f5cf8435
commit
ec4be1963a
2 changed files with 16 additions and 0 deletions
|
@ -278,7 +278,11 @@ public final class AdHocCommandManager extends Manager {
|
|||
* @throws XMPPException if the operation failed for some reason.
|
||||
* @throws SmackException if there was no response from the server.
|
||||
* @throws InterruptedException
|
||||
* @deprecated This method uses no longer existent XEP-0030 features and will be removed.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4.
|
||||
public void publishCommands(Jid jid) throws XMPPException, SmackException, InterruptedException {
|
||||
// Collects the commands to publish as items
|
||||
DiscoverItems discoverItems = new DiscoverItems();
|
||||
|
|
|
@ -592,7 +592,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4
|
||||
public boolean canPublishItems(Jid entityID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
DiscoverInfo info = discoverInfo(entityID);
|
||||
return canPublishItems(info);
|
||||
|
@ -606,7 +609,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
*
|
||||
* @param info the discover info stanza(/packet) to check.
|
||||
* @return true if the server supports publishing of items.
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4
|
||||
public static boolean canPublishItems(DiscoverInfo info) {
|
||||
return info.containsFeature("http://jabber.org/protocol/disco#publish");
|
||||
}
|
||||
|
@ -623,7 +629,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4
|
||||
public void publishItems(Jid entityID, DiscoverItems discoverItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||
publishItems(entityID, null, discoverItems);
|
||||
}
|
||||
|
@ -641,7 +650,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @deprecated The disco-publish feature was removed from XEP-0030 in 2008 in favor of XEP-0060: Publish-Subscribe.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4
|
||||
public void publishItems(Jid entityID, String node, DiscoverItems discoverItems) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException
|
||||
{
|
||||
discoverItems.setType(IQ.Type.set);
|
||||
|
|
Loading…
Reference in a new issue