mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 05:52:06 +01:00
New API design (SMACK-545)
This commit is contained in:
parent
201152ef42
commit
8d3814a8a7
152 changed files with 394 additions and 493 deletions
|
@ -22,15 +22,14 @@
|
|||
<className>org.jivesoftware.smack.provider.CoreInitializer</className>
|
||||
<className>org.jivesoftware.smack.provider.VmArgInitializer</className>
|
||||
<className>org.jivesoftware.smack.PrivacyListManager</className>
|
||||
<className>org.jivesoftware.smack.keepalive.KeepAliveManager</className>
|
||||
<className>org.jivesoftware.smackx.provider.ExtensionInitializer</className>
|
||||
<className>org.jivesoftware.smackx.ServiceDiscoveryManager</className>
|
||||
<className>org.jivesoftware.smackx.XHTMLManager</className>
|
||||
<className>org.jivesoftware.smackx.ExtensionInitializer</className>
|
||||
<className>org.jivesoftware.smackx.disco.ServiceDiscoveryManager</className>
|
||||
<className>org.jivesoftware.smackx.xhtmlim.XHTMLManager</className>
|
||||
<className>org.jivesoftware.smackx.muc.MultiUserChat</className>
|
||||
<className>org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager</className>
|
||||
<className>org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager</className>
|
||||
<className>org.jivesoftware.smackx.filetransfer.FileTransferManager</className>
|
||||
<className>org.jivesoftware.smackx.LastActivityManager</className>
|
||||
<className>org.jivesoftware.smackx.iqlast.LastActivityManager</className>
|
||||
<className>org.jivesoftware.smack.ReconnectionManager</className>
|
||||
<className>org.jivesoftware.smackx.commands.AdHocCommandManager</className>
|
||||
<className>org.jivesoftware.smack.util.dns.JavaxResolver</className>
|
||||
|
|
|
@ -31,12 +31,13 @@ import org.jivesoftware.smack.filter.PacketIDFilter;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.carbons.packet.CarbonExtension;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
|
||||
/**
|
||||
* Packet extension for XEP-0280: Message Carbons. This class implements
|
||||
* the manager for registering {@link Carbon} support, enabling and disabling
|
||||
* the manager for registering {@link CarbonExtension} support, enabling and disabling
|
||||
* message carbons.
|
||||
*
|
||||
* You should call enableCarbons() before sending your first undirected
|
||||
|
@ -62,7 +63,7 @@ public class CarbonManager {
|
|||
|
||||
private CarbonManager(Connection connection) {
|
||||
ServiceDiscoveryManager sdm = ServiceDiscoveryManager.getInstanceFor(connection);
|
||||
sdm.addFeature(Carbon.NAMESPACE);
|
||||
sdm.addFeature(CarbonExtension.NAMESPACE);
|
||||
weakRefConnection = new WeakReference<Connection>(connection);
|
||||
instances.put(connection, this);
|
||||
}
|
||||
|
@ -87,7 +88,7 @@ public class CarbonManager {
|
|||
private IQ carbonsEnabledIQ(final boolean new_state) {
|
||||
IQ setIQ = new IQ() {
|
||||
public String getChildElementXML() {
|
||||
return "<" + (new_state? "enable" : "disable") + " xmlns='" + Carbon.NAMESPACE + "'/>";
|
||||
return "<" + (new_state? "enable" : "disable") + " xmlns='" + CarbonExtension.NAMESPACE + "'/>";
|
||||
}
|
||||
};
|
||||
setIQ.setType(IQ.Type.SET);
|
||||
|
@ -104,7 +105,7 @@ public class CarbonManager {
|
|||
try {
|
||||
DiscoverInfo result = ServiceDiscoveryManager
|
||||
.getInstanceFor(connection).discoverInfo(connection.getServiceName());
|
||||
return result.containsFeature(Carbon.NAMESPACE);
|
||||
return result.containsFeature(CarbonExtension.NAMESPACE);
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
return false;
|
||||
|
@ -199,10 +200,10 @@ public class CarbonManager {
|
|||
*
|
||||
* @return a Carbon if available, null otherwise.
|
||||
*/
|
||||
public static Carbon getCarbon(Message msg) {
|
||||
Carbon cc = (Carbon)msg.getExtension("received", Carbon.NAMESPACE);
|
||||
public static CarbonExtension getCarbon(Message msg) {
|
||||
CarbonExtension cc = (CarbonExtension)msg.getExtension("received", CarbonExtension.NAMESPACE);
|
||||
if (cc == null)
|
||||
cc = (Carbon)msg.getExtension("sent", Carbon.NAMESPACE);
|
||||
cc = (CarbonExtension)msg.getExtension("sent", CarbonExtension.NAMESPACE);
|
||||
return cc;
|
||||
}
|
||||
|
||||
|
@ -212,6 +213,6 @@ public class CarbonManager {
|
|||
* @param msg Message object to mark private
|
||||
*/
|
||||
public static void disableCarbons(Message msg) {
|
||||
msg.addExtension(new Carbon.Private());
|
||||
msg.addExtension(new CarbonExtension.Private());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.carbons;
|
||||
package org.jivesoftware.smackx.carbons.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.forward.Forwarded;
|
||||
|
@ -30,7 +30,7 @@ import org.jivesoftware.smackx.forward.Forwarded;
|
|||
*
|
||||
* @author Georg Lukas
|
||||
*/
|
||||
public class Carbon implements PacketExtension {
|
||||
public class CarbonExtension implements PacketExtension {
|
||||
public static final String NAMESPACE = "urn:xmpp:carbons:2";
|
||||
|
||||
private Direction dir;
|
||||
|
@ -42,7 +42,7 @@ public class Carbon implements PacketExtension {
|
|||
* @param dir Determines if the carbon is being sent/received
|
||||
* @param fwd The forwarded message.
|
||||
*/
|
||||
public Carbon(Direction dir, Forwarded fwd) {
|
||||
public CarbonExtension(Direction dir, Forwarded fwd) {
|
||||
this.dir = dir;
|
||||
this.fwd = fwd;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class Carbon implements PacketExtension {
|
|||
}
|
||||
|
||||
/**
|
||||
* Defines the direction of a {@link Carbon} message.
|
||||
* Defines the direction of a {@link CarbonExtension} message.
|
||||
*/
|
||||
public static enum Direction {
|
||||
received,
|
||||
|
@ -107,11 +107,11 @@ public class Carbon implements PacketExtension {
|
|||
}
|
||||
|
||||
public String getNamespace() {
|
||||
return Carbon.NAMESPACE;
|
||||
return CarbonExtension.NAMESPACE;
|
||||
}
|
||||
|
||||
public String toXML() {
|
||||
return "<" + ELEMENT + " xmlns=\"" + Carbon.NAMESPACE + "\"/>";
|
||||
return "<" + ELEMENT + " xmlns=\"" + CarbonExtension.NAMESPACE + "\"/>";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -19,14 +19,14 @@ package org.jivesoftware.smackx.carbons.provider;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.carbons.Carbon;
|
||||
import org.jivesoftware.smackx.carbons.Carbon.Direction;
|
||||
import org.jivesoftware.smackx.carbons.packet.CarbonExtension;
|
||||
import org.jivesoftware.smackx.carbons.packet.CarbonExtension.Direction;
|
||||
import org.jivesoftware.smackx.forward.Forwarded;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
* This class implements the {@link PacketExtensionProvider} to parse
|
||||
* cabon copied messages from a packet. It will return a {@link Carbon} packet extension.
|
||||
* cabon copied messages from a packet. It will return a {@link CarbonExtension} packet extension.
|
||||
*
|
||||
* @author Georg Lukas
|
||||
*
|
||||
|
@ -48,6 +48,6 @@ public class CarbonManagerProvider implements PacketExtensionProvider {
|
|||
}
|
||||
if (fwd == null)
|
||||
throw new Exception("sent/received must contain exactly one <forwarded> tag");
|
||||
return new Carbon(dir, fwd);
|
||||
return new CarbonExtension(dir, fwd);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package org.jivesoftware.smackx.workgroup.agent;
|
||||
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.search.ReportedData;
|
||||
import org.jivesoftware.smackx.workgroup.MetaData;
|
||||
import org.jivesoftware.smackx.workgroup.QueueUser;
|
||||
import org.jivesoftware.smackx.workgroup.WorkgroupInvitation;
|
||||
|
@ -29,13 +31,11 @@ import org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes;
|
|||
import org.jivesoftware.smackx.workgroup.packet.*;
|
||||
import org.jivesoftware.smackx.workgroup.settings.GenericSettings;
|
||||
import org.jivesoftware.smackx.workgroup.settings.SearchSettings;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.filter.*;
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.ReportedData;
|
||||
import org.jivesoftware.smackx.packet.MUCUser;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
|
||||
package org.jivesoftware.smackx.workgroup.agent;
|
||||
|
||||
import org.jivesoftware.smackx.search.ReportedData;
|
||||
import org.jivesoftware.smackx.workgroup.packet.TranscriptSearch;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.filter.PacketIDFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.ReportedData;
|
||||
|
||||
/**
|
||||
* A TranscriptSearchManager helps to retrieve the form to use for searching transcripts
|
||||
|
|
|
@ -25,17 +25,17 @@ import org.jivesoftware.smackx.workgroup.packet.QueueUpdate;
|
|||
import org.jivesoftware.smackx.workgroup.packet.SessionID;
|
||||
import org.jivesoftware.smackx.workgroup.packet.UserID;
|
||||
import org.jivesoftware.smackx.workgroup.settings.*;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.filter.*;
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.muc.MultiUserChat;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.util.Properties;
|
|||
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
import org.jivesoftware.smack.test.util.TestUtils;
|
||||
import org.jivesoftware.smackx.carbons.packet.CarbonExtension;
|
||||
import org.jivesoftware.smackx.carbons.provider.CarbonManagerProvider;
|
||||
import org.jivesoftware.smackx.forward.Forwarded;
|
||||
import org.jivesoftware.smackx.forward.provider.ForwardedProvider;
|
||||
|
@ -44,7 +45,7 @@ public class CarbonTest {
|
|||
public void carbonSentTest() throws Exception {
|
||||
XmlPullParser parser;
|
||||
String control;
|
||||
Carbon cc;
|
||||
CarbonExtension cc;
|
||||
Forwarded fwd;
|
||||
|
||||
control = XMLBuilder.create("sent")
|
||||
|
@ -55,11 +56,11 @@ public class CarbonTest {
|
|||
.asString(outputProperties);
|
||||
|
||||
parser = TestUtils.getParser(control, "sent");
|
||||
cc = (Carbon) new CarbonManagerProvider().parseExtension(parser);
|
||||
cc = (CarbonExtension) new CarbonManagerProvider().parseExtension(parser);
|
||||
fwd = cc.getForwarded();
|
||||
|
||||
// meta
|
||||
assertEquals(Carbon.Direction.sent, cc.getDirection());
|
||||
assertEquals(CarbonExtension.Direction.sent, cc.getDirection());
|
||||
|
||||
// no delay in packet
|
||||
assertEquals(null, fwd.getDelayInfo());
|
||||
|
@ -76,7 +77,7 @@ public class CarbonTest {
|
|||
public void carbonReceivedTest() throws Exception {
|
||||
XmlPullParser parser;
|
||||
String control;
|
||||
Carbon cc;
|
||||
CarbonExtension cc;
|
||||
|
||||
control = XMLBuilder.create("received")
|
||||
.e("forwarded")
|
||||
|
@ -86,9 +87,9 @@ public class CarbonTest {
|
|||
.asString(outputProperties);
|
||||
|
||||
parser = TestUtils.getParser(control, "received");
|
||||
cc = (Carbon) new CarbonManagerProvider().parseExtension(parser);
|
||||
cc = (CarbonExtension) new CarbonManagerProvider().parseExtension(parser);
|
||||
|
||||
assertEquals(Carbon.Direction.received, cc.getDirection());
|
||||
assertEquals(CarbonExtension.Direction.received, cc.getDirection());
|
||||
|
||||
// check end of tag
|
||||
assertEquals(XmlPullParser.END_TAG, parser.getEventType());
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx;
|
||||
|
||||
import org.jivesoftware.smack.provider.UrlProviderFileInitializer;
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.address;
|
||||
|
||||
import org.jivesoftware.smackx.packet.MultipleAddresses;
|
||||
import org.jivesoftware.smackx.address.packet.MultipleAddresses;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,7 +36,7 @@ public class MultipleRecipientInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the list of {@link org.jivesoftware.smackx.packet.MultipleAddresses.Address}
|
||||
* Returns the list of {@link org.jivesoftware.smackx.address.packet.MultipleAddresses.Address}
|
||||
* that were the primary recipients of the packet.
|
||||
*
|
||||
* @return list of primary recipients of the packet.
|
||||
|
@ -46,7 +46,7 @@ public class MultipleRecipientInfo {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the list of {@link org.jivesoftware.smackx.packet.MultipleAddresses.Address}
|
||||
* Returns the list of {@link org.jivesoftware.smackx.address.packet.MultipleAddresses.Address}
|
||||
* that were the secondary recipients of the packet.
|
||||
*
|
||||
* @return list of secondary recipients of the packet.
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.address;
|
||||
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
|
@ -23,9 +23,10 @@ import org.jivesoftware.smack.packet.Message;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.util.Cache;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.packet.MultipleAddresses;
|
||||
import org.jivesoftware.smackx.address.packet.MultipleAddresses;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.address.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.address.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smackx.packet.MultipleAddresses;
|
||||
import org.jivesoftware.smackx.address.packet.MultipleAddresses;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.attention.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.bookmark;
|
|||
|
||||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smackx.PrivateDataManager;
|
||||
import org.jivesoftware.smackx.iqprivate.PrivateDataManager;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.bookmark;
|
||||
|
||||
import org.jivesoftware.smackx.packet.PrivateData;
|
||||
import org.jivesoftware.smackx.provider.PrivateDataProvider;
|
||||
import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
|
||||
import org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
|
|
|
@ -34,17 +34,17 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.util.SyncPacketSend;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamListener;
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHostUsed;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems.Item;
|
||||
import org.jivesoftware.smackx.filetransfer.FileTransferManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems.Item;
|
||||
|
||||
/**
|
||||
* The Socks5BytestreamManager class handles establishing SOCKS5 Bytestreams as specified in the <a
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.chatstates;
|
||||
|
||||
/**
|
||||
* Represents the current state of a users interaction with another user. Implemented according to
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.chatstates;
|
||||
|
||||
import org.jivesoftware.smack.Chat;
|
||||
import org.jivesoftware.smack.MessageListener;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.chatstates;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
|
@ -34,20 +34,21 @@ import org.jivesoftware.smack.packet.Message;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.util.collections.ReferenceMap;
|
||||
import org.jivesoftware.smackx.packet.ChatStateExtension;
|
||||
import org.jivesoftware.smackx.chatstates.packet.ChatStateExtension;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
|
||||
/**
|
||||
* Handles chat state for all chats on a particular Connection. This class manages both the
|
||||
* packet extensions and the disco response neccesary for compliance with
|
||||
* <a href="http://www.xmpp.org/extensions/xep-0085.html">XEP-0085</a>.
|
||||
*
|
||||
* NOTE: {@link org.jivesoftware.smackx.ChatStateManager#getInstance(org.jivesoftware.smack.Connection)}
|
||||
* NOTE: {@link org.jivesoftware.smackx.chatstates.ChatStateManager#getInstance(org.jivesoftware.smack.Connection)}
|
||||
* needs to be called in order for the listeners to be registered appropriately with the connection.
|
||||
* If this does not occur you will not receive the update notifications.
|
||||
*
|
||||
* @author Alexander Wenckus
|
||||
* @see org.jivesoftware.smackx.ChatState
|
||||
* @see org.jivesoftware.smackx.packet.ChatStateExtension
|
||||
* @see org.jivesoftware.smackx.chatstates.ChatState
|
||||
* @see org.jivesoftware.smackx.chatstates.packet.ChatStateExtension
|
||||
*/
|
||||
public class ChatStateManager {
|
||||
|
|
@ -15,9 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.chatstates.packet;
|
||||
|
||||
import org.jivesoftware.smackx.ChatState;
|
||||
import org.jivesoftware.smackx.chatstates.ChatState;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
@ -27,7 +27,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
* the current status of a chat participant.
|
||||
*
|
||||
* @author Alexander Wenckus
|
||||
* @see org.jivesoftware.smackx.ChatState
|
||||
* @see org.jivesoftware.smackx.chatstates.ChatState
|
||||
*/
|
||||
public class ChatStateExtension implements PacketExtension {
|
||||
|
|
@ -18,8 +18,8 @@ package org.jivesoftware.smackx.commands;
|
|||
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -25,15 +25,15 @@ import org.jivesoftware.smack.packet.Packet;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommand.Action;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommand.Status;
|
||||
import org.jivesoftware.smackx.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.disco.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
package org.jivesoftware.smackx.commands;
|
||||
|
||||
import org.jivesoftware.smackx.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
||||
|
||||
/**
|
||||
* Represents a command that can be executed locally from a remote location. This
|
||||
|
|
|
@ -24,8 +24,8 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.filter.PacketIDFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
/**
|
||||
* Represents a command that is in a remote location. Invoking one of the
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.commands.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
@ -23,6 +23,7 @@ import org.jivesoftware.smackx.commands.AdHocCommand;
|
|||
import org.jivesoftware.smackx.commands.AdHocCommand.Action;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommand.SpecificErrorCondition;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommandNote;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.commands.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
@ -25,9 +25,10 @@ import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
|||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommand;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommand.Action;
|
||||
import org.jivesoftware.smackx.commands.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.commands.AdHocCommandNote;
|
||||
import org.jivesoftware.smackx.packet.AdHocCommandData;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
import org.jivesoftware.smackx.xdata.provider.DataFormProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -11,7 +11,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.delay.packet;
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.delay.packet;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
|
@ -12,11 +12,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.delay.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DelayInfo;
|
||||
import org.jivesoftware.smackx.packet.DelayInformation;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInfo;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInformation;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.delay.provider;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
|
@ -23,7 +23,7 @@ import java.util.Date;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.packet.DelayInformation;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInformation;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -15,11 +15,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.disco;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,7 +36,7 @@ import java.util.List;
|
|||
public interface NodeInformationProvider {
|
||||
|
||||
/**
|
||||
* Returns a list of the Items {@link org.jivesoftware.smackx.packet.DiscoverItems.Item}
|
||||
* Returns a list of the Items {@link org.jivesoftware.smackx.disco.packet.DiscoverItems.Item}
|
||||
* defined in the node. For example, the MUC protocol specifies that an XMPP client should
|
||||
* answer an Item for each joined room when asked for the rooms where the use has joined.
|
||||
*
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.disco;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
|
@ -25,11 +25,11 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.entitycaps.EntityCapsManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.*;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.disco.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.disco.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
|
@ -15,12 +15,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.disco.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -15,11 +15,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.disco.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smackx.packet.*;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -36,17 +36,17 @@ import org.jivesoftware.smack.filter.PacketTypeFilter;
|
|||
import org.jivesoftware.smack.filter.PacketExtensionFilter;
|
||||
import org.jivesoftware.smack.util.Base64;
|
||||
import org.jivesoftware.smack.util.Cache;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Feature;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems.Item;
|
||||
import org.jivesoftware.smackx.entitycaps.cache.EntityCapsPersistentCache;
|
||||
import org.jivesoftware.smackx.entitycaps.packet.CapsExtension;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo.Feature;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo.Identity;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems.Item;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
|
|
|
@ -15,7 +15,7 @@ package org.jivesoftware.smackx.entitycaps.cache;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
|
||||
public interface EntityCapsPersistentCache {
|
||||
/**
|
||||
|
|
|
@ -31,9 +31,9 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smack.util.Base32Encoder;
|
||||
import org.jivesoftware.smack.util.StringEncoder;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.provider.DiscoverInfoProvider;
|
||||
import org.jivesoftware.smackx.entitycaps.EntityCapsManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.provider.DiscoverInfoProvider;
|
||||
import org.xmlpull.mxp1.MXParser;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.filter.OrFilter;
|
||||
import org.jivesoftware.smack.filter.PacketFilter;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -35,13 +35,13 @@ import org.jivesoftware.smack.filter.PacketIDFilter;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
/**
|
||||
* Manages the negotiation of file transfers according to JEP-0096. If a file is
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.filetransfer;
|
||||
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
/**
|
||||
* A request to send a file recieved from another user.
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamManager;
|
|||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.InBandBytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.ibb.packet.Open;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
/**
|
||||
* The In-Band Bytestream file transfer method, or IBB for short, transfers the
|
||||
|
|
|
@ -30,7 +30,7 @@ import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
|
|||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamSession;
|
||||
import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
|
||||
/**
|
||||
* Negotiates a SOCKS5 Bytestream to be used for file transfers. The implementation is based on the
|
||||
|
|
|
@ -24,10 +24,10 @@ import org.jivesoftware.smack.filter.PacketFilter;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.XMPPError;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.si.packet.StreamInitiation;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
|
|
@ -18,7 +18,7 @@ package org.jivesoftware.smackx.forward;
|
|||
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DelayInfo;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInfo;
|
||||
|
||||
/**
|
||||
* Packet extension for <a href="http://xmpp.org/extensions/xep-0297.html">XEP-0297</a>: Stanza Forwarding.
|
||||
|
|
|
@ -20,8 +20,8 @@ import org.jivesoftware.smack.packet.Packet;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInfo;
|
||||
import org.jivesoftware.smackx.forward.Forwarded;
|
||||
import org.jivesoftware.smackx.packet.DelayInfo;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.iqlast;
|
||||
|
||||
import org.jivesoftware.smack.*;
|
||||
import org.jivesoftware.smack.filter.AndFilter;
|
||||
|
@ -26,8 +26,9 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.LastActivity;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.iqlast.packet.LastActivity;
|
||||
|
||||
/**
|
||||
* A last activity manager for handling information about the last activity
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.iqlast.packet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -33,7 +33,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
/**
|
||||
* A last activity IQ for retrieving information about the last activity associated with a Jabber ID.
|
||||
* LastActivity (XEP-0012) allows for retrieval of how long a particular user has been idle and the
|
||||
* message the specified when doing so. Use {@link org.jivesoftware.smackx.LastActivityManager}
|
||||
* message the specified when doing so. Use {@link org.jivesoftware.smackx.iqlast.LastActivityManager}
|
||||
* to get the last activity of a user.
|
||||
*
|
||||
* @author Derek DeMoro
|
||||
|
@ -136,7 +136,7 @@ public class LastActivity extends IQ {
|
|||
* @return the LastActivity packet of the jid.
|
||||
* @throws XMPPException thrown if a server error has occured.
|
||||
* @deprecated This method only retreives the lapsed time since the last logout of a particular jid.
|
||||
* Replaced by {@link org.jivesoftware.smackx.LastActivityManager#getLastActivity(Connection, String) getLastActivity}
|
||||
* Replaced by {@link org.jivesoftware.smackx.iqlast.LastActivityManager#getLastActivity(Connection, String) getLastActivity}
|
||||
*/
|
||||
public static LastActivity getLastActivity(Connection con, String jid) throws XMPPException {
|
||||
LastActivity activity = new LastActivity();
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.iqprivate;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
|
@ -24,9 +24,9 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.filter.PacketIDFilter;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smackx.packet.DefaultPrivateData;
|
||||
import org.jivesoftware.smackx.packet.PrivateData;
|
||||
import org.jivesoftware.smackx.provider.PrivateDataProvider;
|
||||
import org.jivesoftware.smackx.iqprivate.packet.DefaultPrivateData;
|
||||
import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
|
||||
import org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.util.Hashtable;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.iqprivate.packet;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
|
@ -40,7 +40,7 @@ import java.util.Map;
|
|||
* In this case, getValue("color") would return "blue", and getValue("food") would
|
||||
* return "pizza". This parsing mechanism mechanism is very simplistic and will not work
|
||||
* as desired in all cases (for example, if some of the elements have attributes. In those
|
||||
* cases, a custom {@link org.jivesoftware.smackx.provider.PrivateDataProvider} should be used.
|
||||
* cases, a custom {@link org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider} should be used.
|
||||
*
|
||||
* @author Matt Tucker
|
||||
*/
|
|
@ -15,13 +15,13 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.iqprivate.packet;
|
||||
|
||||
/**
|
||||
* Interface to represent private data. Each private data chunk is an XML sub-document
|
||||
* with a root element name and namespace.
|
||||
*
|
||||
* @see org.jivesoftware.smackx.PrivateDataManager
|
||||
* @see org.jivesoftware.smackx.iqprivate.PrivateDataManager
|
||||
* @author Matt Tucker
|
||||
*/
|
||||
public interface PrivateData {
|
|
@ -15,10 +15,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.iqprivate.provider;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.jivesoftware.smackx.packet.PrivateData;
|
||||
import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
|
||||
|
||||
/**
|
||||
* An interface for parsing custom private data. Each PrivateDataProvider must
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.iqversion.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
package org.jivesoftware.smackx.muc;
|
||||
|
||||
import org.jivesoftware.smackx.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.packet.MUCOwner;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCOwner;
|
||||
|
||||
/**
|
||||
* Represents an affiliation of a user to a given room. The affiliate's information will always have
|
||||
|
|
|
@ -19,7 +19,7 @@ package org.jivesoftware.smackx.muc;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import org.jivesoftware.smackx.packet.MUCInitialPresence;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCInitialPresence;
|
||||
|
||||
/**
|
||||
* The DiscussionHistory class controls the number of characters or messages to receive
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.muc;
|
||||
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
|
||||
/**
|
||||
* Hosted rooms by a chat service may be discovered if they are configured to appear in the room
|
||||
|
|
|
@ -55,15 +55,15 @@ import org.jivesoftware.smack.packet.Packet;
|
|||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.packet.Registration;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.packet.MUCInitialPresence;
|
||||
import org.jivesoftware.smackx.packet.MUCOwner;
|
||||
import org.jivesoftware.smackx.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.disco.NodeInformationProvider;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCInitialPresence;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCOwner;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
/**
|
||||
* A MultiUserChat is a conversation that takes place among many users in a virtual
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
package org.jivesoftware.smackx.muc;
|
||||
|
||||
import org.jivesoftware.smackx.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.packet.MUCUser;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.jivesoftware.smack.packet.Presence;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
package org.jivesoftware.smackx.muc;
|
||||
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
|
@ -15,11 +15,11 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.muc.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
||||
import org.jivesoftware.smackx.packet.MUCAdmin;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCAdmin;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -15,12 +15,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.muc.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.provider.*;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.packet.MUCOwner;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCOwner;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -15,11 +15,12 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.muc.provider;
|
||||
|
||||
import org.jivesoftware.smack.packet.*;
|
||||
import org.jivesoftware.smack.provider.*;
|
||||
import org.jivesoftware.smackx.packet.*;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smackx.muc.packet.MUCUser;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.nick.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
|
@ -15,9 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.offline;
|
||||
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
|
||||
/**
|
||||
* The OfflineMessageHeader holds header information of an offline message. The header
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.offline;
|
||||
|
||||
import org.jivesoftware.smack.PacketCollector;
|
||||
import org.jivesoftware.smack.SmackConfiguration;
|
||||
|
@ -25,10 +25,12 @@ import org.jivesoftware.smack.filter.*;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.packet.OfflineMessageInfo;
|
||||
import org.jivesoftware.smackx.packet.OfflineMessageRequest;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.offline.packet.OfflineMessageInfo;
|
||||
import org.jivesoftware.smackx.offline.packet.OfflineMessageRequest;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.offline.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
|
@ -23,7 +23,7 @@ import org.xmlpull.v1.XmlPullParser;
|
|||
|
||||
/**
|
||||
* OfflineMessageInfo is an extension included in the retrieved offline messages requested by
|
||||
* the {@link org.jivesoftware.smackx.OfflineMessageManager}. This extension includes a stamp
|
||||
* the {@link org.jivesoftware.smackx.offline.OfflineMessageManager}. This extension includes a stamp
|
||||
* that uniquely identifies the offline message. This stamp may be used for deleting the offline
|
||||
* message. The stamp may be of the form UTC timestamps but it is not required to have that format.
|
||||
*
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.offline.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.provider.IQProvider;
|
|
@ -1 +0,0 @@
|
|||
<body>Smack extensions API.</body>
|
|
@ -1 +0,0 @@
|
|||
<body>XML packets that are part of the XMPP extension protocols.</body>
|
|
@ -15,9 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.pep;
|
||||
|
||||
import org.jivesoftware.smackx.packet.PEPEvent;
|
||||
import org.jivesoftware.smackx.pep.packet.PEPEvent;
|
||||
|
||||
|
||||
/**
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx;
|
||||
package org.jivesoftware.smackx.pep;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -27,9 +27,9 @@ import org.jivesoftware.smack.filter.PacketFilter;
|
|||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.packet.PEPEvent;
|
||||
import org.jivesoftware.smackx.packet.PEPItem;
|
||||
import org.jivesoftware.smackx.packet.PEPPubSub;
|
||||
import org.jivesoftware.smackx.pep.packet.PEPEvent;
|
||||
import org.jivesoftware.smackx.pep.packet.PEPItem;
|
||||
import org.jivesoftware.smackx.pep.packet.PEPPubSub;
|
||||
|
||||
/**
|
||||
*
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.pep.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.pep.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.packet;
|
||||
package org.jivesoftware.smackx.pep.packet;
|
||||
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
package org.jivesoftware.smackx.pep.provider;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -35,8 +35,8 @@ import org.jivesoftware.smack.packet.IQ;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smack.util.SyncPacketSend;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.ping.packet.Ping;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jivesoftware.smackx.provider;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.provider.PacketExtensionProvider;
|
||||
import org.jivesoftware.smack.util.PacketParserUtils;
|
||||
import org.jivesoftware.smackx.pubsub.provider.ItemProvider;
|
||||
import org.jivesoftware.smackx.pubsub.provider.ItemsProvider;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
/**
|
||||
*
|
||||
* This class simplifies parsing of embedded elements by using the
|
||||
* <a href="http://en.wikipedia.org/wiki/Template_method_pattern">Template Method Pattern</a>.
|
||||
* After extracting the current element attributes and content of any child elements, the template method
|
||||
* ({@link #createReturnExtension(String, String, Map, List)} is called. Subclasses
|
||||
* then override this method to create the specific return type.
|
||||
*
|
||||
* <p>To use this class, you simply register your subclasses as extension providers in the
|
||||
* <b>smack.properties</b> file. Then they will be automatically picked up and used to parse
|
||||
* any child elements.
|
||||
*
|
||||
* <pre>
|
||||
* For example, given the following message
|
||||
*
|
||||
* <message from='pubsub.shakespeare.lit' to='francisco@denmark.lit' id='foo>
|
||||
* <event xmlns='http://jabber.org/protocol/pubsub#event>
|
||||
* <items node='princely_musings'>
|
||||
* <item id='asdjkwei3i34234n356'>
|
||||
* <entry xmlns='http://www.w3.org/2005/Atom'>
|
||||
* <title>Soliloquy</title>
|
||||
* <link rel='alternative' type='text/html'/>
|
||||
* <id>tag:denmark.lit,2003:entry-32397</id>
|
||||
* </entry>
|
||||
* </item>
|
||||
* </items>
|
||||
* </event>
|
||||
* </message>
|
||||
*
|
||||
* I would have a classes
|
||||
* {@link ItemsProvider} extends {@link EmbeddedExtensionProvider}
|
||||
* {@link ItemProvider} extends {@link EmbeddedExtensionProvider}
|
||||
* and
|
||||
* AtomProvider extends {@link PacketExtensionProvider}
|
||||
*
|
||||
* These classes are then registered in the meta-inf/smack.providers file
|
||||
* as follows.
|
||||
*
|
||||
* <extensionProvider>
|
||||
* <elementName>items</elementName>
|
||||
* <namespace>http://jabber.org/protocol/pubsub#event</namespace>
|
||||
* <className>org.jivesoftware.smackx.provider.ItemsEventProvider</className>
|
||||
* </extensionProvider>
|
||||
* <extensionProvider>
|
||||
* <elementName>item</elementName>
|
||||
* <namespace>http://jabber.org/protocol/pubsub#event</namespace>
|
||||
* <className>org.jivesoftware.smackx.provider.ItemProvider</className>
|
||||
* </extensionProvider>
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author Robin Collier
|
||||
*
|
||||
* @deprecated This has been moved to {@link org.jivesoftware.smack.provider.EmbeddedExtensionProvider}
|
||||
*/
|
||||
abstract public class EmbeddedExtensionProvider implements PacketExtensionProvider
|
||||
{
|
||||
|
||||
final public PacketExtension parseExtension(XmlPullParser parser) throws Exception
|
||||
{
|
||||
String namespace = parser.getNamespace();
|
||||
String name = parser.getName();
|
||||
Map<String, String> attMap = new HashMap<String, String>();
|
||||
|
||||
for(int i=0; i<parser.getAttributeCount(); i++)
|
||||
{
|
||||
attMap.put(parser.getAttributeName(i), parser.getAttributeValue(i));
|
||||
}
|
||||
List<PacketExtension> extensions = new ArrayList<PacketExtension>();
|
||||
|
||||
do
|
||||
{
|
||||
int tag = parser.next();
|
||||
|
||||
if (tag == XmlPullParser.START_TAG)
|
||||
extensions.add(PacketParserUtils.parsePacketExtension(parser.getName(), parser.getNamespace(), parser));
|
||||
} while (!name.equals(parser.getName()));
|
||||
|
||||
return createReturnExtension(name, namespace, attMap, extensions);
|
||||
}
|
||||
|
||||
abstract protected PacketExtension createReturnExtension(String currentElement, String currentNamespace, Map<String, String> attributeMap, List<? extends PacketExtension> content);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<body>Provides pluggable parsing logic for Smack extensions.</body>
|
|
@ -17,9 +17,9 @@ import java.util.ArrayList;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
/**
|
||||
* A decorator for a {@link Form} to easily enable reading and updating
|
||||
|
|
|
@ -15,7 +15,7 @@ package org.jivesoftware.smackx.pubsub;
|
|||
|
||||
import java.net.URL;
|
||||
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
/**
|
||||
* This enumeration represents all the fields of a node configuration form. This enumeration
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
/**
|
||||
* Generic packet extension which represents any pubsub form that is
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.pubsub;
|
||||
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
/**
|
||||
* Defines the allowable types for a {@link Form}
|
||||
|
|
|
@ -20,7 +20,7 @@ import java.util.List;
|
|||
import org.jivesoftware.smack.Connection;
|
||||
import org.jivesoftware.smack.XMPPException;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.pubsub.packet.PubSub;
|
||||
import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
|
||||
|
||||
|
|
|
@ -31,11 +31,8 @@ import org.jivesoftware.smack.packet.Message;
|
|||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.packet.DelayInformation;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.Header;
|
||||
import org.jivesoftware.smackx.packet.HeadersExtension;
|
||||
import org.jivesoftware.smackx.delay.packet.DelayInformation;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.pubsub.listener.ItemDeleteListener;
|
||||
import org.jivesoftware.smackx.pubsub.listener.ItemEventListener;
|
||||
import org.jivesoftware.smackx.pubsub.listener.NodeConfigListener;
|
||||
|
@ -43,6 +40,9 @@ import org.jivesoftware.smackx.pubsub.packet.PubSub;
|
|||
import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;
|
||||
import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
|
||||
import org.jivesoftware.smackx.pubsub.util.NodeUtils;
|
||||
import org.jivesoftware.smackx.shim.packet.Header;
|
||||
import org.jivesoftware.smackx.shim.packet.HeadersExtension;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
|
||||
abstract public class Node
|
||||
{
|
||||
|
|
|
@ -22,15 +22,15 @@ import org.jivesoftware.smack.XMPPException;
|
|||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smack.packet.Packet;
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
|
||||
import org.jivesoftware.smackx.pubsub.packet.PubSub;
|
||||
import org.jivesoftware.smackx.pubsub.packet.PubSubNamespace;
|
||||
import org.jivesoftware.smackx.pubsub.packet.SyncPacketSend;
|
||||
import org.jivesoftware.smackx.pubsub.util.NodeUtils;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
|
||||
/**
|
||||
* This is the starting point for access to the pubsub service. It
|
||||
|
|
|
@ -22,9 +22,9 @@ import java.util.Iterator;
|
|||
import java.util.UnknownFormatConversionException;
|
||||
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.FormField;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.FormField;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
/**
|
||||
* A decorator for a {@link Form} to easily enable reading and updating
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.Affiliation;
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.Affiliation;
|
||||
import org.jivesoftware.smackx.pubsub.AffiliationsExtension;
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.ConfigurationEvent;
|
||||
import org.jivesoftware.smackx.pubsub.ConfigureForm;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
/**
|
||||
* Parses the node configuration element out of the message event stanza from
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.EventElement;
|
||||
import org.jivesoftware.smackx.pubsub.EventElementType;
|
||||
import org.jivesoftware.smackx.pubsub.NodeExtension;
|
||||
|
|
|
@ -17,11 +17,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.Form;
|
||||
import org.jivesoftware.smackx.packet.DataForm;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.FormNode;
|
||||
import org.jivesoftware.smackx.pubsub.FormNodeType;
|
||||
import org.jivesoftware.smackx.xdata.Form;
|
||||
import org.jivesoftware.smackx.xdata.packet.DataForm;
|
||||
|
||||
/**
|
||||
* Parses one of several elements used in pubsub that contain a form of some kind as a child element. The
|
||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jivesoftware.smack.packet.PacketExtension;
|
||||
import org.jivesoftware.smackx.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smack.provider.EmbeddedExtensionProvider;
|
||||
import org.jivesoftware.smackx.pubsub.RetractItem;
|
||||
|
||||
/**
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue