1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Replace legacy IQProvider with IqProvider

This commit is contained in:
Ingo Bauersachs 2022-04-01 22:06:18 +02:00
parent 78ffcae880
commit 4efa707028
94 changed files with 354 additions and 261 deletions

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smack.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.Bind; import org.jivesoftware.smack.packet.Bind;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -27,10 +28,10 @@ import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.jid.parts.Resourcepart; import org.jxmpp.jid.parts.Resourcepart;
public class BindIQProvider extends IQProvider<Bind> { public class BindIQProvider extends IqProvider<Bind> {
@Override @Override
public Bind parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public Bind parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
String name; String name;
Bind bind = null; Bind bind = null;
outerloop: while (true) { outerloop: while (true) {

View file

@ -28,7 +28,7 @@ import org.jivesoftware.smack.packet.IQ;
public final class IQProviderInfo extends AbstractProviderInfo { public final class IQProviderInfo extends AbstractProviderInfo {
/** /**
* Defines an IQ provider which implements the <code>IQProvider</code> interface. * Defines an IQ provider which implements the {@link IqProvider} interface.
* *
* @param elementName Element that provider parses. * @param elementName Element that provider parses.
* @param namespace Namespace that provider parses. * @param namespace Namespace that provider parses.

View file

@ -21,6 +21,7 @@ import java.lang.reflect.InvocationTargetException;
import org.jivesoftware.smack.packet.ExtensionElement; import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -42,7 +43,7 @@ public class IntrospectionProvider{
*/ */
// TODO: Remove in Smack 4.6. // TODO: Remove in Smack 4.6.
@Deprecated @Deprecated
public abstract static class IQIntrospectionProvider<I extends IQ> extends IQProvider<I> { public abstract static class IQIntrospectionProvider<I extends IQ> extends IqProvider<I> {
private final Class<I> elementClass; private final Class<I> elementClass;
protected IQIntrospectionProvider(Class<I> elementClass) { protected IQIntrospectionProvider(Class<I> elementClass) {
@ -51,7 +52,7 @@ public class IntrospectionProvider{
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public I parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public I parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
try { try {
return (I) parseWithIntrospection(elementClass, parser, initialDepth); return (I) parseWithIntrospection(elementClass, parser, initialDepth);
} }

View file

@ -23,9 +23,17 @@ import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData; import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
/**
* An abstract class for parsing custom {@link IQ} packets. Each IqProvider must be registered with the {@link
* ProviderManager} for it to be used. Every implementation of this abstract class <b>must</b> have a public,
* no-argument constructor.
*
* @param <I> the {@link IQ} that is parsed by implementations.
*/
public abstract class IqProvider<I extends IQ> extends AbstractProvider<I> { public abstract class IqProvider<I extends IQ> extends AbstractProvider<I> {
public final I parse(XmlPullParser parser, IqData iqCommon) public final I parse(XmlPullParser parser, IqData iqCommon)
@ -40,6 +48,8 @@ public abstract class IqProvider<I extends IQ> extends AbstractProvider<I> {
I i = wrapExceptions(() -> parse(parser, initialDepth, iqData, xmlEnvironment)); I i = wrapExceptions(() -> parse(parser, initialDepth, iqData, xmlEnvironment));
// Parser should be at end tag of the consumed/parsed element
ParserUtils.forwardToEndTagOfDepth(parser, initialDepth);
return i; return i;
} }

View file

@ -37,8 +37,11 @@ import org.jivesoftware.smack.xml.XmlPullParserException;
* abstract class <b>must</b> have a public, no-argument constructor. * abstract class <b>must</b> have a public, no-argument constructor.
* *
* @author Matt Tucker * @author Matt Tucker
* @deprecated Use {@link IqProvider} instead
*/ */
public abstract class IQProvider<I extends IQ> extends IqProvider<I> { @Deprecated
// TODO: Remove in Smack 4.6.
public abstract class LegacyIQProvider<I extends IQ> extends IqProvider<I> {
public final I parse(XmlPullParser parser) throws IOException, XmlPullParserException, SmackParsingException { public final I parse(XmlPullParser parser) throws IOException, XmlPullParserException, SmackParsingException {
return parse(parser, (XmlEnvironment) null); return parse(parser, (XmlEnvironment) null);

View file

@ -30,7 +30,7 @@ import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
/** /**
* Loads the {@link IQProvider} and {@link ExtensionElementProvider} information from a standard provider file in preparation * Loads the {@link IqProvider} and {@link ExtensionElementProvider} information from a standard provider file in preparation
* for loading into the {@link ProviderManager}. * for loading into the {@link ProviderManager}.
* *
* @author Robin Collier * @author Robin Collier
@ -76,7 +76,7 @@ public class ProviderFileLoader implements ProviderLoader {
switch (typeName) { switch (typeName) {
case "iqProvider": case "iqProvider":
// Attempt to load the provider class and then create // Attempt to load the provider class and then create
// a new instance if it's an IQProvider. Otherwise, if it's // a new instance if it's an IqProvider. Otherwise, if it's
// an IQ class, add the class object itself, then we'll use // an IQ class, add the class object itself, then we'll use
// reflection later to create instances of the class. // reflection later to create instances of the class.
// Add the provider to the map. // Add the provider to the map.
@ -85,7 +85,7 @@ public class ProviderFileLoader implements ProviderLoader {
iqProviders.add(new IQProviderInfo(elementName, namespace, iqProvider)); iqProviders.add(new IQProviderInfo(elementName, namespace, iqProvider));
} }
else { else {
exceptions.add(new IllegalArgumentException(className + " is not a IQProvider")); exceptions.add(new IllegalArgumentException(className + " is not a IqProvider"));
} }
break; break;
case "extensionProvider": case "extensionProvider":

View file

@ -34,11 +34,11 @@ import org.jivesoftware.smack.util.XmppElementUtil;
/** /**
* Manages providers for parsing custom XML sub-documents of XMPP packets. Two types of * Manages providers for parsing custom XML sub-documents of XMPP packets. Two types of
* providers exist:<ul> * providers exist:<ul>
* <li>IQProvider -- parses IQ requests into Java objects. * <li>IqProvider -- parses IQ requests into Java objects.
* <li>PacketExtension -- parses XML sub-documents attached to packets into * <li>PacketExtension -- parses XML sub-documents attached to packets into
* PacketExtension instances.</ul> * PacketExtension instances.</ul>
* *
* <b>IQProvider</b><p> * <b>IqProvider</b><p>
* *
* By default, Smack only knows how to process IQ packets with sub-packets that * By default, Smack only knows how to process IQ packets with sub-packets that
* are in a few namespaces such as:<ul> * are in a few namespaces such as:<ul>
@ -63,8 +63,8 @@ import org.jivesoftware.smack.util.XmppElementUtil;
* *
* Each IQ provider is associated with an element name and a namespace. If multiple provider * Each IQ provider is associated with an element name and a namespace. If multiple provider
* entries attempt to register to handle the same namespace, the first entry loaded from the * entries attempt to register to handle the same namespace, the first entry loaded from the
* classpath will take precedence. The IQ provider class can either implement the IQProvider * classpath will take precedence. The IQ provider class can either implement the IqProvider
* interface, or extend the IQ class. In the former case, each IQProvider is responsible for * interface, or extend the IQ class. In the former case, each IqProvider is responsible for
* parsing the raw XML stream to create an IQ instance. In the latter case, bean introspection * parsing the raw XML stream to create an IQ instance. In the latter case, bean introspection
* is used to try to automatically set properties of the IQ instance using the values found * is used to try to automatically set properties of the IQ instance using the values found
* in the IQ stanza XML. For example, an XMPP time stanza resembles the following: * in the IQ stanza XML. For example, an XMPP time stanza resembles the following:
@ -173,11 +173,11 @@ public final class ProviderManager {
} }
/** /**
* Returns an unmodifiable collection of all IQProvider instances. Each object * Returns an unmodifiable collection of all IqProvider instances. Each object
* in the collection will either be an IQProvider instance, or a Class object * in the collection will either be an IqProvider instance, or a Class object
* that implements the IQProvider interface. * that implements the IqProvider interface.
* *
* @return all IQProvider instances. * @return all IqProvider instances.
*/ */
public static List<IqProvider<IQ>> getIQProviders() { public static List<IqProvider<IQ>> getIQProviders() {
List<IqProvider<IQ>> providers = new ArrayList<>(iqProviders.size()); List<IqProvider<IQ>> providers = new ArrayList<>(iqProviders.size());
@ -186,7 +186,7 @@ public final class ProviderManager {
} }
/** /**
* Adds an IQ provider (must be an instance of IQProvider or Class object that is an IQ) * Adds an IQ provider (must be an instance of IqProvider or Class object that is an IQ)
* with the specified element name and name space. The provider will override any providers * with the specified element name and name space. The provider will override any providers
* loaded through the classpath. * loaded through the classpath.
* *

View file

@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.util.FileUtils; import org.jivesoftware.smack.util.FileUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -60,10 +61,10 @@ public class ProviderConfigTest {
Assert.assertNotNull(ProviderManager.getIQProvider("provider", "test:file_provider")); Assert.assertNotNull(ProviderManager.getIQProvider("provider", "test:file_provider"));
} }
public static class TestIQProvider extends IQProvider<IQ> { public static class TestIQProvider extends IqProvider<IQ> {
@Override @Override
public IQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
return null; return null;
} }

View file

@ -20,6 +20,7 @@ import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.SmackConfiguration; import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -37,10 +38,10 @@ public class ProviderManagerTest {
assertTrue(SmackConfiguration.isSmackInitialized()); assertTrue(SmackConfiguration.isSmackInitialized());
} }
public static class TestIQProvider extends IQProvider<IQ> { public static class TestIQProvider extends IqProvider<IQ> {
@Override @Override
public IQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
return null; return null;
} }

View file

@ -18,18 +18,19 @@ package org.jivesoftware.smackx.dox.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.dox.element.DnsIq; import org.jivesoftware.smackx.dox.element.DnsIq;
public class DnsIqProvider extends IQProvider<DnsIq> { public class DnsIqProvider extends IqProvider<DnsIq> {
@Override @Override
public DnsIq parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public DnsIq parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException, SmackParsingException { throws XmlPullParserException, IOException, SmackParsingException {
String base64DnsMessage = parser.nextText(); String base64DnsMessage = parser.nextText();
return new DnsIq(base64DnsMessage); return new DnsIq(base64DnsMessage);

View file

@ -20,7 +20,7 @@ import java.io.IOException;
import org.jivesoftware.smack.packet.NamedElement; import org.jivesoftware.smack.packet.NamedElement;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -35,7 +35,7 @@ import org.jivesoftware.smackx.shim.provider.HeadersProvider;
* @author Andriy Tsykholyas * @author Andriy Tsykholyas
* @see <a href="http://xmpp.org/extensions/xep-0332.html">XEP-0332: HTTP over XMPP transport</a> * @see <a href="http://xmpp.org/extensions/xep-0332.html">XEP-0332: HTTP over XMPP transport</a>
*/ */
public abstract class AbstractHttpOverXmppProvider<H extends AbstractHttpOverXmpp> extends IQProvider<H> { public abstract class AbstractHttpOverXmppProvider<H extends AbstractHttpOverXmpp> extends IqProvider<H> {
private static final String ELEMENT_DATA = "data"; private static final String ELEMENT_DATA = "data";
private static final String ELEMENT_TEXT = "text"; private static final String ELEMENT_TEXT = "text";

View file

@ -18,6 +18,7 @@ package org.jivesoftware.smackx.hoxt.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
@ -40,7 +41,7 @@ public class HttpOverXmppReqProvider extends AbstractHttpOverXmppProvider<HttpOv
private static final String ATTRIBUTE_MAX_CHUNK_SIZE = "maxChunkSize"; private static final String ATTRIBUTE_MAX_CHUNK_SIZE = "maxChunkSize";
@Override @Override
public HttpOverXmppReq parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException { public HttpOverXmppReq parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException {
HttpOverXmppReq.Builder builder = HttpOverXmppReq.builder(); HttpOverXmppReq.Builder builder = HttpOverXmppReq.builder();
builder.setResource(parser.getAttributeValue("", ATTRIBUTE_RESOURCE)); builder.setResource(parser.getAttributeValue("", ATTRIBUTE_RESOURCE));
builder.setVersion(parser.getAttributeValue("", ATTRIBUTE_VERSION)); builder.setVersion(parser.getAttributeValue("", ATTRIBUTE_VERSION));

View file

@ -18,6 +18,7 @@ package org.jivesoftware.smackx.hoxt.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -39,7 +40,7 @@ public class HttpOverXmppRespProvider extends AbstractHttpOverXmppProvider<HttpO
private static final String ATTRIBUTE_STATUS_CODE = "statusCode"; private static final String ATTRIBUTE_STATUS_CODE = "statusCode";
@Override @Override
public HttpOverXmppResp parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException { public HttpOverXmppResp parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException {
String version = parser.getAttributeValue("", ATTRIBUTE_VERSION); String version = parser.getAttributeValue("", ATTRIBUTE_VERSION);
String statusMessage = parser.getAttributeValue("", ATTRIBUTE_STATUS_MESSAGE); String statusMessage = parser.getAttributeValue("", ATTRIBUTE_STATUS_MESSAGE);
String statusCodeString = parser.getAttributeValue("", ATTRIBUTE_STATUS_CODE); String statusCodeString = parser.getAttributeValue("", ATTRIBUTE_STATUS_CODE);

View file

@ -21,8 +21,9 @@ import java.net.URL;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -38,10 +39,10 @@ import org.jivesoftware.smackx.httpfileupload.element.Slot_V0_2;
* @author Grigory Fedorov * @author Grigory Fedorov
* @see <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP File Upload</a> * @see <a href="http://xmpp.org/extensions/xep-0363.html">XEP-0363: HTTP File Upload</a>
*/ */
public class SlotProvider extends IQProvider<Slot> { public class SlotProvider extends IqProvider<Slot> {
@Override @Override
public Slot parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public Slot parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
final String namespace = parser.getNamespace(); final String namespace = parser.getNamespace();
final UploadService.Version version = HttpFileUploadManager.namespaceToVersion(namespace); final UploadService.Version version = HttpFileUploadManager.namespaceToVersion(namespace);

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -32,10 +33,10 @@ import org.jivesoftware.smackx.iot.control.element.SetDoubleData;
import org.jivesoftware.smackx.iot.control.element.SetIntData; import org.jivesoftware.smackx.iot.control.element.SetIntData;
import org.jivesoftware.smackx.iot.control.element.SetLongData; import org.jivesoftware.smackx.iot.control.element.SetLongData;
public class IoTSetRequestProvider extends IQProvider<IoTSetRequest> { public class IoTSetRequestProvider extends IqProvider<IoTSetRequest> {
@Override @Override
public IoTSetRequest parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public IoTSetRequest parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
List<SetData> data = new ArrayList<>(4); List<SetData> data = new ArrayList<>(4);
outerloop: while (true) { outerloop: while (true) {
final XmlPullParser.Event eventType = parser.next(); final XmlPullParser.Event eventType = parser.next();

View file

@ -16,16 +16,17 @@
*/ */
package org.jivesoftware.smackx.iot.control.provider; package org.jivesoftware.smackx.iot.control.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.control.element.IoTSetResponse; import org.jivesoftware.smackx.iot.control.element.IoTSetResponse;
public class IoTSetResponseProvider extends IQProvider<IoTSetResponse> { public class IoTSetResponseProvider extends IqProvider<IoTSetResponse> {
@Override @Override
public IoTSetResponse parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IoTSetResponse parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
return new IoTSetResponse(); return new IoTSetResponse();
} }

View file

@ -18,17 +18,18 @@ package org.jivesoftware.smackx.iot.data.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.data.element.IoTDataReadOutAccepted; import org.jivesoftware.smackx.iot.data.element.IoTDataReadOutAccepted;
public class IoTDataReadOutAcceptedProvider extends IQProvider<IoTDataReadOutAccepted> { public class IoTDataReadOutAcceptedProvider extends IqProvider<IoTDataReadOutAccepted> {
@Override @Override
public IoTDataReadOutAccepted parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException { public IoTDataReadOutAccepted parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException {
int seqNr = ParserUtils.getIntegerAttributeOrThrow(parser, "seqnr", "IoT data request <accepted/> without sequence number"); int seqNr = ParserUtils.getIntegerAttributeOrThrow(parser, "seqnr", "IoT data request <accepted/> without sequence number");
boolean queued = ParserUtils.getBooleanAttribute(parser, "queued", false); boolean queued = ParserUtils.getBooleanAttribute(parser, "queued", false);
return new IoTDataReadOutAccepted(seqNr, queued); return new IoTDataReadOutAccepted(seqNr, queued);

View file

@ -18,17 +18,18 @@ package org.jivesoftware.smackx.iot.data.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.data.element.IoTDataRequest; import org.jivesoftware.smackx.iot.data.element.IoTDataRequest;
public class IoTDataRequestProvider extends IQProvider<IoTDataRequest> { public class IoTDataRequestProvider extends IqProvider<IoTDataRequest> {
@Override @Override
public IoTDataRequest parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException { public IoTDataRequest parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException {
int seqNr = ParserUtils.getIntegerAttributeOrThrow(parser, "seqnr", "IoT data request without sequence number"); int seqNr = ParserUtils.getIntegerAttributeOrThrow(parser, "seqnr", "IoT data request without sequence number");
boolean momentary = ParserUtils.getBooleanAttribute(parser, "momentary", false); boolean momentary = ParserUtils.getBooleanAttribute(parser, "momentary", false);
return new IoTDataRequest(seqNr, momentary); return new IoTDataRequest(seqNr, momentary);

View file

@ -16,8 +16,9 @@
*/ */
package org.jivesoftware.smackx.iot.discovery.provider; package org.jivesoftware.smackx.iot.discovery.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -28,10 +29,10 @@ import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;
import org.jxmpp.stringprep.XmppStringprepException; import org.jxmpp.stringprep.XmppStringprepException;
public class IoTClaimedProvider extends IQProvider<IoTClaimed> { public class IoTClaimedProvider extends IqProvider<IoTClaimed> {
@Override @Override
public IoTClaimed parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmppStringprepException { public IoTClaimed parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmppStringprepException {
Jid jid = ParserUtils.getJidAttribute(parser); Jid jid = ParserUtils.getJidAttribute(parser);
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTClaimed(jid, nodeInfo); return new IoTClaimed(jid, nodeInfo);

View file

@ -16,8 +16,9 @@
*/ */
package org.jivesoftware.smackx.iot.discovery.provider; package org.jivesoftware.smackx.iot.discovery.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -28,10 +29,10 @@ import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;
import org.jxmpp.stringprep.XmppStringprepException; import org.jxmpp.stringprep.XmppStringprepException;
public class IoTDisownProvider extends IQProvider<IoTDisown> { public class IoTDisownProvider extends IqProvider<IoTDisown> {
@Override @Override
public IoTDisown parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmppStringprepException { public IoTDisown parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmppStringprepException {
Jid jid = ParserUtils.getJidAttribute(parser); Jid jid = ParserUtils.getJidAttribute(parser);
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTDisown(jid, nodeInfo); return new IoTDisown(jid, nodeInfo);

View file

@ -16,18 +16,19 @@
*/ */
package org.jivesoftware.smackx.iot.discovery.provider; package org.jivesoftware.smackx.iot.discovery.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.discovery.element.IoTDisowned; import org.jivesoftware.smackx.iot.discovery.element.IoTDisowned;
import org.jivesoftware.smackx.iot.element.NodeInfo; import org.jivesoftware.smackx.iot.element.NodeInfo;
import org.jivesoftware.smackx.iot.parser.NodeInfoParser; import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
public class IoTDisownedProvider extends IQProvider<IoTDisowned> { public class IoTDisownedProvider extends IqProvider<IoTDisowned> {
@Override @Override
public IoTDisowned parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IoTDisowned parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTDisowned(nodeInfo); return new IoTDisowned(nodeInfo);
} }

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -31,10 +32,10 @@ import org.jivesoftware.smackx.iot.discovery.element.Tag;
import org.jivesoftware.smackx.iot.element.NodeInfo; import org.jivesoftware.smackx.iot.element.NodeInfo;
import org.jivesoftware.smackx.iot.parser.NodeInfoParser; import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
public class IoTRegisterProvider extends IQProvider<IoTRegister> { public class IoTRegisterProvider extends IqProvider<IoTRegister> {
@Override @Override
public IoTRegister parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public IoTRegister parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
boolean selfOwned = ParserUtils.getBooleanAttribute(parser, "selfOwned", false); boolean selfOwned = ParserUtils.getBooleanAttribute(parser, "selfOwned", false);
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
List<Tag> tags = new ArrayList<>(); List<Tag> tags = new ArrayList<>();

View file

@ -18,8 +18,9 @@ package org.jivesoftware.smackx.iot.discovery.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -30,10 +31,10 @@ import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
import org.jxmpp.jid.BareJid; import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;
public class IoTRemoveProvider extends IQProvider<IoTRemove> { public class IoTRemoveProvider extends IqProvider<IoTRemove> {
@Override @Override
public IoTRemove parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws IOException { public IoTRemove parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException {
Jid jid = ParserUtils.getJidAttribute(parser); Jid jid = ParserUtils.getJidAttribute(parser);
if (jid.hasResource()) { if (jid.hasResource()) {
// TODO: Should be SmackParseException. // TODO: Should be SmackParseException.

View file

@ -16,18 +16,19 @@
*/ */
package org.jivesoftware.smackx.iot.discovery.provider; package org.jivesoftware.smackx.iot.discovery.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.discovery.element.IoTRemoved; import org.jivesoftware.smackx.iot.discovery.element.IoTRemoved;
import org.jivesoftware.smackx.iot.element.NodeInfo; import org.jivesoftware.smackx.iot.element.NodeInfo;
import org.jivesoftware.smackx.iot.parser.NodeInfoParser; import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
public class IoTRemovedProvider extends IQProvider<IoTRemoved> { public class IoTRemovedProvider extends IqProvider<IoTRemoved> {
@Override @Override
public IoTRemoved parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IoTRemoved parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTRemoved(nodeInfo); return new IoTRemoved(nodeInfo);
} }

View file

@ -16,18 +16,19 @@
*/ */
package org.jivesoftware.smackx.iot.discovery.provider; package org.jivesoftware.smackx.iot.discovery.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.discovery.element.IoTUnregister; import org.jivesoftware.smackx.iot.discovery.element.IoTUnregister;
import org.jivesoftware.smackx.iot.element.NodeInfo; import org.jivesoftware.smackx.iot.element.NodeInfo;
import org.jivesoftware.smackx.iot.parser.NodeInfoParser; import org.jivesoftware.smackx.iot.parser.NodeInfoParser;
public class IoTUnregisterProvider extends IQProvider<IoTUnregister> { public class IoTUnregisterProvider extends IqProvider<IoTUnregister> {
@Override @Override
public IoTUnregister parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public IoTUnregister parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
NodeInfo nodeInfo = NodeInfoParser.parse(parser); NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTUnregister(nodeInfo); return new IoTUnregister(nodeInfo);
} }

View file

@ -16,16 +16,17 @@
*/ */
package org.jivesoftware.smackx.iot.provisioning.provider; package org.jivesoftware.smackx.iot.provisioning.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.provisioning.element.ClearCache; import org.jivesoftware.smackx.iot.provisioning.element.ClearCache;
public class ClearCacheProvider extends IQProvider<ClearCache> { public class ClearCacheProvider extends IqProvider<ClearCache> {
@Override @Override
public ClearCache parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public ClearCache parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
return new ClearCache(); return new ClearCache();
} }

View file

@ -16,16 +16,17 @@
*/ */
package org.jivesoftware.smackx.iot.provisioning.provider; package org.jivesoftware.smackx.iot.provisioning.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.iot.provisioning.element.ClearCacheResponse; import org.jivesoftware.smackx.iot.provisioning.element.ClearCacheResponse;
public class ClearCacheResponseProvider extends IQProvider<ClearCacheResponse> { public class ClearCacheResponseProvider extends IqProvider<ClearCacheResponse> {
@Override @Override
public ClearCacheResponse parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public ClearCacheResponse parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
return new ClearCacheResponse(); return new ClearCacheResponse();
} }

View file

@ -16,8 +16,9 @@
*/ */
package org.jivesoftware.smackx.iot.provisioning.provider; package org.jivesoftware.smackx.iot.provisioning.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -26,10 +27,10 @@ import org.jivesoftware.smackx.iot.provisioning.element.IoTIsFriend;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;
import org.jxmpp.stringprep.XmppStringprepException; import org.jxmpp.stringprep.XmppStringprepException;
public class IoTIsFriendProvider extends IQProvider<IoTIsFriend> { public class IoTIsFriendProvider extends IqProvider<IoTIsFriend> {
@Override @Override
public IoTIsFriend parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmppStringprepException { public IoTIsFriend parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmppStringprepException {
Jid jid = ParserUtils.getJidAttribute(parser); Jid jid = ParserUtils.getJidAttribute(parser);
return new IoTIsFriend(jid); return new IoTIsFriend(jid);
} }

View file

@ -16,8 +16,9 @@
*/ */
package org.jivesoftware.smackx.iot.provisioning.provider; package org.jivesoftware.smackx.iot.provisioning.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -27,10 +28,10 @@ import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.Jid; import org.jxmpp.jid.Jid;
import org.jxmpp.stringprep.XmppStringprepException; import org.jxmpp.stringprep.XmppStringprepException;
public class IoTIsFriendResponseProvider extends IQProvider<IoTIsFriendResponse> { public class IoTIsFriendResponseProvider extends IqProvider<IoTIsFriendResponse> {
@Override @Override
public IoTIsFriendResponse parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmppStringprepException { public IoTIsFriendResponse parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmppStringprepException {
Jid jid = ParserUtils.getJidAttribute(parser); Jid jid = ParserUtils.getJidAttribute(parser);
BareJid bareJid = jid.asBareJid(); BareJid bareJid = jid.asBareJid();
boolean result = ParserUtils.getBooleanAttribute(parser, "result"); boolean result = ParserUtils.getBooleanAttribute(parser, "result");

View file

@ -18,18 +18,19 @@ package org.jivesoftware.smackx.jid_prep.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.jid_prep.element.JidPrepIq; import org.jivesoftware.smackx.jid_prep.element.JidPrepIq;
public class JidPrepIqProvider extends IQProvider<JidPrepIq> { public class JidPrepIqProvider extends IqProvider<JidPrepIq> {
@Override @Override
public JidPrepIq parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public JidPrepIq parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException, SmackParsingException { throws XmlPullParserException, IOException, SmackParsingException {
String jid = parser.nextText(); String jid = parser.nextText();

View file

@ -18,9 +18,10 @@ package org.jivesoftware.smackx.mam.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -38,10 +39,10 @@ import org.jivesoftware.smackx.rsm.provider.RSMSetProvider;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MamFinIQProvider extends IQProvider<MamFinIQ> { public class MamFinIQProvider extends IqProvider<MamFinIQ> {
@Override @Override
public MamFinIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public MamFinIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
MamElementFactory elementFactory = MamElementFactory.forParser(parser); MamElementFactory elementFactory = MamElementFactory.forParser(parser);
String queryId = parser.getAttributeValue("", "queryid"); String queryId = parser.getAttributeValue("", "queryid");
boolean complete = ParserUtils.getBooleanAttribute(parser, "complete", false); boolean complete = ParserUtils.getBooleanAttribute(parser, "complete", false);

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -40,12 +41,12 @@ import org.jxmpp.jid.impl.JidCreate;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MamPrefsIQProvider extends IQProvider<MamPrefsIQ> { public class MamPrefsIQProvider extends IqProvider<MamPrefsIQ> {
public static final MamPrefsIQProvider INSTANCE = new MamPrefsIQProvider(); public static final MamPrefsIQProvider INSTANCE = new MamPrefsIQProvider();
@Override @Override
public MamPrefsIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MamPrefsIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
MamElementFactory elementFactory = MamElementFactory.forParser(parser); MamElementFactory elementFactory = MamElementFactory.forParser(parser);
String defaultBehaviorString = parser.getAttributeValue("", "default"); String defaultBehaviorString = parser.getAttributeValue("", "default");
DefaultBehavior defaultBehavior = null; DefaultBehavior defaultBehavior = null;

View file

@ -18,9 +18,10 @@ package org.jivesoftware.smackx.mam.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jivesoftware.smackx.xdata.provider.DataFormProvider;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MamQueryIQProvider extends IQProvider<MamQueryIQ> { public class MamQueryIQProvider extends IqProvider<MamQueryIQ> {
@Override @Override
public MamQueryIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public MamQueryIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException, SmackParsingException { throws XmlPullParserException, IOException, SmackParsingException {
MamElementFactory elementFactory = MamElementFactory.forParser(parser); MamElementFactory elementFactory = MamElementFactory.forParser(parser);
DataForm dataForm = null; DataForm dataForm = null;

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.muclight.provider;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -36,10 +37,10 @@ import org.jxmpp.jid.impl.JidCreate;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MUCLightAffiliationsIQProvider extends IQProvider<MUCLightAffiliationsIQ> { public class MUCLightAffiliationsIQProvider extends IqProvider<MUCLightAffiliationsIQ> {
@Override @Override
public MUCLightAffiliationsIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MUCLightAffiliationsIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
String version = null; String version = null;
HashMap<Jid, MUCLightAffiliation> occupants = new HashMap<>(); HashMap<Jid, MUCLightAffiliation> occupants = new HashMap<>();

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jxmpp.stringprep.XmppStringprepException;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MUCLightBlockingIQProvider extends IQProvider<MUCLightBlockingIQ> { public class MUCLightBlockingIQProvider extends IqProvider<MUCLightBlockingIQ> {
@Override @Override
public MUCLightBlockingIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MUCLightBlockingIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
HashMap<Jid, Boolean> rooms = null; HashMap<Jid, Boolean> rooms = null;
HashMap<Jid, Boolean> users = null; HashMap<Jid, Boolean> users = null;

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.muclight.provider;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -33,10 +34,10 @@ import org.jivesoftware.smackx.muclight.element.MUCLightConfigurationIQ;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MUCLightConfigurationIQProvider extends IQProvider<MUCLightConfigurationIQ> { public class MUCLightConfigurationIQProvider extends IqProvider<MUCLightConfigurationIQ> {
@Override @Override
public MUCLightConfigurationIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MUCLightConfigurationIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
String version = null; String version = null;
String roomName = null; String roomName = null;
String subject = null; String subject = null;

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.muclight.provider;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jxmpp.jid.impl.JidCreate;
* @author Fernando Ramirez * @author Fernando Ramirez
* *
*/ */
public class MUCLightInfoIQProvider extends IQProvider<MUCLightInfoIQ> { public class MUCLightInfoIQProvider extends IqProvider<MUCLightInfoIQ> {
@Override @Override
public MUCLightInfoIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MUCLightInfoIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
String version = null; String version = null;
String roomName = null; String roomName = null;
String subject = null; String subject = null;

View file

@ -63,7 +63,7 @@ public class AbstractHttpOverXmppProviderTest {
HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider(); HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(string); XmlPullParser parser = PacketParserUtils.getParserFor(string);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppResp); assertTrue(iq instanceof HttpOverXmppResp);
HttpOverXmppResp body = (HttpOverXmppResp) iq; HttpOverXmppResp body = (HttpOverXmppResp) iq;
@ -83,7 +83,7 @@ public class AbstractHttpOverXmppProviderTest {
HttpOverXmppReqProvider provider = new HttpOverXmppReqProvider(); HttpOverXmppReqProvider provider = new HttpOverXmppReqProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(string); XmlPullParser parser = PacketParserUtils.getParserFor(string);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppReq); assertTrue(iq instanceof HttpOverXmppReq);
HttpOverXmppReq body = (HttpOverXmppReq) iq; HttpOverXmppReq body = (HttpOverXmppReq) iq;
@ -205,7 +205,7 @@ public class AbstractHttpOverXmppProviderTest {
HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider(); HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider();
XmlPullParser parser = SmackTestUtil.getParserFor(string, tag, parserKind); XmlPullParser parser = SmackTestUtil.getParserFor(string, tag, parserKind);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppResp); assertTrue(iq instanceof HttpOverXmppResp);
return (HttpOverXmppResp) iq; return (HttpOverXmppResp) iq;
} }

View file

@ -70,7 +70,7 @@ public class HttpOverXmppReqProviderTest {
private static HttpOverXmppReq parseReq(String string) throws Exception { private static HttpOverXmppReq parseReq(String string) throws Exception {
HttpOverXmppReqProvider provider = new HttpOverXmppReqProvider(); HttpOverXmppReqProvider provider = new HttpOverXmppReqProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(string); XmlPullParser parser = PacketParserUtils.getParserFor(string);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppReq); assertTrue(iq instanceof HttpOverXmppReq);
return (HttpOverXmppReq) iq; return (HttpOverXmppReq) iq;
} }

View file

@ -39,7 +39,7 @@ public class HttpOverXmppRespProviderTest {
HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider(); HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(string); XmlPullParser parser = PacketParserUtils.getParserFor(string);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppResp); assertTrue(iq instanceof HttpOverXmppResp);
HttpOverXmppResp resp = (HttpOverXmppResp) iq; HttpOverXmppResp resp = (HttpOverXmppResp) iq;
@ -54,7 +54,7 @@ public class HttpOverXmppRespProviderTest {
HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider(); HttpOverXmppRespProvider provider = new HttpOverXmppRespProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(string); XmlPullParser parser = PacketParserUtils.getParserFor(string);
IQ iq = provider.parse(parser); IQ iq = provider.parse(parser, null);
assertTrue(iq instanceof HttpOverXmppResp); assertTrue(iq instanceof HttpOverXmppResp);
HttpOverXmppResp resp = (HttpOverXmppResp) iq; HttpOverXmppResp resp = (HttpOverXmppResp) iq;

View file

@ -40,7 +40,7 @@ public class MamFinProviderTest extends MamTest {
@Test @Test
public void checkMamFinProvider() throws Exception { public void checkMamFinProvider() throws Exception {
XmlPullParser parser = PacketParserUtils.getParserFor(exmapleMamFinXml); XmlPullParser parser = PacketParserUtils.getParserFor(exmapleMamFinXml);
MamFinIQ mamFinIQ = new MamFinIQProvider().parse(parser); MamFinIQ mamFinIQ = new MamFinIQProvider().parse(parser, null);
assertFalse(mamFinIQ.isComplete()); assertFalse(mamFinIQ.isComplete());
assertTrue(mamFinIQ.isStable()); assertTrue(mamFinIQ.isStable());

View file

@ -60,21 +60,21 @@ public class MamPrefIQProviderTest extends MamTest {
public void checkMamPrefsIQProvider(XmlPullParserKind parserKind) public void checkMamPrefsIQProvider(XmlPullParserKind parserKind)
throws XmlPullParserException, IOException, SmackParsingException { throws XmlPullParserException, IOException, SmackParsingException {
XmlPullParser parser1 = SmackTestUtil.getParserFor(exampleMamPrefsIQ1, parserKind); XmlPullParser parser1 = SmackTestUtil.getParserFor(exampleMamPrefsIQ1, parserKind);
MamPrefsIQ mamPrefIQ1 = MamPrefsIQProvider.INSTANCE.parse(parser1); MamPrefsIQ mamPrefIQ1 = MamPrefsIQProvider.INSTANCE.parse(parser1, null);
assertEquals(IQ.Type.set, mamPrefIQ1.getType()); assertEquals(IQ.Type.set, mamPrefIQ1.getType());
assertEquals(mamPrefIQ1.getAlwaysJids().get(0).toString(), "romeo@montague.lit"); assertEquals(mamPrefIQ1.getAlwaysJids().get(0).toString(), "romeo@montague.lit");
assertEquals(mamPrefIQ1.getNeverJids().get(0).toString(), "montague@montague.lit"); assertEquals(mamPrefIQ1.getNeverJids().get(0).toString(), "montague@montague.lit");
XmlPullParser parser2 = SmackTestUtil.getParserFor(exampleMamPrefsIQ2, parserKind); XmlPullParser parser2 = SmackTestUtil.getParserFor(exampleMamPrefsIQ2, parserKind);
MamPrefsIQ mamPrefIQ2 = MamPrefsIQProvider.INSTANCE.parse(parser2); MamPrefsIQ mamPrefIQ2 = MamPrefsIQProvider.INSTANCE.parse(parser2, null);
assertEquals(IQ.Type.set, mamPrefIQ2.getType()); assertEquals(IQ.Type.set, mamPrefIQ2.getType());
assertEquals(mamPrefIQ2.getAlwaysJids().get(0).toString(), "romeo@montague.lit"); assertEquals(mamPrefIQ2.getAlwaysJids().get(0).toString(), "romeo@montague.lit");
assertEquals(mamPrefIQ2.getAlwaysJids().get(1).toString(), "montague@montague.lit"); assertEquals(mamPrefIQ2.getAlwaysJids().get(1).toString(), "montague@montague.lit");
assertTrue(mamPrefIQ2.getNeverJids().isEmpty()); assertTrue(mamPrefIQ2.getNeverJids().isEmpty());
XmlPullParser parser3 = SmackTestUtil.getParserFor(exampleMamPrefsIQ3, parserKind); XmlPullParser parser3 = SmackTestUtil.getParserFor(exampleMamPrefsIQ3, parserKind);
MamPrefsIQ mamPrefIQ3 = MamPrefsIQProvider.INSTANCE.parse(parser3); MamPrefsIQ mamPrefIQ3 = MamPrefsIQProvider.INSTANCE.parse(parser3, null);
assertEquals(IQ.Type.set, mamPrefIQ3.getType()); assertEquals(IQ.Type.set, mamPrefIQ3.getType());
} }

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jxmpp.jid.Jid;
* @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking * @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking
* Command</a> * Command</a>
*/ */
public class BlockContactsIQProvider extends IQProvider<BlockContactsIQ> { public class BlockContactsIQProvider extends IqProvider<BlockContactsIQ> {
@Override @Override
public BlockContactsIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public BlockContactsIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
List<Jid> jids = new ArrayList<>(); List<Jid> jids = new ArrayList<>();
outerloop: while (true) { outerloop: while (true) {

View file

@ -21,8 +21,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -38,10 +39,10 @@ import org.jxmpp.jid.Jid;
* @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking * @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking
* Command</a> * Command</a>
*/ */
public class BlockListIQProvider extends IQProvider<BlockListIQ> { public class BlockListIQProvider extends IqProvider<BlockListIQ> {
@Override @Override
public BlockListIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public BlockListIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
List<Jid> jids = null; List<Jid> jids = null;
outerloop: while (true) { outerloop: while (true) {

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jxmpp.jid.impl.JidCreate;
* @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking * @see <a href="http://xmpp.org/extensions/xep-0191.html">XEP-0191: Blocking
* Command</a> * Command</a>
*/ */
public class UnblockContactsIQProvider extends IQProvider<UnblockContactsIQ> { public class UnblockContactsIQProvider extends IqProvider<UnblockContactsIQ> {
@Override @Override
public UnblockContactsIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public UnblockContactsIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
List<Jid> jids = null; List<Jid> jids = null;
outerloop: while (true) { outerloop: while (true) {

View file

@ -18,8 +18,9 @@ package org.jivesoftware.smackx.bob.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.Pair; import org.jivesoftware.smack.util.Pair;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -35,10 +36,10 @@ import org.jivesoftware.smackx.bob.element.BoBIQ;
* @see <a href="http://xmpp.org/extensions/xep-0231.html">XEP-0231: Bits of * @see <a href="http://xmpp.org/extensions/xep-0231.html">XEP-0231: Bits of
* Binary</a> * Binary</a>
*/ */
public class BoBIQProvider extends IQProvider<BoBIQ> { public class BoBIQProvider extends IqProvider<BoBIQ> {
@Override @Override
public BoBIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public BoBIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
Pair<ContentId, BoBData> parserResult = BoBProviderUtil.parseContentIdAndBobData(parser, initialDepth, Pair<ContentId, BoBData> parserResult = BoBProviderUtil.parseContentIdAndBobData(parser, initialDepth,
xmlEnvironment); xmlEnvironment);

View file

@ -16,8 +16,9 @@
*/ */
package org.jivesoftware.smackx.bytestreams.ibb.provider; package org.jivesoftware.smackx.bytestreams.ibb.provider;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smackx.bytestreams.ibb.packet.Close; import org.jivesoftware.smackx.bytestreams.ibb.packet.Close;
@ -27,10 +28,10 @@ import org.jivesoftware.smackx.bytestreams.ibb.packet.Close;
* *
* @author Henning Staib * @author Henning Staib
*/ */
public class CloseIQProvider extends IQProvider<Close> { public class CloseIQProvider extends IqProvider<Close> {
@Override @Override
public Close parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) { public Close parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) {
String sid = parser.getAttributeValue("", "sid"); String sid = parser.getAttributeValue("", "sid");
return new Close(sid); return new Close(sid);
} }

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.bytestreams.ibb.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.datatypes.UInt16; import org.jivesoftware.smack.datatypes.UInt16;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.parsing.SmackParsingException.RequiredAttributeMissingException; import org.jivesoftware.smack.parsing.SmackParsingException.RequiredAttributeMissingException;
@ -37,12 +38,12 @@ import org.jivesoftware.smackx.bytestreams.ibb.packet.DataPacketExtension;
*/ */
public class DataPacketProvider { public class DataPacketProvider {
public static class IQProvider extends org.jivesoftware.smack.provider.IQProvider<Data> { public static class IQProvider extends org.jivesoftware.smack.provider.IqProvider<Data> {
private static final PacketExtensionProvider packetExtensionProvider = new PacketExtensionProvider(); private static final PacketExtensionProvider packetExtensionProvider = new PacketExtensionProvider();
@Override @Override
public Data parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public Data parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws IOException, XmlPullParserException, SmackParsingException { throws IOException, XmlPullParserException, SmackParsingException {
DataPacketExtension data = packetExtensionProvider.parse(parser); DataPacketExtension data = packetExtensionProvider.parse(parser);
return new Data(data); return new Data(data);

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.bytestreams.ibb.provider;
import java.io.IOException; import java.io.IOException;
import java.util.Locale; import java.util.Locale;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -32,10 +33,10 @@ import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
* *
* @author Henning Staib * @author Henning Staib
*/ */
public class OpenIQProvider extends IQProvider<Open> { public class OpenIQProvider extends IqProvider<Open> {
@Override @Override
public Open parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public Open parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
String sessionID = parser.getAttributeValue("", "sid"); String sessionID = parser.getAttributeValue("", "sid");
int blockSize = Integer.parseInt(parser.getAttributeValue("", "block-size")); int blockSize = Integer.parseInt(parser.getAttributeValue("", "block-size"));

View file

@ -18,8 +18,9 @@ package org.jivesoftware.smackx.bytestreams.socks5.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -34,10 +35,10 @@ import org.jxmpp.jid.Jid;
* *
* @author Alexander Wenckus * @author Alexander Wenckus
*/ */
public class BytestreamsProvider extends IQProvider<Bytestream> { public class BytestreamsProvider extends IqProvider<Bytestream> {
@Override @Override
public Bytestream parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public Bytestream parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
boolean done = false; boolean done = false;

View file

@ -19,11 +19,12 @@ package org.jivesoftware.smackx.commands.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.packet.StanzaError;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.ExtensionElementProvider; import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -39,10 +40,10 @@ import org.jivesoftware.smackx.xdata.provider.DataFormProvider;
* *
* @author Gabriel Guardincerri * @author Gabriel Guardincerri
*/ */
public class AdHocCommandDataProvider extends IQProvider<AdHocCommandData> { public class AdHocCommandDataProvider extends IqProvider<AdHocCommandData> {
@Override @Override
public AdHocCommandData parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public AdHocCommandData parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
boolean done = false; boolean done = false;
AdHocCommandData adHocCommandData = new AdHocCommandData(); AdHocCommandData adHocCommandData = new AdHocCommandData();
DataFormProvider dataFormProvider = new DataFormProvider(); DataFormProvider dataFormProvider = new DataFormProvider();

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.disco.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -34,10 +35,10 @@ import org.jxmpp.jid.Jid;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class DiscoverItemsProvider extends IQProvider<DiscoverItems> { public class DiscoverItemsProvider extends IqProvider<DiscoverItems> {
@Override @Override
public DiscoverItems parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public DiscoverItems parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
DiscoverItems discoverItems = new DiscoverItems(); DiscoverItems discoverItems = new DiscoverItems();
boolean done = false; boolean done = false;

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.iqlast.packet;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -100,10 +101,10 @@ public class LastActivity extends IQ {
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public static class Provider extends IQProvider<LastActivity> { public static class Provider extends IqProvider<LastActivity> {
@Override @Override
public LastActivity parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public LastActivity parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
LastActivity lastActivity = new LastActivity(); LastActivity lastActivity = new LastActivity();
String seconds = parser.getAttributeValue("", "seconds"); String seconds = parser.getAttributeValue("", "seconds");
if (seconds != null) { if (seconds != null) {

View file

@ -31,9 +31,10 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.StanzaError.Condition; import org.jivesoftware.smack.packet.StanzaError.Condition;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -234,10 +235,10 @@ public final class PrivateDataManager extends Manager {
/** /**
* An IQ provider to parse IQ results containing private data. * An IQ provider to parse IQ results containing private data.
*/ */
public static class PrivateDataIQProvider extends IQProvider<PrivateDataIQ> { public static class PrivateDataIQProvider extends IqProvider<PrivateDataIQ> {
@Override @Override
public PrivateDataIQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public PrivateDataIQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
PrivateData privateData = null; PrivateData privateData = null;
boolean done = false; boolean done = false;

View file

@ -23,20 +23,21 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlElement; import org.jivesoftware.smack.packet.XmlElement;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.iqregister.packet.Registration; import org.jivesoftware.smackx.iqregister.packet.Registration;
public class RegistrationProvider extends IQProvider<Registration> { public class RegistrationProvider extends IqProvider<Registration> {
@Override @Override
public Registration parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public Registration parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
String instruction = null; String instruction = null;
Map<String, String> fields = new HashMap<>(); Map<String, String> fields = new HashMap<>();
List<XmlElement> packetExtensions = new LinkedList<>(); List<XmlElement> packetExtensions = new LinkedList<>();

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.muc.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -31,10 +32,10 @@ import org.jivesoftware.smackx.muc.packet.MUCAdmin;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class MUCAdminProvider extends IQProvider<MUCAdmin> { public class MUCAdminProvider extends IqProvider<MUCAdmin> {
@Override @Override
public MUCAdmin parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public MUCAdmin parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
MUCAdmin mucAdmin = new MUCAdmin(); MUCAdmin mucAdmin = new MUCAdmin();
boolean done = false; boolean done = false;

View file

@ -19,9 +19,10 @@ package org.jivesoftware.smackx.muc.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -33,10 +34,10 @@ import org.jivesoftware.smackx.muc.packet.MUCOwner;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class MUCOwnerProvider extends IQProvider<MUCOwner> { public class MUCOwnerProvider extends IqProvider<MUCOwner> {
@Override @Override
public MUCOwner parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public MUCOwner parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
MUCOwner mucOwner = new MUCOwner(); MUCOwner mucOwner = new MUCOwner();
boolean done = false; boolean done = false;
while (!done) { while (!done) {

View file

@ -23,8 +23,9 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -197,11 +198,11 @@ public class OfflineMessageRequest extends IQ {
} }
} }
public static class Provider extends IQProvider<OfflineMessageRequest> { public static class Provider extends IqProvider<OfflineMessageRequest> {
@Override @Override
public OfflineMessageRequest parse(XmlPullParser parser, public OfflineMessageRequest parse(XmlPullParser parser,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException { IOException {
OfflineMessageRequest request = new OfflineMessageRequest(); OfflineMessageRequest request = new OfflineMessageRequest();
boolean done = false; boolean done = false;

View file

@ -18,17 +18,18 @@ package org.jivesoftware.smackx.ping.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.ping.packet.Ping; import org.jivesoftware.smackx.ping.packet.Ping;
public class PingProvider extends IQProvider<Ping> { public class PingProvider extends IqProvider<Ping> {
@Override @Override
public Ping parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public Ping parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
// No need to use the ping constructor with arguments. IQ will already // No need to use the ping constructor with arguments. IQ will already
// have filled out all relevant fields ('from', 'to', 'id'). // have filled out all relevant fields ('from', 'to', 'id').
return new Ping(); return new Ping();

View file

@ -20,8 +20,9 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import org.jivesoftware.smack.datatypes.UInt32; import org.jivesoftware.smack.datatypes.UInt32;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -37,10 +38,10 @@ import org.jivesoftware.smackx.privacy.packet.PrivacyItem;
* *
* @author Francisco Vives * @author Francisco Vives
*/ */
public class PrivacyProvider extends IQProvider<Privacy> { public class PrivacyProvider extends IqProvider<Privacy> {
@Override @Override
public Privacy parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public Privacy parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
Privacy privacy = new Privacy(); Privacy privacy = new Privacy();
boolean done = false; boolean done = false;

View file

@ -19,9 +19,10 @@ package org.jivesoftware.smackx.pubsub.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -35,9 +36,9 @@ import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;
* *
* @author Robin Collier * @author Robin Collier
*/ */
public class PubSubProvider extends IQProvider<PubSub> { public class PubSubProvider extends IqProvider<PubSub> {
@Override @Override
public PubSub parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public PubSub parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
String namespace = parser.getNamespace(); String namespace = parser.getNamespace();
PubSubNamespace pubSubNamespace = PubSubNamespace.valueOfFromXmlns(namespace); PubSubNamespace pubSubNamespace = PubSubNamespace.valueOfFromXmlns(namespace);
PubSub pubsub = new PubSub(pubSubNamespace); PubSub pubsub = new PubSub(pubSubNamespace);

View file

@ -23,10 +23,11 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -124,11 +125,11 @@ public class UserSearch extends SimpleIQ {
/** /**
* Internal Search service Provider. * Internal Search service Provider.
*/ */
public static class Provider extends IQProvider<IQ> { public static class Provider extends IqProvider<IQ> {
// FIXME this provider does return two different types of IQs // FIXME this provider does return two different types of IQs
@Override @Override
public IQ parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public IQ parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
UserSearch search = null; UserSearch search = null;
SimpleUserSearch simpleUserSearch = new SimpleUserSearch(); SimpleUserSearch simpleUserSearch = new SimpleUserSearch();

View file

@ -21,8 +21,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -67,10 +68,10 @@ public class SharedGroupsInfo extends IQ {
/** /**
* Internal Search service Provider. * Internal Search service Provider.
*/ */
public static class Provider extends IQProvider<SharedGroupsInfo> { public static class Provider extends IqProvider<SharedGroupsInfo> {
@Override @Override
public SharedGroupsInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public SharedGroupsInfo parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
SharedGroupsInfo groupsInfo = new SharedGroupsInfo(); SharedGroupsInfo groupsInfo = new SharedGroupsInfo();

View file

@ -22,9 +22,10 @@ import java.util.Date;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -41,11 +42,11 @@ import org.jxmpp.util.XmppDateTime;
* @author Alexander Wenckus * @author Alexander Wenckus
* *
*/ */
public class StreamInitiationProvider extends IQProvider<StreamInitiation> { public class StreamInitiationProvider extends IqProvider<StreamInitiation> {
private static final Logger LOGGER = Logger.getLogger(StreamInitiationProvider.class.getName()); private static final Logger LOGGER = Logger.getLogger(StreamInitiationProvider.class.getName());
@Override @Override
public StreamInitiation parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public StreamInitiation parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
// si // si
String id = parser.getAttributeValue("", "id"); String id = parser.getAttributeValue("", "id");
String mimeType = parser.getAttributeValue("", "mime-type"); String mimeType = parser.getAttributeValue("", "mime-type");

View file

@ -18,8 +18,9 @@ package org.jivesoftware.smackx.vcardtemp.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -33,7 +34,7 @@ import org.jivesoftware.smackx.vcardtemp.packet.VCard;
* @author Derek DeMoro * @author Derek DeMoro
* @author Chris Deering * @author Chris Deering
*/ */
public class VCardProvider extends IQProvider<VCard> { public class VCardProvider extends IqProvider<VCard> {
// @formatter:off // @formatter:off
private static final String[] ADR = new String[] { private static final String[] ADR = new String[] {
@ -68,7 +69,7 @@ public class VCardProvider extends IQProvider<VCard> {
// @formatter:on // @formatter:on
@Override @Override
public VCard parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public VCard parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
VCard vCard = new VCard(); VCard vCard = new VCard();
String name = null; String name = null;

View file

@ -115,7 +115,7 @@ public class DataFormProvider extends ExtensionElementProvider<DataForm> {
// See XEP-133 Example 32 for a corner case where the data form contains this extension. // See XEP-133 Example 32 for a corner case where the data form contains this extension.
case RosterPacket.ELEMENT: case RosterPacket.ELEMENT:
if (namespace.equals(RosterPacket.NAMESPACE)) { if (namespace.equals(RosterPacket.NAMESPACE)) {
dataForm.addExtensionElement(RosterPacketProvider.INSTANCE.parse(parser)); dataForm.addExtensionElement(RosterPacketProvider.INSTANCE.parse(parser, null));
} }
break; break;
// See XEP-141 Data Forms Layout // See XEP-141 Data Forms Layout

View file

@ -53,7 +53,7 @@ public class OpenIQProviderTest extends SmackTestSuite {
OpenIQProvider oip = new OpenIQProvider(); OpenIQProvider oip = new OpenIQProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(control); XmlPullParser parser = PacketParserUtils.getParserFor(control);
Open open = oip.parse(parser); Open open = oip.parse(parser, null);
assertEquals(StanzaType.IQ, open.getStanza()); assertEquals(StanzaType.IQ, open.getStanza());
} }
@ -69,7 +69,7 @@ public class OpenIQProviderTest extends SmackTestSuite {
OpenIQProvider oip = new OpenIQProvider(); OpenIQProvider oip = new OpenIQProvider();
XmlPullParser parser = PacketParserUtils.getParserFor(control); XmlPullParser parser = PacketParserUtils.getParserFor(control);
Open open = oip.parse(parser); Open open = oip.parse(parser, null);
assertEquals(StanzaType.MESSAGE, open.getStanza()); assertEquals(StanzaType.MESSAGE, open.getStanza());
} }

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smack.roster.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.roster.packet.RosterPacket; import org.jivesoftware.smack.roster.packet.RosterPacket;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -29,12 +30,12 @@ import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jxmpp.jid.BareJid; import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.impl.JidCreate;
public class RosterPacketProvider extends IQProvider<RosterPacket> { public class RosterPacketProvider extends IqProvider<RosterPacket> {
public static final RosterPacketProvider INSTANCE = new RosterPacketProvider(); public static final RosterPacketProvider INSTANCE = new RosterPacketProvider();
@Override @Override
public RosterPacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public RosterPacket parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
RosterPacket roster = new RosterPacket(); RosterPacket roster = new RosterPacket();
String version = parser.getAttributeValue("", "ver"); String version = parser.getAttributeValue("", "ver");
roster.setVersion(version); roster.setVersion(version);

View file

@ -19,7 +19,7 @@ import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.filter.PacketFilter; import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.StanzaTypeFilter; import org.jivesoftware.smack.filter.StanzaTypeFilter;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.provider.ProviderManager; import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.test.SmackTestCase; import org.jivesoftware.smack.test.SmackTestCase;
import org.jivesoftware.smackx.jingle.packet.Jingle; import org.jivesoftware.smackx.jingle.packet.Jingle;

View file

@ -30,8 +30,9 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.provider.ProviderManager; import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -330,10 +331,10 @@ public class RTPBridge extends IQ {
* *
* @author Thiago Rocha * @author Thiago Rocha
*/ */
public static class Provider extends IQProvider<RTPBridge> { public static class Provider extends IqProvider<RTPBridge> {
@Override @Override
public RTPBridge parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public RTPBridge parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, throws XmlPullParserException,
IOException { IOException {

View file

@ -27,9 +27,10 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.provider.ProviderManager; import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -118,10 +119,10 @@ public class STUN extends SimpleIQ {
* *
* @author Thiago Rocha * @author Thiago Rocha
*/ */
public static class Provider extends IQProvider<STUN> { public static class Provider extends IqProvider<STUN> {
@Override @Override
public STUN parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public STUN parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, throws XmlPullParserException,
IOException { IOException {

View file

@ -19,10 +19,11 @@ package org.jivesoftware.smackx.jingleold.provider;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.ExtensionElementProvider; import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -41,7 +42,7 @@ import org.jxmpp.jid.Jid;
* *
* @author Alvaro Saurin * @author Alvaro Saurin
*/ */
public class JingleProvider extends IQProvider<Jingle> { public class JingleProvider extends IqProvider<Jingle> {
/** /**
* Parse a iq/jingle element. * Parse a iq/jingle element.
@ -50,7 +51,7 @@ public class JingleProvider extends IQProvider<Jingle> {
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input. * @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
*/ */
@Override @Override
public Jingle parse(XmlPullParser parser, int intialDepth, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException { public Jingle parse(XmlPullParser parser, int intialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws IOException, XmlPullParserException, SmackParsingException {
Jingle jingle = new Jingle(); Jingle jingle = new Jingle();
String sid; String sid;

View file

@ -22,9 +22,10 @@ import java.io.IOException;
import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -61,10 +62,10 @@ public class OfferConfirmation extends SimpleIQ {
con.sendStanza(packet); con.sendStanza(packet);
} }
public static class Provider extends IQProvider<OfferConfirmation> { public static class Provider extends IqProvider<OfferConfirmation> {
@Override @Override
public OfferConfirmation parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public OfferConfirmation parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final OfferConfirmation confirmation = new OfferConfirmation(); final OfferConfirmation confirmation = new OfferConfirmation();

View file

@ -19,10 +19,11 @@ package org.jivesoftware.smackx.workgroup.ext.forms;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -48,10 +49,10 @@ public class WorkgroupForm extends SimpleIQ {
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public static class InternalProvider extends IQProvider<WorkgroupForm> { public static class InternalProvider extends IqProvider<WorkgroupForm> {
@Override @Override
public WorkgroupForm parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public WorkgroupForm parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
WorkgroupForm answer = new WorkgroupForm(); WorkgroupForm answer = new WorkgroupForm();
boolean done = false; boolean done = false;

View file

@ -24,8 +24,9 @@ import java.util.Date;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -91,10 +92,10 @@ public class AgentChatHistory extends IQ {
/** /**
* Stanza extension provider for AgentHistory packets. * Stanza extension provider for AgentHistory packets.
*/ */
public static class InternalProvider extends IQProvider<AgentChatHistory> { public static class InternalProvider extends IqProvider<AgentChatHistory> {
@Override @Override
public AgentChatHistory parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public AgentChatHistory parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
if (parser.getEventType() != XmlPullParser.Event.START_ELEMENT) { if (parser.getEventType() != XmlPullParser.Event.START_ELEMENT) {
throw new IllegalStateException("Parser not in proper position, or bad XML."); throw new IllegalStateException("Parser not in proper position, or bad XML.");
} }

View file

@ -23,8 +23,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -81,10 +82,10 @@ public class ChatMetadata extends IQ {
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public static class Provider extends IQProvider<ChatMetadata> { public static class Provider extends IqProvider<ChatMetadata> {
@Override @Override
public ChatMetadata parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public ChatMetadata parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException { throws XmlPullParserException, IOException {
final ChatMetadata chatM = new ChatMetadata(); final ChatMetadata chatM = new ChatMetadata();

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.workgroup.ext.macros;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -96,10 +97,10 @@ public class Macros extends IQ {
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public static class InternalProvider extends IQProvider<Macros> { public static class InternalProvider extends IqProvider<Macros> {
@Override @Override
public Macros parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public Macros parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
Macros macroGroup = new Macros(); Macros macroGroup = new Macros();
boolean done = false; boolean done = false;

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.workgroup.ext.notes;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -81,10 +82,10 @@ public class ChatNotes extends IQ {
* *
* @author Derek DeMoro * @author Derek DeMoro
*/ */
public static class Provider extends IQProvider<ChatNotes> { public static class Provider extends IqProvider<ChatNotes> {
@Override @Override
public ChatNotes parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public ChatNotes parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
ChatNotes chatNotes = new ChatNotes(); ChatNotes chatNotes = new ChatNotes();
boolean done = false; boolean done = false;

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -104,10 +105,10 @@ public class AgentInfo extends IQ {
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public static class Provider extends IQProvider<AgentInfo> { public static class Provider extends IqProvider<AgentInfo> {
@Override @Override
public AgentInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public AgentInfo parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
AgentInfo answer = new AgentInfo(); AgentInfo answer = new AgentInfo();
boolean done = false; boolean done = false;

View file

@ -24,8 +24,9 @@ import java.util.Iterator;
import java.util.Set; import java.util.Set;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -111,10 +112,10 @@ public class AgentStatusRequest extends IQ {
/** /**
* Stanza extension provider for AgentStatusRequest packets. * Stanza extension provider for AgentStatusRequest packets.
*/ */
public static class Provider extends IQProvider<AgentStatusRequest> { public static class Provider extends IqProvider<AgentStatusRequest> {
@Override @Override
public AgentStatusRequest parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public AgentStatusRequest parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
AgentStatusRequest statusRequest = new AgentStatusRequest(); AgentStatusRequest statusRequest = new AgentStatusRequest();
boolean done = false; boolean done = false;

View file

@ -24,8 +24,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -103,10 +104,10 @@ public class AgentWorkgroups extends IQ {
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public static class Provider extends IQProvider<AgentWorkgroups> { public static class Provider extends IqProvider<AgentWorkgroups> {
@Override @Override
public AgentWorkgroups parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public AgentWorkgroups parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
final Jid agentJID = ParserUtils.getJidAttribute(parser); final Jid agentJID = ParserUtils.getJidAttribute(parser);
List<String> workgroups = new ArrayList<>(); List<String> workgroups = new ArrayList<>();

View file

@ -19,8 +19,9 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -75,10 +76,10 @@ public class MonitorPacket extends IQ {
/** /**
* Stanza extension provider for Monitor Packets. * Stanza extension provider for Monitor Packets.
*/ */
public static class InternalProvider extends IQProvider<MonitorPacket> { public static class InternalProvider extends IqProvider<MonitorPacket> {
@Override @Override
public MonitorPacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public MonitorPacket parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
MonitorPacket packet = new MonitorPacket(); MonitorPacket packet = new MonitorPacket();
boolean done = false; boolean done = false;

View file

@ -27,8 +27,9 @@ import java.util.Set;
import java.util.TimeZone; import java.util.TimeZone;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -132,10 +133,10 @@ public class OccupantsInfo extends IQ {
/** /**
* Stanza extension provider for AgentStatusRequest packets. * Stanza extension provider for AgentStatusRequest packets.
*/ */
public static class Provider extends IQProvider<OccupantsInfo> { public static class Provider extends IqProvider<OccupantsInfo> {
@Override @Override
public OccupantsInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public OccupantsInfo parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException, ParseException { throws XmlPullParserException, IOException, ParseException {
OccupantsInfo occupantsInfo = new OccupantsInfo(parser.getAttributeValue("", "roomID")); OccupantsInfo occupantsInfo = new OccupantsInfo(parser.getAttributeValue("", "roomID"));

View file

@ -23,9 +23,10 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
@ -45,14 +46,14 @@ import org.jxmpp.jid.Jid;
* *
* @author loki der quaeler * @author loki der quaeler
*/ */
public class OfferRequestProvider extends IQProvider<IQ> { public class OfferRequestProvider extends IqProvider<IQ> {
// FIXME It seems because OfferRequestPacket is also defined here, we can // FIXME It seems because OfferRequestPacket is also defined here, we can
// not add it as generic to the provider, the provider and the packet should // not add it as generic to the provider, the provider and the packet should
// be split, but since this is legacy code, I don't think that this will // be split, but since this is legacy code, I don't think that this will
// happen anytime soon. // happen anytime soon.
@Override @Override
public OfferRequestPacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public OfferRequestPacket parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
XmlPullParser.Event eventType = parser.getEventType(); XmlPullParser.Event eventType = parser.getEventType();
String sessionID = null; String sessionID = null;
int timeout = -1; int timeout = -1;

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -33,10 +34,10 @@ import org.jxmpp.jid.Jid;
* *
* @author loki der quaeler * @author loki der quaeler
*/ */
public class OfferRevokeProvider extends IQProvider<IQ> { public class OfferRevokeProvider extends IqProvider<IQ> {
@Override @Override
public OfferRevokePacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public OfferRevokePacket parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
// The parser will be positioned on the opening IQ tag, so get the JID attribute. // The parser will be positioned on the opening IQ tag, so get the JID attribute.
Jid userJID = ParserUtils.getJidAttribute(parser); Jid userJID = ParserUtils.getJidAttribute(parser);
// Default the userID to the JID. // Default the userID to the JID.

View file

@ -21,10 +21,11 @@ import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -34,10 +35,10 @@ import org.jivesoftware.smack.xml.XmlPullParserException;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class TranscriptProvider extends IQProvider<Transcript> { public class TranscriptProvider extends IqProvider<Transcript> {
@Override @Override
public Transcript parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public Transcript parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
String sessionID = parser.getAttributeValue("", "sessionID"); String sessionID = parser.getAttributeValue("", "sessionID");
List<Stanza> packets = new ArrayList<>(); List<Stanza> packets = new ArrayList<>();

View file

@ -19,10 +19,11 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.PacketParserUtils; import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -54,10 +55,10 @@ public class TranscriptSearch extends SimpleIQ {
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public static class Provider extends IQProvider<TranscriptSearch> { public static class Provider extends IqProvider<TranscriptSearch> {
@Override @Override
public TranscriptSearch parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { public TranscriptSearch parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
TranscriptSearch answer = new TranscriptSearch(); TranscriptSearch answer = new TranscriptSearch();
boolean done = false; boolean done = false;

View file

@ -25,8 +25,9 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.TimeZone; import java.util.TimeZone;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -38,7 +39,7 @@ import org.jxmpp.jid.Jid;
* *
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class TranscriptsProvider extends IQProvider<Transcripts> { public class TranscriptsProvider extends IqProvider<Transcripts> {
@SuppressWarnings("DateFormatConstant") @SuppressWarnings("DateFormatConstant")
private static final SimpleDateFormat UTC_FORMAT = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss"); private static final SimpleDateFormat UTC_FORMAT = new SimpleDateFormat("yyyyMMdd'T'HH:mm:ss");
@ -47,7 +48,7 @@ public class TranscriptsProvider extends IQProvider<Transcripts> {
} }
@Override @Override
public Transcripts parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) public Transcripts parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException, TextParseException, ParseException { throws XmlPullParserException, IOException, TextParseException, ParseException {
Jid userID = ParserUtils.getJidAttribute(parser, "userID"); Jid userID = ParserUtils.getJidAttribute(parser, "userID");
List<Transcripts.TranscriptSummary> summaries = new ArrayList<>(); List<Transcripts.TranscriptSummary> summaries = new ArrayList<>();

View file

@ -24,8 +24,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -123,10 +124,10 @@ public class ChatSettings extends IQ {
/** /**
* Stanza extension provider for AgentStatusRequest packets. * Stanza extension provider for AgentStatusRequest packets.
*/ */
public static class InternalProvider extends IQProvider<ChatSettings> { public static class InternalProvider extends IqProvider<ChatSettings> {
@Override @Override
public ChatSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public ChatSettings parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
if (parser.getEventType() != XmlPullParser.Event.START_ELEMENT) { if (parser.getEventType() != XmlPullParser.Event.START_ELEMENT) {
throw new IllegalStateException("Parser not in proper position, or bad XML."); throw new IllegalStateException("Parser not in proper position, or bad XML.");
} }

View file

@ -22,8 +22,9 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -77,10 +78,10 @@ public class GenericSettings extends IQ {
/** /**
* Stanza extension provider for SoundSetting Packets. * Stanza extension provider for SoundSetting Packets.
*/ */
public static class InternalProvider extends IQProvider<GenericSettings> { public static class InternalProvider extends IqProvider<GenericSettings> {
@Override @Override
public GenericSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public GenericSettings parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
GenericSettings setting = new GenericSettings(); GenericSettings setting = new GenericSettings();
boolean done = false; boolean done = false;

View file

@ -19,9 +19,10 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -104,10 +105,10 @@ public class OfflineSettings extends SimpleIQ {
/** /**
* Stanza extension provider for AgentStatusRequest packets. * Stanza extension provider for AgentStatusRequest packets.
*/ */
public static class InternalProvider extends IQProvider<OfflineSettings> { public static class InternalProvider extends IqProvider<OfflineSettings> {
@Override @Override
public OfflineSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public OfflineSettings parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
OfflineSettings offlineSettings = new OfflineSettings(); OfflineSettings offlineSettings = new OfflineSettings();
boolean done = false; boolean done = false;

View file

@ -18,9 +18,10 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -75,10 +76,10 @@ public class SearchSettings extends SimpleIQ {
/** /**
* Stanza extension provider for AgentStatusRequest packets. * Stanza extension provider for AgentStatusRequest packets.
*/ */
public static class InternalProvider extends IQProvider<SearchSettings> { public static class InternalProvider extends IqProvider<SearchSettings> {
@Override @Override
public SearchSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public SearchSettings parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
SearchSettings settings = new SearchSettings(); SearchSettings settings = new SearchSettings();
boolean done = false; boolean done = false;

View file

@ -19,9 +19,10 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.SimpleIQ; import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.stringencoder.Base64; import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -65,10 +66,10 @@ public class SoundSettings extends SimpleIQ {
/** /**
* Stanza extension provider for SoundSetting Packets. * Stanza extension provider for SoundSetting Packets.
*/ */
public static class InternalProvider extends IQProvider<SoundSettings> { public static class InternalProvider extends IqProvider<SoundSettings> {
@Override @Override
public SoundSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public SoundSettings parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
SoundSettings soundSettings = new SoundSettings(); SoundSettings soundSettings = new SoundSettings();
boolean done = false; boolean done = false;

View file

@ -20,8 +20,9 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException; import java.io.IOException;
import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IqData;
import org.jivesoftware.smack.packet.XmlEnvironment; import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider; import org.jivesoftware.smack.provider.IqProvider;
import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException; import org.jivesoftware.smack.xml.XmlPullParserException;
@ -92,10 +93,10 @@ public class WorkgroupProperties extends IQ {
/** /**
* Stanza extension provider for SoundSetting Packets. * Stanza extension provider for SoundSetting Packets.
*/ */
public static class InternalProvider extends IQProvider<WorkgroupProperties> { public static class InternalProvider extends IqProvider<WorkgroupProperties> {
@Override @Override
public WorkgroupProperties parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException { public WorkgroupProperties parse(XmlPullParser parser, int initialDepth, IqData iqData, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
WorkgroupProperties props = new WorkgroupProperties(); WorkgroupProperties props = new WorkgroupProperties();
boolean done = false; boolean done = false;