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

Use XmlEnvironment in parsing/provider subsystem

This commit is contained in:
Florian Schmaus 2019-02-15 23:21:30 +01:00
parent 43bb418d99
commit 8df69bd3ce
188 changed files with 486 additions and 264 deletions

View file

@ -23,6 +23,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jxmpp.jid.Jid;
@ -63,7 +64,7 @@ public class OfferConfirmation extends SimpleIQ {
public static class Provider extends IQProvider<OfferConfirmation> {
@Override
public OfferConfirmation parse(XmlPullParser parser, int initialDepth)
public OfferConfirmation parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
final OfferConfirmation confirmation = new OfferConfirmation();

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.ext.forms;
import java.io.IOException;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
@ -51,7 +52,7 @@ public class WorkgroupForm extends SimpleIQ {
public static class InternalProvider extends IQProvider<WorkgroupForm> {
@Override
public WorkgroupForm parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackParsingException {
public WorkgroupForm parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
WorkgroupForm answer = new WorkgroupForm();
boolean done = false;
@ -59,7 +60,7 @@ public class WorkgroupForm extends SimpleIQ {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG) {
// Parse the packet extension
PacketParserUtils.addExtensionElement(answer, parser);
PacketParserUtils.addExtensionElement(answer, parser, xmlEnvironment);
}
else if (eventType == XmlPullParser.END_TAG) {
if (parser.getName().equals(ELEMENT_NAME)) {

View file

@ -24,6 +24,7 @@ import java.util.Date;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jxmpp.jid.EntityBareJid;
@ -93,7 +94,7 @@ public class AgentChatHistory extends IQ {
public static class InternalProvider extends IQProvider<AgentChatHistory> {
@Override
public AgentChatHistory parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public AgentChatHistory parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
if (parser.getEventType() != XmlPullParser.START_TAG) {
throw new IllegalStateException("Parser not in proper position, or bad XML.");
}

View file

@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smackx.workgroup.util.MetaDataUtils;
@ -84,7 +85,7 @@ public class ChatMetadata extends IQ {
public static class Provider extends IQProvider<ChatMetadata> {
@Override
public ChatMetadata parse(XmlPullParser parser, int initialDepth)
public ChatMetadata parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
final ChatMetadata chatM = new ChatMetadata();

View file

@ -21,6 +21,7 @@ import java.io.IOException;
import java.io.StringReader;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.StringUtils;
@ -102,7 +103,7 @@ public class Macros extends IQ {
public static class InternalProvider extends IQProvider<Macros> {
@Override
public Macros parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public Macros parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
Macros macroGroup = new Macros();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.ext.notes;
import java.io.IOException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@ -84,7 +85,7 @@ public class ChatNotes extends IQ {
public static class Provider extends IQProvider<ChatNotes> {
@Override
public ChatNotes parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public ChatNotes parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
ChatNotes chatNotes = new ChatNotes();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@ -107,7 +108,7 @@ public class AgentInfo extends IQ {
public static class Provider extends IQProvider<AgentInfo> {
@Override
public AgentInfo parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public AgentInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
AgentInfo answer = new AgentInfo();
boolean done = false;

View file

@ -27,6 +27,7 @@ import java.util.List;
import java.util.TimeZone;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -237,7 +238,7 @@ public class AgentStatus implements ExtensionElement {
public static class Provider extends ExtensionElementProvider<AgentStatus> {
@Override
public AgentStatus parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public AgentStatus parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
AgentStatus agentStatus = new AgentStatus();
agentStatus.workgroupJID = ParserUtils.getBareJidAttribute(parser);

View file

@ -24,6 +24,7 @@ import java.util.Iterator;
import java.util.Set;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -121,7 +122,7 @@ public class AgentStatusRequest extends IQ {
public static class Provider extends IQProvider<AgentStatusRequest> {
@Override
public AgentStatusRequest parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public AgentStatusRequest parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
AgentStatusRequest statusRequest = new AgentStatusRequest();
boolean done = false;

View file

@ -24,6 +24,7 @@ import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -105,7 +106,7 @@ public class AgentWorkgroups extends IQ {
public static class Provider extends IQProvider<AgentWorkgroups> {
@Override
public AgentWorkgroups parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public AgentWorkgroups parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
final Jid agentJID = ParserUtils.getJidAttribute(parser);
List<String> workgroups = new ArrayList<>();

View file

@ -21,6 +21,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smackx.workgroup.MetaData;
@ -42,7 +43,7 @@ public class MetaDataProvider extends ExtensionElementProvider<MetaData> {
* @throws XmlPullParserException
*/
@Override
public MetaData parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public MetaData parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
Map<String, List<String>> metaData = MetaDataUtils.parseMetaData(parser);
return new MetaData(metaData);

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@ -78,7 +79,7 @@ public class MonitorPacket extends IQ {
public static class InternalProvider extends IQProvider<MonitorPacket> {
@Override
public MonitorPacket parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public MonitorPacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
MonitorPacket packet = new MonitorPacket();
boolean done = false;

View file

@ -27,6 +27,7 @@ import java.util.Set;
import java.util.TimeZone;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.parsing.SmackParsingException.SmackTextParseException;
import org.jivesoftware.smack.provider.IQProvider;
@ -137,7 +138,7 @@ public class OccupantsInfo extends IQ {
public static class Provider extends IQProvider<OccupantsInfo> {
@Override
public OccupantsInfo parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackTextParseException {
public OccupantsInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackTextParseException {
OccupantsInfo occupantsInfo = new OccupantsInfo(parser.getAttributeValue("", "roomID"));
boolean done = false;

View file

@ -23,6 +23,7 @@ import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
@ -51,7 +52,7 @@ public class OfferRequestProvider extends IQProvider<IQ> {
// happen anytime soon.
@Override
public OfferRequestPacket parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackParsingException {
public OfferRequestPacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
int eventType = parser.getEventType();
String sessionID = null;
int timeout = -1;
@ -90,13 +91,13 @@ public class OfferRequestProvider extends IQProvider<IQ> {
}
else if (RoomInvitation.ELEMENT_NAME.equals(elemName)) {
RoomInvitation invitation = (RoomInvitation) PacketParserUtils
.parseExtensionElement(RoomInvitation.ELEMENT_NAME, RoomInvitation.NAMESPACE, parser);
.parseExtensionElement(RoomInvitation.ELEMENT_NAME, RoomInvitation.NAMESPACE, parser, xmlEnvironment);
content = new InvitationRequest(invitation.getInviter(), invitation.getRoom(),
invitation.getReason());
}
else if (RoomTransfer.ELEMENT_NAME.equals(elemName)) {
RoomTransfer transfer = (RoomTransfer) PacketParserUtils
.parseExtensionElement(RoomTransfer.ELEMENT_NAME, RoomTransfer.NAMESPACE, parser);
.parseExtensionElement(RoomTransfer.ELEMENT_NAME, RoomTransfer.NAMESPACE, parser, xmlEnvironment);
content = new TransferRequest(transfer.getInviter(), transfer.getRoom(), transfer.getReason());
}
}

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -35,7 +36,7 @@ import org.xmlpull.v1.XmlPullParserException;
public class OfferRevokeProvider extends IQProvider<IQ> {
@Override
public OfferRevokePacket parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public OfferRevokePacket parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
// The parser will be positioned on the opening IQ tag, so get the JID attribute.
Jid userJID = ParserUtils.getJidAttribute(parser);
// Default the userID to the JID.

View file

@ -27,6 +27,7 @@ import java.util.Set;
import java.util.logging.Logger;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.parsing.SmackParsingException.SmackTextParseException;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
@ -146,7 +147,7 @@ public final class QueueDetails implements ExtensionElement {
@Override
public QueueDetails parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException, SmackTextParseException {
SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);

View file

@ -128,7 +128,7 @@ public class QueueOverview implements ExtensionElement {
@Override
public QueueOverview parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException, SmackTextParseException {
int eventType = parser.getEventType();
QueueOverview queueOverview = new QueueOverview();

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.xmlpull.v1.XmlPullParser;
@ -97,7 +98,7 @@ public class QueueUpdate implements ExtensionElement {
public static class Provider extends ExtensionElementProvider<QueueUpdate> {
@Override
public QueueUpdate parse(XmlPullParser parser, int initialDepth)
public QueueUpdate parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
boolean done = false;
int position = -1;

View file

@ -22,6 +22,7 @@ import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.XmlStringBuilder;
@ -169,7 +170,7 @@ public class RoomInvitation implements ExtensionElement {
@Override
public RoomInvitation parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException {
final RoomInvitation invitation = new RoomInvitation();
invitation.type = Type.valueOf(parser.getAttributeValue("", "type"));

View file

@ -22,6 +22,7 @@ import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IQ.IQChildElementXmlStringBuilder;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.XmlStringBuilder;
@ -165,7 +166,7 @@ public class RoomTransfer implements ExtensionElement {
@Override
public RoomTransfer parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException {
final RoomTransfer invitation = new RoomTransfer();
invitation.type = RoomTransfer.Type.valueOf(parser.getAttributeValue("", "type"));

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.xmlpull.v1.XmlPullParser;
@ -71,7 +72,7 @@ public class SessionID implements ExtensionElement {
public static class Provider extends ExtensionElementProvider<SessionID> {
@Override
public SessionID parse(XmlPullParser parser, int initialDepth)
public SessionID parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
String sessionID = parser.getAttributeValue("", "id");

View file

@ -22,6 +22,7 @@ import java.util.ArrayList;
import java.util.List;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
@ -37,7 +38,7 @@ import org.xmlpull.v1.XmlPullParserException;
public class TranscriptProvider extends IQProvider<Transcript> {
@Override
public Transcript parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackParsingException {
public Transcript parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
String sessionID = parser.getAttributeValue("", "sessionID");
List<Stanza> packets = new ArrayList<>();

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
@ -57,7 +58,7 @@ public class TranscriptSearch extends SimpleIQ {
public static class Provider extends IQProvider<TranscriptSearch> {
@Override
public TranscriptSearch parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackParsingException {
public TranscriptSearch parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
TranscriptSearch answer = new TranscriptSearch();
boolean done = false;
@ -65,7 +66,7 @@ public class TranscriptSearch extends SimpleIQ {
int eventType = parser.next();
if (eventType == XmlPullParser.START_TAG) {
// Parse the packet extension
PacketParserUtils.addExtensionElement(answer, parser);
PacketParserUtils.addExtensionElement(answer, parser, xmlEnvironment);
}
else if (eventType == XmlPullParser.END_TAG) {
if (parser.getName().equals(ELEMENT_NAME)) {

View file

@ -25,6 +25,7 @@ import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -46,7 +47,7 @@ public class TranscriptsProvider extends IQProvider<Transcripts> {
}
@Override
public Transcripts parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public Transcripts parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
Jid userID = ParserUtils.getJidAttribute(parser, "userID");
List<Transcripts.TranscriptSummary> summaries = new ArrayList<>();

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -73,7 +74,7 @@ public class UserID implements ExtensionElement {
public static class Provider extends ExtensionElementProvider<UserID> {
@Override
public UserID parse(XmlPullParser parser, int initialDepth)
public UserID parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
Jid userID = ParserUtils.getJidAttribute(parser, "id");

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.packet;
import java.io.IOException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -83,7 +84,7 @@ public class WorkgroupInformation implements ExtensionElement {
*/
@Override
public WorkgroupInformation parse(XmlPullParser parser,
int initialDepth) throws XmlPullParserException,
int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException,
IOException {
EntityBareJid workgroupJID = ParserUtils.getBareJidAttribute(parser);

View file

@ -24,6 +24,7 @@ import java.util.Iterator;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@ -126,7 +127,7 @@ public class ChatSettings extends IQ {
public static class InternalProvider extends IQProvider<ChatSettings> {
@Override
public ChatSettings parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public ChatSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
if (parser.getEventType() != XmlPullParser.START_TAG) {
throw new IllegalStateException("Parser not in proper position, or bad XML.");
}

View file

@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.StringUtils;
@ -80,7 +81,7 @@ public class GenericSettings extends IQ {
public static class InternalProvider extends IQProvider<GenericSettings> {
@Override
public GenericSettings parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public GenericSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
GenericSettings setting = new GenericSettings();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.StringUtils;
@ -107,7 +108,7 @@ public class OfflineSettings extends SimpleIQ {
public static class InternalProvider extends IQProvider<OfflineSettings> {
@Override
public OfflineSettings parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public OfflineSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
OfflineSettings offlineSettings = new OfflineSettings();
boolean done = false;

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.StringUtils;
@ -78,7 +79,7 @@ public class SearchSettings extends SimpleIQ {
public static class InternalProvider extends IQProvider<SearchSettings> {
@Override
public SearchSettings parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public SearchSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
SearchSettings settings = new SearchSettings();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException;
import org.jivesoftware.smack.packet.SimpleIQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.stringencoder.Base64;
@ -68,7 +69,7 @@ public class SoundSettings extends SimpleIQ {
public static class InternalProvider extends IQProvider<SoundSettings> {
@Override
public SoundSettings parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public SoundSettings parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
SoundSettings soundSettings = new SoundSettings();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.workgroup.settings;
import java.io.IOException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.StringUtils;
@ -95,7 +96,7 @@ public class WorkgroupProperties extends IQ {
public static class InternalProvider extends IQProvider<WorkgroupProperties> {
@Override
public WorkgroupProperties parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
public WorkgroupProperties parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException {
WorkgroupProperties props = new WorkgroupProperties();
boolean done = false;

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.xevent.provider;
import java.io.IOException;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smackx.xevent.packet.MessageEvent;
@ -43,7 +44,7 @@ public class MessageEventProvider extends ExtensionElementProvider<MessageEvent>
* @throws XmlPullParserException
*/
@Override
public MessageEvent parse(XmlPullParser parser, int initialDepth)
public MessageEvent parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
MessageEvent messageEvent = new MessageEvent();
boolean done = false;

View file

@ -20,6 +20,7 @@ package org.jivesoftware.smackx.xroster.provider;
import java.io.IOException;
import java.util.ArrayList;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.ParserUtils;
@ -47,7 +48,7 @@ public class RosterExchangeProvider extends ExtensionElementProvider<RosterExcha
* @throws XmlPullParserException
*/
@Override
public RosterExchange parse(XmlPullParser parser, int initialDepth)
public RosterExchange parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
throws XmlPullParserException, IOException {
// CHECKSTYLE:OFF
RosterExchange rosterExchange = new RosterExchange();