mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 14:01:08 +01:00
Use XmlEnvironment in parsing/provider subsystem
This commit is contained in:
parent
43bb418d99
commit
8df69bd3ce
188 changed files with 486 additions and 264 deletions
|
|
@ -19,6 +19,7 @@ package org.jivesoftware.smackx.disco.provider;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.parsing.SmackParsingException;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
|
|
@ -36,7 +37,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
public class DiscoverInfoProvider extends IQProvider<DiscoverInfo> {
|
||||
|
||||
@Override
|
||||
public DiscoverInfo parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
public DiscoverInfo parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
DiscoverInfo discoverInfo = new DiscoverInfo();
|
||||
boolean done = false;
|
||||
DiscoverInfo.Identity identity;
|
||||
|
|
@ -68,7 +69,7 @@ public class DiscoverInfoProvider extends IQProvider<DiscoverInfo> {
|
|||
}
|
||||
// Otherwise, it must be a packet extension.
|
||||
else {
|
||||
PacketParserUtils.addExtensionElement(discoverInfo, parser);
|
||||
PacketParserUtils.addExtensionElement(discoverInfo, parser, xmlEnvironment);
|
||||
}
|
||||
} else if (eventType == XmlPullParser.END_TAG) {
|
||||
if (parser.getName().equals("identity")) {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ package org.jivesoftware.smackx.disco.provider;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.packet.XmlEnvironment;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.ParserUtils;
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
public class DiscoverItemsProvider extends IQProvider<DiscoverItems> {
|
||||
|
||||
@Override
|
||||
public DiscoverItems parse(XmlPullParser parser, int initialDepth)
|
||||
public DiscoverItems parse(XmlPullParser parser, int initialDepth, XmlEnvironment xmlEnvironment)
|
||||
throws XmlPullParserException, IOException {
|
||||
DiscoverItems discoverItems = new DiscoverItems();
|
||||
boolean done = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue