mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 18:29:45 +02:00
Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
This commit is contained in:
parent
2250ac20ed
commit
d4a6d8e653
233 changed files with 1175 additions and 895 deletions
|
@ -17,7 +17,7 @@ package org.jivesoftware.smackx.jingle.provider;
|
|||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaTypeFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
|
@ -69,7 +69,7 @@ public class JingleProviderTest extends SmackTestCase {
|
|||
iqSent.setType(IQ.Type.get);
|
||||
|
||||
// Create a filter and a collector...
|
||||
PacketFilter filter = new PacketTypeFilter(IQ.class);
|
||||
PacketFilter filter = new StanzaTypeFilter(IQ.class);
|
||||
PacketCollector collector = getConnection(0).createPacketCollector(filter);
|
||||
|
||||
System.out.println("Testing if a Jingle IQ can be sent and received...");
|
||||
|
|
|
@ -27,7 +27,7 @@ import org.jivesoftware.smack.SmackException;
|
|||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPConnectionRegistry;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
|
@ -441,7 +441,7 @@ public class JingleManager implements JingleSessionListener {
|
|||
* establish a new session.
|
||||
*/
|
||||
private void initJingleSessionRequestListeners() {
|
||||
PacketFilter initRequestFilter = new PacketFilter() {
|
||||
StanzaFilter initRequestFilter = new StanzaFilter() {
|
||||
// Return true if we accept this packet
|
||||
public boolean accept(Stanza pin) {
|
||||
if (pin instanceof IQ) {
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.jivesoftware.smack.SmackException;
|
|||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.filter.StanzaFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Stanza;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
|
@ -79,7 +79,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
PacketListener packetListener;
|
||||
|
||||
PacketFilter packetFilter;
|
||||
StanzaFilter packetFilter;
|
||||
|
||||
protected List<JingleMediaManager> jingleMediaManagers = null;
|
||||
|
||||
|
@ -676,7 +676,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
}
|
||||
};
|
||||
|
||||
packetFilter = new PacketFilter() {
|
||||
packetFilter = new StanzaFilter() {
|
||||
public boolean accept(Stanza packet) {
|
||||
|
||||
if (packet instanceof IQ) {
|
||||
|
|
|
@ -21,14 +21,14 @@ import java.util.Collections;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
|
||||
/**
|
||||
* Jingle content.
|
||||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public class JingleContent implements PacketExtension {
|
||||
public class JingleContent implements ExtensionElement {
|
||||
|
||||
public static final String NODENAME = "content";
|
||||
public static final String CREATOR = "creator";
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingleold.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -29,7 +29,7 @@ import java.util.List;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public abstract class JingleContentDescription implements PacketExtension {
|
||||
public abstract class JingleContentDescription implements ExtensionElement {
|
||||
|
||||
// static
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingleold.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smackx.jingleold.media.ContentInfo;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +24,7 @@ import org.jivesoftware.smackx.jingleold.media.ContentInfo;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public class JingleContentInfo implements PacketExtension {
|
||||
public class JingleContentInfo implements ExtensionElement {
|
||||
|
||||
protected ContentInfo mediaInfoElement;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public abstract class JingleDescription implements PacketExtension {
|
||||
public abstract class JingleDescription implements ExtensionElement {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(JingleDescription.class.getName());
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ package org.jivesoftware.smackx.jingleold.packet;
|
|||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.media.ContentInfo;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
public class JingleError implements PacketExtension {
|
||||
public class JingleError implements ExtensionElement {
|
||||
|
||||
public static String NAMESPACE = "urn:xmpp:tmp:jingle:errors";
|
||||
|
||||
|
@ -122,9 +122,9 @@ public class JingleError implements PacketExtension {
|
|||
return NAMESPACE;
|
||||
}
|
||||
|
||||
public static class Provider extends PacketExtensionProvider<PacketExtension> {
|
||||
public static class Provider extends ExtensionElementProvider<ExtensionElement> {
|
||||
|
||||
private PacketExtension audioInfo;
|
||||
private ExtensionElement audioInfo;
|
||||
|
||||
/**
|
||||
* Empty constructor.
|
||||
|
@ -136,8 +136,8 @@ public class JingleError implements PacketExtension {
|
|||
* Parse a JingleDescription.Audio extension.
|
||||
*/
|
||||
@Override
|
||||
public PacketExtension parse(XmlPullParser parser, int initialDepth) {
|
||||
PacketExtension result = null;
|
||||
public ExtensionElement parse(XmlPullParser parser, int initialDepth) {
|
||||
ExtensionElement result = null;
|
||||
|
||||
if (audioInfo != null) {
|
||||
result = audioInfo;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingleold.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smackx.jingleold.nat.ICECandidate;
|
||||
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate;
|
||||
|
||||
|
@ -30,7 +30,7 @@ import java.util.List;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public class JingleTransport implements PacketExtension {
|
||||
public class JingleTransport implements ExtensionElement {
|
||||
|
||||
// static
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.jingleold.provider;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleContentDescription;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleContentDescription.JinglePayloadType;
|
||||
|
@ -31,7 +31,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public abstract class JingleContentDescriptionProvider extends PacketExtensionProvider<JingleContentDescription> {
|
||||
public abstract class JingleContentDescriptionProvider extends ExtensionElementProvider<JingleContentDescription> {
|
||||
|
||||
/**
|
||||
* Parse a iq/jingle/description/payload-type element.
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingleold.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.media.ContentInfo;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleContentInfo;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -32,9 +32,9 @@ public class JingleContentInfoProvider {
|
|||
/**
|
||||
* JingleDescription.Audio info provider
|
||||
*/
|
||||
public static class Audio extends PacketExtensionProvider<PacketExtension> {
|
||||
public static class Audio extends ExtensionElementProvider<ExtensionElement> {
|
||||
|
||||
private final PacketExtension audioInfo;
|
||||
private final ExtensionElement audioInfo;
|
||||
|
||||
/**
|
||||
* Empty constructor.
|
||||
|
@ -48,7 +48,7 @@ public class JingleContentInfoProvider {
|
|||
*
|
||||
* @param audioInfo the jmf info
|
||||
*/
|
||||
public Audio(final PacketExtension audioInfo) {
|
||||
public Audio(final ExtensionElement audioInfo) {
|
||||
super();
|
||||
this.audioInfo = audioInfo;
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ public class JingleContentInfoProvider {
|
|||
* Parse a JingleDescription.Audio extension.
|
||||
*/
|
||||
@Override
|
||||
public PacketExtension parse(XmlPullParser parser, int initialDepth) {
|
||||
PacketExtension result = null;
|
||||
public ExtensionElement parse(XmlPullParser parser, int initialDepth) {
|
||||
ExtensionElement result = null;
|
||||
|
||||
if (audioInfo != null) {
|
||||
result = audioInfo;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingleold.provider;
|
||||
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleContent;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
|
@ -25,7 +25,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
*
|
||||
* @author Jeff Williams
|
||||
*/
|
||||
public class JingleContentProvider extends PacketExtensionProvider<JingleContent> {
|
||||
public class JingleContentProvider extends ExtensionElementProvider<JingleContent> {
|
||||
|
||||
/**
|
||||
* Parse a JingleContent extension.
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.jingleold.provider;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.media.PayloadType;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleDescription;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -30,7 +30,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public abstract class JingleDescriptionProvider extends PacketExtensionProvider<JingleDescription> {
|
||||
public abstract class JingleDescriptionProvider extends ExtensionElementProvider<JingleDescription> {
|
||||
|
||||
/**
|
||||
* Parse a iq/jingle/description/payload-type element.
|
||||
|
|
|
@ -21,7 +21,7 @@ import java.io.IOException;
|
|||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.JingleActionEnum;
|
||||
import org.jivesoftware.smackx.jingleold.packet.Jingle;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleContent;
|
||||
|
@ -61,7 +61,7 @@ public class JingleProvider extends IQProvider<Jingle> {
|
|||
JingleDescriptionProvider jdpAudio = new JingleDescriptionProvider.Audio();
|
||||
JingleTransportProvider jtpRawUdp = new JingleTransportProvider.RawUdp();
|
||||
JingleTransportProvider jtpIce = new JingleTransportProvider.Ice();
|
||||
PacketExtensionProvider jmipAudio = new JingleContentInfoProvider.Audio();
|
||||
ExtensionElementProvider jmipAudio = new JingleContentInfoProvider.Audio();
|
||||
|
||||
int eventType;
|
||||
String elementName;
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.jingleold.provider;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smack.SmackException;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.jingleold.nat.ICECandidate;
|
||||
import org.jivesoftware.smackx.jingleold.nat.TransportCandidate;
|
||||
import org.jivesoftware.smackx.jingleold.packet.JingleTransport;
|
||||
|
@ -32,7 +32,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
*
|
||||
* @author Alvaro Saurin <alvaro.saurin@gmail.com>
|
||||
*/
|
||||
public abstract class JingleTransportProvider extends PacketExtensionProvider<JingleTransport> {
|
||||
public abstract class JingleTransportProvider extends ExtensionElementProvider<JingleTransport> {
|
||||
|
||||
/**
|
||||
* Obtain the corresponding TransportNegotiator instance.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue