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

Merge branch '4.2'

This commit is contained in:
Florian Schmaus 2018-02-21 20:13:05 +01:00
commit a48e8ef843
155 changed files with 638 additions and 160 deletions

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks initializer for extensions.
*/
package org.jivesoftware.smack.extensions;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-33: Extended Stanza Addressing.
* Smack's API for XEP-0033: Extended Stanza Addressing.
*/
package org.jivesoftware.smackx.address;

View file

@ -16,6 +16,6 @@
*/
/**
* Stanzas and extension elements for XEP-33: Extended Stanzas Addressing.
* Stanzas and extension elements for XEP-0033: Extended Stanzas Addressing.
*/
package org.jivesoftware.smackx.address.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* Providers for XEP-33: Extended Stanza Addressing.
* Providers for XEP-0033: Extended Stanza Addressing.
*/
package org.jivesoftware.smackx.address.provider;

View file

@ -85,7 +85,7 @@ public class ServiceAdministrationManager extends Manager {
FormField passwordVerifyField = answerForm.getField("password-verify");
passwordVerifyField.addValue(password);
command.next(answerForm);
command.execute(answerForm);
assert (command.isCompleted());
}
@ -113,7 +113,7 @@ public class ServiceAdministrationManager extends Manager {
FormField accountJids = answerForm.getField("accountjids");
accountJids.addValues(JidUtil.toStringList(jidsToDelete));
command.next(answerForm);
command.execute(answerForm);
assert (command.isCompleted());
}
}

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-79: Advanced Message Processing.
* Smack's API for XEP-0079: Advanced Message Processing.
*/
package org.jivesoftware.smackx.amp;

View file

@ -16,6 +16,6 @@
*/
/**
* Stanzas and extension elements for XEP-79: Advanced Message Processing.
* Stanzas and extension elements for XEP-0079: Advanced Message Processing.
*/
package org.jivesoftware.smackx.amp.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* Providers for XEP-79: Advanced Message Processing.
* Providers for XEP-0079: Advanced Message Processing.
*/
package org.jivesoftware.smackx.amp.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-224: Attention.
* Smack's API for XEP-0224: Attention.
*/
package org.jivesoftware.smackx.attention;

View file

@ -16,6 +16,6 @@
*/
/**
* Stanzas and extension elements for XEP-224: Attention.
* Stanzas and extension elements for XEP-0224: Attention.
*/
package org.jivesoftware.smackx.attention.packet;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
/**
* Classes and interfaces of Bits of Binary.
* Classes and interfaces of XEP-0231: Bits of Binary.
*
* @author Fernando Ramirez
* @see <a href="http://xmpp.org/extensions/xep-0231.html">XEP-0231: Bits of

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-48: Bookmarks.
* Smack's API for XEP-0048: Bookmarks.
*/
package org.jivesoftware.smackx.bookmarks;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-47: In-Band Bytestreams.
* Smack's API for XEP-0047: In-Band Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.ibb;

View file

@ -16,6 +16,6 @@
*/
/**
* Stanzas and extension elements for XEP-47: In-Band Bytestreams.
* Stanzas and extension elements for XEP-0047: In-Band Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.ibb.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* Providers for XEP-47: In-Band Bytestreams.
* Providers for XEP-0047: In-Band Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.ibb.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-65: SOCKS5 Bytestreams.
* Smack's API for XEP-0065: SOCKS5 Bytestreams, as well as XEP-0047: In-Band Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-65: SOCKS5 Bytestreams.
* Smack's API for XEP-0065: SOCKS5 Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.socks5;

View file

@ -16,6 +16,6 @@
*/
/**
* Stanzas and extension elements for XEP-65: SOCKS5 Bytestreams.
* Stanzas and extension elements for XEP-0065: SOCKS5 Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.socks5.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* Providers for XEP-65: SOCKS5 Bytestreams.
* Providers for XEP-0065: SOCKS5 Bytestreams.
*/
package org.jivesoftware.smackx.bytestreams.socks5.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Cache classes for XEP-0115: Entity Capabilities.
*/
package org.jivesoftware.smackx.caps.cache;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0115: Entity Capabilities.
*/
package org.jivesoftware.smackx.caps;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0115: Entity Capabilities.
*/
package org.jivesoftware.smackx.caps.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0115: Entity Capabilities.
*/
package org.jivesoftware.smackx.caps.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0085: Chat State Notifications.
*/
package org.jivesoftware.smackx.chatstates;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0085: Chat State Notifications.
*/
package org.jivesoftware.smackx.chatstates.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* Provider classes for Chat State Notifications (XEP-0085).
* Provider classes for XEP-0085: Chat State Notifications.
*/
package org.jivesoftware.smackx.chatstates.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0050: Ad-Hoc Commands.
*/
package org.jivesoftware.smackx.commands;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0050: Ad-Hoc Commands.
*/
package org.jivesoftware.smackx.commands.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0050: Ad-Hoc Commands.
*/
package org.jivesoftware.smackx.commands.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* StanzaFilter classes for XEP-0203: Delayed Delivery, as well as XEP-0091: Legacy Delayed Delivery.
*/
package org.jivesoftware.smackx.delay.filter;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0203: Delayed Delivery, as well as XEP-0091: Legacy Delayed Delivery.
*/
package org.jivesoftware.smackx.delay;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0203: Delayed Delivery, as well as XEP-0091: Legacy Delayed Delivery.
*/
package org.jivesoftware.smackx.delay.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0203: Delayed Delivery, as well as XEP-0091: Legacy Delayed Delivery.
*/
package org.jivesoftware.smackx.delay.provider;

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2003-2007 Jive Software.
* Copyright 2003-2007 Jive Software, 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.
@ -43,6 +43,7 @@ import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.caps.EntityCapsManager;
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
@ -66,6 +67,7 @@ import org.jxmpp.util.cache.ExpirationCache;
* </ol>
*
* @author Gaston Dombiak
* @author Florian Schmaus
*/
public final class ServiceDiscoveryManager extends Manager {
@ -875,20 +877,26 @@ public final class ServiceDiscoveryManager extends Manager {
public DomainBareJid findService(String feature, boolean useCache, String category, String type)
throws NoResponseException, XMPPErrorException, NotConnectedException,
InterruptedException {
List<DiscoverInfo> services = findServicesDiscoverInfo(feature, true, useCache);
boolean noCategory = StringUtils.isNullOrEmpty(category);
boolean noType = StringUtils.isNullOrEmpty(type);
if (noType != noCategory) {
throw new IllegalArgumentException("Must specify either both, category and type, or none");
}
List<DiscoverInfo> services = findServicesDiscoverInfo(feature, false, useCache);
if (services.isEmpty()) {
return null;
}
DiscoverInfo info = services.get(0);
if (category != null && type != null) {
if (!info.hasIdentity(category, type)) {
return null;
if (!noCategory && !noType) {
for (DiscoverInfo info : services) {
if (info.hasIdentity(category, type)) {
return info.getFrom().asDomainBareJid();
}
}
}
else if (category != null || type != null) {
throw new IllegalArgumentException("Must specify either both, category and type, or none");
}
return info.getFrom().asDomainBareJid();
return services.get(0).getFrom().asDomainBareJid();
}
public DomainBareJid findService(String feature, boolean useCache) throws NoResponseException,

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0030: Service Discovery.
*/
package org.jivesoftware.smackx.disco;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0030: Service Discovery.
*/
package org.jivesoftware.smackx.disco.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0030: Service Discovery.
*/
package org.jivesoftware.smackx.disco.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* File Transfers via XEP-0095: Stream Initialization.
*/
package org.jivesoftware.smackx.filetransfer;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0297: Stanza Forwarding.
*/
package org.jivesoftware.smackx.forward;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0297: Stanza Forwarding.
*/
package org.jivesoftware.smackx.forward.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0297: Stanza Forwarding.
*/
package org.jivesoftware.smackx.forward.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0080: User Location.
*/
package org.jivesoftware.smackx.geoloc;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0080: User Location.
*/
package org.jivesoftware.smackx.geoloc.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0080: User Location.
*/
package org.jivesoftware.smackx.geoloc.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0012: Last Activity.
*/
package org.jivesoftware.smackx.iqlast;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0012: Last Activity.
*/
package org.jivesoftware.smackx.iqlast.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0049: Private XML Storage.
*/
package org.jivesoftware.smackx.iqprivate;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0049: Private XML Storage.
*/
package org.jivesoftware.smackx.iqprivate.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0049: Private XML Storage.
*/
package org.jivesoftware.smackx.iqprivate.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0077: In-Band Registration.
*/
package org.jivesoftware.smackx.iqregister;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0077: In-Band Registration.
*/
package org.jivesoftware.smackx.iqregister.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0077: In-Band Registration.
*/
package org.jivesoftware.smackx.iqregister.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0092: Software Version.
*/
package org.jivesoftware.smackx.iqversion;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0092: Software Version.
*/
package org.jivesoftware.smackx.iqversion.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0092: Software Version.
*/
package org.jivesoftware.smackx.iqversion.provider;

View file

@ -16,6 +16,7 @@
*/
/**
* TODO describe me.
* Smacks implementation for attaching arbitrary properties to packets according to
* https://docs.jivesoftware.com/smack/latest/documentation/properties.html.
*/
package org.jivesoftware.smackx.jiveproperties;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes.
*/
package org.jivesoftware.smackx.jiveproperties.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes.
*/
package org.jivesoftware.smackx.jiveproperties.provider;

View file

@ -14,4 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* XMPP stream element providers for Last Message Correction as defined in XEP-0308.
*/
package org.jivesoftware.smackx.message_correct.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* Classes and Interfaces that implement Multi-User Chat (MUC) as defined in XEP-45.
* Classes and Interfaces that implement Multi-User Chat (MUC) as defined in XEP-0045.
*/
package org.jivesoftware.smackx.muc;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0045: Multi-User Chat.
*/
package org.jivesoftware.smackx.muc.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0045: Multi-User Chat.
*/
package org.jivesoftware.smackx.muc.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0172: User Nickname.
*/
package org.jivesoftware.smackx.nick;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0172: User Nickname.
*/
package org.jivesoftware.smackx.nick.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0013: Flexible Offline Message Retrieval.
*/
package org.jivesoftware.smackx.offline;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0013: Flexible Offline Message Retrieval.
*/
package org.jivesoftware.smackx.offline.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Integration tests.
*/
package org.jivesoftware.smackx;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation XEP-0163: Personal Eventing Protocol.
*/
package org.jivesoftware.smackx.pep;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0199: XMPP Ping.
*/
package org.jivesoftware.smackx.ping;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0199: XMPP Ping.
*/
package org.jivesoftware.smackx.ping.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0199: XMPP Ping.
*/
package org.jivesoftware.smackx.ping.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Filters for XEP-0016: Privacy Lists.
*/
package org.jivesoftware.smackx.privacy.filter;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0016: Privacy Lists.
*/
package org.jivesoftware.smackx.privacy;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0016: Privacy Lists.
*/
package org.jivesoftware.smackx.privacy.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0016: Privacy Lists.
*/
package org.jivesoftware.smackx.privacy.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* Smack's API for XEP-60: Publish-Subscribe.
* Smack's API for XEP-0060: Publish-Subscribe.
*/
package org.jivesoftware.smackx.pubsub;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* XEP-0184: Message Delivery Receipts.
*/
package org.jivesoftware.smackx.receipts;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* XEP-0059: Result Set Management.
*/
package org.jivesoftware.smackx.rsm;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes of XEP-0059: Result Set Management.
*/
package org.jivesoftware.smackx.rsm.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Providers for XEP-0059: Result Set Management.
*/
package org.jivesoftware.smackx.rsm.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0055: Jabber Search.
*/
package org.jivesoftware.smackx.search;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Implementation of shared groups. Will only work with Wildfire!
*/
package org.jivesoftware.smackx.sharedgroups;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes of shared groups.
*/
package org.jivesoftware.smackx.sharedgroups.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0131: Stanza Headers and Internet Metadata.
*/
package org.jivesoftware.smackx.shim;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0131: Stanza Headers and Internet Metadata.
*/
package org.jivesoftware.smackx.shim.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes of XEP-0131: Stanza Headers and Internet Metadata.
*/
package org.jivesoftware.smackx.shim.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0095: Stream Initiation.
*/
package org.jivesoftware.smackx.si;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0095: Stream Initiation.
*/
package org.jivesoftware.smackx.si.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0095: Stream Initiation.
*/
package org.jivesoftware.smackx.si.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0202: Entity Time.
*/
package org.jivesoftware.smackx.time;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes of XEP-0202: Entity Time.
*/
package org.jivesoftware.smackx.time.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes of XEP-0202: Entity Time.
*/
package org.jivesoftware.smackx.time.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0054: vcard-temp.
*/
package org.jivesoftware.smackx.vcardtemp;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0054: vcard-temp.
*/
package org.jivesoftware.smackx.vcardtemp.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0054: vcard-temp.
*/
package org.jivesoftware.smackx.vcardtemp.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0004: Data Forms.
*/
package org.jivesoftware.smackx.xdata;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0004: Data Forms.
*/
package org.jivesoftware.smackx.xdata.packet;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Provider classes for XEP-0004: Data Forms.
*/
package org.jivesoftware.smackx.xdata.provider;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Smacks implementation of XEP-0141: Data Forms Layout.
*/
package org.jivesoftware.smackx.xdatalayout;

View file

@ -16,6 +16,6 @@
*/
/**
* TODO describe me.
* Element classes for XEP-0141: Data Forms Layout.
*/
package org.jivesoftware.smackx.xdatalayout.packet;

Some files were not shown because too many files have changed in this diff Show more