1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-01 16:32:08 +01:00

Compare commits

..

21 commits

Author SHA1 Message Date
Florian Schmaus
adfca965b5 Merge branch 'master' of github.com:igniterealtime/Smack 2020-04-10 21:10:20 +02:00
Florian Schmaus
993bed07ef readme: replace IRC badge with XMPP MUC badge 2020-04-10 19:52:43 +02:00
Florian Schmaus
79b9c7b934 sinttest: add testDisconnectedNeverConnected for modular connection 2020-04-09 21:09:42 +02:00
Florian Schmaus
e68b89d266 sinttest: rename and move ModularXmppClientToServerConnection test
Rename and move the test in the correct package.
2020-04-09 21:09:17 +02:00
Florian Schmaus
85af4a022d compression: remove Android SDK level < 19 compatiblity
Since we now require Android SDK 19 or higher, we can use the method
directly.
2020-04-09 20:54:36 +02:00
Florian Schmaus
53c28f72ad
Merge pull request #351 from adiaholic/docFix
Correct code example inside `UserTuneElement`.
2020-04-09 17:23:16 +02:00
Florian Schmaus
390f7823e1 mam: add javadoc for parameter 2020-04-09 15:22:33 +02:00
Florian Schmaus
b8b084970e mam: remove deprecated method in MamManager 2020-04-09 15:21:50 +02:00
Florian Schmaus
1e5ea1fdbe mam: remove dead code in MamManager 2020-04-09 15:20:00 +02:00
Florian Schmaus
353e43407f mam: support of advanced configuration
Fixes SMACK-822.

Co-authored-by: Jagmeet Singh <jagmeets@zeta.tech>
2020-04-09 15:18:02 +02:00
Florian Schmaus
bf92712f4c legacy: merge workgroup.providers into legacy.providers
Previously the workgroup providers where not automatically loaded by
Smack. Fixes SMACK-729.
2020-04-09 15:14:09 +02:00
Florian Schmaus
f1dd925844 Mark code from the old integration-test dir as migration candidates 2020-04-09 15:14:09 +02:00
Florian Schmaus
f329b447f2 Delete some outdated code from the old integration-test dir
The code in the integration-test/ directories should either be
migrated to sinttest (or unit tests), or get deleted. This is a first
small step towards this goal.
2020-04-09 15:14:09 +02:00
Florian Schmaus
57d7ac4d5d Remove smack-compression-jzlib
The smack-compression-jzlib subproject is obsolete since Java 7 de-
and inflate support was added with SMACK-389. Now it is time to remove
it.

Fixes SMACK-840.
2020-04-09 15:14:09 +02:00
Florian Schmaus
5579567572 core: use addCompressionHandler() instead directly adding to the list 2020-04-09 15:14:09 +02:00
adiaholic
4991c952e7 Correct code example inside UserTuneElement. 2020-04-09 18:38:21 +05:30
Florian Schmaus
eaa94be7e6
Merge pull request #356 from vanitasvitae/improveAttention
Improve attention
2020-04-09 14:28:54 +02:00
Florian Schmaus
e70506152e
Merge pull request #357 from vanitasvitae/nicktest
Add Nick JUnit test
2020-04-09 14:28:08 +02:00
b5caf13c8a
Add Nick JUnit test 2020-04-08 22:15:29 +02:00
ffbd97ff10
Add AttentionElementTest 2020-04-08 22:09:13 +02:00
e81c4814ed
Make use of XmlStringBuilder in AttentionElement 2020-01-06 18:41:30 +01:00
25 changed files with 410 additions and 700 deletions

View file

@ -1,7 +1,7 @@
Smack
=====
[![Build Status](https://travis-ci.org/igniterealtime/Smack.svg?branch=master)](https://travis-ci.org/igniterealtime/Smack) [![Coverage Status](https://coveralls.io/repos/igniterealtime/Smack/badge.svg)](https://coveralls.io/r/igniterealtime/Smack) [![Project Stats](https://www.openhub.net/p/smack/widgets/project_thin_badge.gif)](https://www.openhub.net/p/smack) [![Visit our IRC channel](https://kiwiirc.com/buttons/irc.freenode.net/smack.png)](https://kiwiirc.com/client/irc.freenode.net/smack)
[![Build Status](https://travis-ci.org/igniterealtime/Smack.svg?branch=master)](https://travis-ci.org/igniterealtime/Smack) [![Coverage Status](https://coveralls.io/repos/igniterealtime/Smack/badge.svg)](https://coveralls.io/r/igniterealtime/Smack) [![Project Stats](https://www.openhub.net/p/smack/widgets/project_thin_badge.gif)](https://www.openhub.net/p/smack) [![Link to XMPP chat smack@conference.igniterealtime.org](https://inverse.chat/badge.svg?room=smack@conference.igniterealtime.org)](https://inverse.chat/#converse/room?jid=smack@conference.igniterealtime.org)
About
-----

View file

@ -59,7 +59,6 @@ allprojects {
':smack-android',
':smack-android-extensions',
':smack-bosh',
':smack-compression-jzlib',
':smack-debug',
':smack-debug-slf4j',
':smack-java7',

View file

@ -16,7 +16,6 @@ include 'smack-core',
'smack-resolver-javax',
'smack-sasl-javax',
'smack-sasl-provided',
'smack-compression-jzlib',
'smack-legacy',
'smack-jingle-old',
'smack-bosh',

View file

@ -1,8 +0,0 @@
description = """\
Compression with jzlib
Allow to compress the XMPP stream with help of jzlib."""
dependencies {
compile project(':smack-core')
compile 'com.jcraft:jzlib:[1.1,1.2)'
}

View file

@ -1,67 +0,0 @@
/**
*
* Copyright 2013-2014 Florian Schmaus
*
* 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.smack.compression.jzlib;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.compression.XMPPInputOutputStream;
import com.jcraft.jzlib.DeflaterOutputStream;
import com.jcraft.jzlib.InflaterInputStream;
/**
* This class provides XMPP "zlib" compression with the help of JZLib.
*
* @author Florian Schmaus
* @see <a href="http://www.jcraft.com/jzlib/">JZLib</a>
*
*/
public class JzlibInputOutputStream extends XMPPInputOutputStream {
static {
SmackConfiguration.addCompressionHandler(new JzlibInputOutputStream());
}
public JzlibInputOutputStream() {
super("zlib");
}
@Override
public boolean isSupported() {
return true;
}
@Override
public InputStream getInputStream(InputStream inputStream) throws IOException {
final InflaterInputStream is = new InflaterInputStream(inputStream);
return is;
}
@Override
public OutputStream getOutputStream(OutputStream outputStream) throws IOException {
final DeflaterOutputStream os = new DeflaterOutputStream(outputStream);
if (flushMethod == FlushMethod.SYNC_FLUSH) {
os.setSyncFlush(true);
}
return os;
}
}

View file

@ -1,21 +0,0 @@
/**
*
* Copyright 2015 Florian Schmaus
*
* 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.
*/
/**
* Support for XMPP stream compression (XEP-138) via JZlib.
*/
package org.jivesoftware.smack.compression.jzlib;

View file

@ -1 +0,0 @@
../../../../../../../../smack-core/src/main/java/org/jivesoftware/smack/compression/package-info.java

View file

@ -25,6 +25,7 @@ import org.jivesoftware.smack.filter.ThreadFilter;
*
* @author Gaston Dombiak
*/
// sinttest candidate
public class FloodTest extends SmackTestCase {
public FloodTest(String arg0) {

View file

@ -30,6 +30,7 @@ import org.jivesoftware.smackx.packet.Version;
*
* @author Gaston Dombiak
*/
// sinttest candidate
public class IQTest extends SmackTestCase {
public IQTest(String arg0) {

View file

@ -27,6 +27,7 @@ import org.jivesoftware.smack.test.SmackTestCase;
*
* @author Gaston Dombiak
*/
// sinttest candidate
public class MessageTest extends SmackTestCase {
public MessageTest(String arg0) {

View file

@ -1,43 +0,0 @@
/**
*
* Copyright 2005 Jive Software.
*
* 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.smack.util;
import junit.framework.TestCase;
/**
* A test case for the Cache class.
*/
public class CacheTest extends TestCase {
public void testMaxSize() {
Cache<Integer, String> cache = new Cache<Integer, String>(100, -1);
for (int i=0; i < 1000; i++) {
cache.put(i, "value");
assertTrue("Cache size must never be larger than 100.", cache.size() <= 100);
}
}
public void testLRU() {
Cache<Integer, String> cache = new Cache<Integer, String>(100, -1);
for (int i=0; i < 1000; i++) {
cache.put(i, "value");
assertTrue("LRU algorithm for cache key of '0' failed.",
cache.get(new Integer(0)) != null);
}
}
}

View file

@ -1,29 +0,0 @@
package org.jivesoftware.smack.util;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.XMPPException;
public class ConnectionUtils {
private ConnectionUtils() {}
public static void becomeFriends(XMPPConnection con0, XMPPConnection con1) throws XMPPException {
Roster r0 = con0.getRoster();
Roster r1 = con1.getRoster();
r0.setSubscriptionMode(Roster.SubscriptionMode.accept_all);
r1.setSubscriptionMode(Roster.SubscriptionMode.accept_all);
r0.createEntry(con1.getUser(), "u2", null);
r1.createEntry(con0.getUser(), "u1", null);
}
public static void letsAllBeFriends(XMPPConnection[] connections) throws XMPPException {
for (XMPPConnection c1 : connections) {
for (XMPPConnection c2 : connections) {
if (c1 == c2)
continue;
becomeFriends(c1, c2);
}
}
}
}

View file

@ -16,6 +16,7 @@ import org.jivesoftware.smack.util.dns.JavaxResolver;
import org.jivesoftware.smack.util.dns.SRVRecord;
import org.junit.Test;
// minidns candidate?
public class DNSUtilTest {
private static final String igniterealtimeDomain = "igniterealtime.org";
private static final String igniterealtimeXMPPServer = "xmpp." + igniterealtimeDomain;

View file

@ -1,203 +0,0 @@
/**
*
* Copyright 2006 Jive Software.
*
* 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.smack.util;
import java.io.StringReader;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.test.SmackTestCase;
import org.jivesoftware.smack.xml.XmlPullParserFactory;
import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException;
public class XMPPErrorTest extends SmackTestCase {
public XMPPErrorTest(String arg0) {
super(arg0);
}
/**
* Check the creation of a new xmppError locally.
*/
public void testLocalErrorCreation() {
XMPPError error = new XMPPError(XMPPError.Condition.item_not_found);
error.toXML();
assertEquals(error.getCondition(), "item-not-found");
assertEquals(error.getCode(), 404);
assertEquals(error.getType(), XMPPError.Type.CANCEL);
assertNull(error.getMessage());
}
/**
* Check the creation of a new xmppError locally.
*/
public void testLocalErrorWithCommentCreation() {
String message = "Error Message";
XMPPError error = new XMPPError(XMPPError.Condition.item_not_found, message);
error.toXML();
assertEquals(error.getCondition(), "item-not-found");
assertEquals(error.getCode(), 404);
assertEquals(error.getType(), XMPPError.Type.CANCEL);
assertEquals(error.getMessage(), message);
}
/**
* Check the creation of a new xmppError locally where there is not a default defined.
*/
public void testUserDefinedErrorWithCommentCreation() {
String message = "Error Message";
XMPPError error = new XMPPError(new XMPPError.Condition("my_own_error"), message);
error.toXML();
assertEquals(error.getCondition(), "my_own_error");
assertEquals(error.getCode(), 0);
assertNull(error.getType());
assertEquals(error.getMessage(), message);
}
/**
* Check the parser with an xml with the 404 error.
*/
public void test404() {
// Make the XML to test
String xml = "<error code='404' type='cancel'>" +
"<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" +
"</error></iq>";
try {
// Create the xml parser
XmlPullParser parser = getParserFromXML(xml);
// Create a packet from the xml
XMPPError packet = parseError(parser);
assertNotNull(packet);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
/**
* Check the parser with an xml with the 404 error.
*/
public void testCancel() {
// Make the XML to test
String xml = "<error type='cancel'>" +
"<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" +
"</error>";
try {
// Create the xml parser
XmlPullParser parser = getParserFromXML(xml);
// Create a packet from the xml
XMPPError error = parseError(parser);
assertNotNull(error);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
public void testMessageAndApplicationDefinedError() {
String xml = "<error type='modify' code='404'>" +
"<undefined-condition xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" +
"<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>" +
"Some special application diagnostic information..." +
"</text>" +
"<special-application-condition xmlns='application-ns'/>" +
"</error>";
try {
// Create the xml parser
XmlPullParser parser = getParserFromXML(xml);
// Create a packet from the xml
XMPPError error = parseError(parser);
String sendingXML = error.toXML();
assertNotNull(error);
assertNotNull(sendingXML);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
/**
* Check the parser with an xml with the 404 error.
*/
public void testCancelWithMessage() {
// Make the XML to test
String xml = "<error type='cancel'>" +
"<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" +
"<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='langcode'>" +
"Some special application diagnostic information!" +
"</text>" +
"</error>";
try {
// Create the xml parser
XmlPullParser parser = getParserFromXML(xml);
// Create a packet from the xml
XMPPError error = parseError(parser);
assertNotNull(error);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
/**
* Check the parser with an xml with the 404 error.
*/
public void testCancelWithMessageAndApplicationError() {
// Make the XML to test
String xml = "<error type='cancel' code='10'>" +
"<conflict xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>" +
"<text xml:lang='en' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>" +
"Some special application diagnostic information!" +
"</text>" +
"<application-defined-error xmlns='application-ns'/>" +
"</error>";
try {
// Create the xml parser
XmlPullParser parser = getParserFromXML(xml);
// Create a packet from the xml
XMPPError error = parseError(parser);
assertNotNull(error);
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
private XMPPError parseError(XmlPullParser parser) throws Exception {
parser.next();
return PacketParserUtils.parseError(parser);
}
private XmlPullParser getParserFromXML(String xml) throws XmlPullParserException {
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
parser.setInput(new StringReader(xml));
return parser;
}
protected int getMaxConnections() {
return 0;
}
}

View file

@ -107,7 +107,7 @@ public final class SmackInitialization {
}
// Add the Java7 compression handler first, since it's preferred
SmackConfiguration.compressionHandlers.add(new Java7ZlibInputOutputStream());
SmackConfiguration.addCompressionHandler(new Java7ZlibInputOutputStream());
XmppCompressionManager.registerXmppCompressionFactory(ZlibXmppCompressionFactory.INSTANCE);

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2013-2018 Florian Schmaus
* Copyright 2013-2020 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -19,8 +19,6 @@ package org.jivesoftware.smack.compression;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.zip.Deflater;
import java.util.zip.DeflaterOutputStream;
import java.util.zip.Inflater;
@ -41,31 +39,15 @@ import java.util.zip.InflaterInputStream;
* @author Florian Schmaus
*/
public class Java7ZlibInputOutputStream extends XMPPInputOutputStream {
private static final Method method;
private static final boolean supported;
private static final int compressionLevel = Deflater.DEFAULT_COMPRESSION;
private static final int SYNC_FLUSH_INT = 2;
private static final int FULL_FLUSH_INT = 3;
static {
Method m = null;
try {
m = Deflater.class.getMethod("deflate", byte[].class, int.class, int.class, int.class);
} catch (SecurityException e) {
} catch (NoSuchMethodException e) {
}
method = m;
supported = method != null;
}
public Java7ZlibInputOutputStream() {
super("zlib");
}
@Override
public boolean isSupported() {
return supported;
return true;
}
@Override
@ -101,29 +83,23 @@ public class Java7ZlibInputOutputStream extends XMPPInputOutputStream {
@Override
public OutputStream getOutputStream(OutputStream outputStream) {
final int flushMethodInt;
if (flushMethod == FlushMethod.SYNC_FLUSH) {
flushMethodInt = SYNC_FLUSH_INT;
} else {
flushMethodInt = FULL_FLUSH_INT;
switch (flushMethod) {
case SYNC_FLUSH:
flushMethodInt = Deflater.SYNC_FLUSH;
break;
case FULL_FLUSH:
flushMethodInt = Deflater.FULL_FLUSH;
break;
default:
throw new AssertionError();
}
return new DeflaterOutputStream(outputStream, new Deflater(compressionLevel)) {
@Override
public void flush() throws IOException {
if (!supported) {
super.flush();
return;
}
try {
int count;
while ((count = (Integer) method.invoke(def, buf, 0, buf.length, flushMethodInt)) != 0) {
out.write(buf, 0, count);
}
} catch (IllegalArgumentException e) {
throw new IOException("Can't flush");
} catch (IllegalAccessException e) {
throw new IOException("Can't flush");
} catch (InvocationTargetException e) {
throw new IOException("Can't flush");
int count;
while ((count = def.deflate(buf, 0, buf.length, flushMethodInt)) > 0) {
out.write(buf, 0, count);
}
super.flush();
}

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2017-2019 Florian Schmaus, 2016-2017 Fernando Ramirez
* Copyright © 2017-2020 Florian Schmaus, 2016-2017 Fernando Ramirez
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -28,12 +28,14 @@ import java.util.WeakHashMap;
import org.jivesoftware.smack.ConnectionCreationListener;
import org.jivesoftware.smack.Manager;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.SmackException.NotLoggedInException;
import org.jivesoftware.smack.StanzaCollector;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPConnectionRegistry;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.filter.IQReplyFilter;
import org.jivesoftware.smack.packet.IQ;
@ -41,10 +43,11 @@ import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smackx.commands.AdHocCommandManager;
import org.jivesoftware.smackx.commands.RemoteCommand;
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.disco.packet.DiscoverItems;
import org.jivesoftware.smackx.forward.packet.Forwarded;
import org.jivesoftware.smackx.mam.MamManager.MamQueryArgs;
import org.jivesoftware.smackx.mam.element.MamElements;
import org.jivesoftware.smackx.mam.element.MamElements.MamResultExtension;
import org.jivesoftware.smackx.mam.element.MamFinIQ;
@ -172,6 +175,8 @@ public final class MamManager extends Manager {
private static final Map<XMPPConnection, Map<Jid, MamManager>> INSTANCES = new WeakHashMap<>();
private static final String ADVANCED_CONFIG_NODE = "urn:xmpp:mam#configure";
/**
* Get a MamManager for the MAM archive of the local entity (the "user") of the given connection.
*
@ -216,10 +221,13 @@ public final class MamManager extends Manager {
private final ServiceDiscoveryManager serviceDiscoveryManager;
private final AdHocCommandManager adHocCommandManager;
private MamManager(XMPPConnection connection, Jid archiveAddress) {
super(connection);
this.archiveAddress = archiveAddress;
serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(connection);
adHocCommandManager = AdHocCommandManager.getAddHocCommandsManager(connection);
}
/**
@ -553,30 +561,6 @@ public final class MamManager extends Manager {
return new MamQueryPage(cancelledResultCollector, mamFinIQ);
}
/**
* MAM query result class.
*
*/
@Deprecated
@SuppressWarnings("UnusedVariable")
public static final class MamQueryResult {
public final List<Forwarded> forwardedMessages;
public final MamFinIQ mamFin;
private final String node;
private final DataForm form;
private MamQueryResult(MamQuery mamQuery) {
this(mamQuery.mamQueryPage.forwardedMessages, mamQuery.mamQueryPage.mamFin, mamQuery.node, mamQuery.form);
}
private MamQueryResult(List<Forwarded> forwardedMessages, MamFinIQ mamFin, String node, DataForm form) {
this.forwardedMessages = forwardedMessages;
this.mamFin = mamFin;
this.node = node;
this.form = form;
}
}
public final class MamQuery {
private final String node;
private final DataForm form;
@ -714,6 +698,25 @@ public final class MamManager extends Manager {
return serviceDiscoveryManager.supportsFeature(archiveAddress, MamElements.NAMESPACE);
}
public boolean isAdvancedConfigurationSupported() throws InterruptedException, XMPPException, SmackException {
DiscoverItems discoverItems = adHocCommandManager.discoverCommands(archiveAddress);
for (DiscoverItems.Item item : discoverItems.getItems()) {
if (item.getNode().equals(ADVANCED_CONFIG_NODE)) {
return true;
}
}
return false;
}
public RemoteCommand getAdvancedConfigurationCommand() throws InterruptedException, XMPPException, SmackException {
DiscoverItems discoverItems = adHocCommandManager.discoverCommands(archiveAddress);
for (DiscoverItems.Item item : discoverItems.getItems()) {
if (item.getNode().equals(ADVANCED_CONFIG_NODE))
return adHocCommandManager.getRemoteCommand(archiveAddress, item.getNode());
}
throw new SmackException.FeatureNotSupportedException(ADVANCED_CONFIG_NODE, archiveAddress);
}
private static DataForm getNewMamForm() {
FormField field = FormField.hiddenFormType(MamElements.NAMESPACE);
DataForm form = new DataForm(DataForm.Type.submit);
@ -766,35 +769,7 @@ public final class MamManager extends Manager {
/**
* Update the preferences in the server.
*
* @param alwaysJids TODO javadoc me please
* is the list of JIDs that should always have messages to/from
* archived in the user's store
* @param neverJids TODO javadoc me please
* is the list of JIDs that should never have messages to/from
* archived in the user's store
* @param defaultBehavior TODO javadoc me please
* can be "roster", "always", "never" (see XEP-0313)
* @return the MAM preferences result
* @throws NoResponseException if there was no response from the remote entity.
* @throws XMPPErrorException if there was an XMPP error returned.
* @throws NotConnectedException if the XMPP connection is not connected.
* @throws InterruptedException if the calling thread was interrupted.
* @throws NotLoggedInException if the XMPP connection is not authenticated.
* @deprecated use {@link #updateArchivingPreferences(MamPrefs)} instead.
*/
@Deprecated
public MamPrefsResult updateArchivingPreferences(List<Jid> alwaysJids, List<Jid> neverJids, DefaultBehavior defaultBehavior)
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException,
NotLoggedInException {
Objects.requireNonNull(defaultBehavior, "Default behavior must be set");
MamPrefsIQ mamPrefIQ = new MamPrefsIQ(alwaysJids, neverJids, defaultBehavior);
return queryMamPrefs(mamPrefIQ);
}
/**
* Update the preferences in the server.
*
* @param mamPrefs TODO javadoc me please
* @param mamPrefs the MAM preferences to set the archive to
* @return the currently active preferences after the operation.
* @throws NoResponseException if there was no response from the remote entity.
* @throws XMPPErrorException if there was an XMPP error returned.

View file

@ -19,6 +19,7 @@ package org.jivesoftware.smackx.attention.packet;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.XmlEnvironment;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jivesoftware.smack.xml.XmlPullParser;
/**
@ -69,11 +70,8 @@ public class AttentionExtension implements ExtensionElement {
* @see org.jivesoftware.smack.packet.PacketExtension#toXML()
*/
@Override
public String toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
final StringBuilder sb = new StringBuilder();
sb.append('<').append(getElementName()).append(" xmlns=\"").append(
getNamespace()).append("\"/>");
return sb.toString();
public XmlStringBuilder toXML(org.jivesoftware.smack.packet.XmlEnvironment enclosingNamespace) {
return new XmlStringBuilder(this).closeEmptyElement();
}
/**

View file

@ -161,11 +161,16 @@ public final class UserTuneElement implements ExtensionElement {
/**
* This class defines a Builder class for {@link UserTuneElement}. <br>
* {@link UserTuneElement} instance can be obtained using the {@link #build()} method as follows. <br>
* UserTuneElement.Builder builder = new UserTuneElement.Builder();
* builder.setSource("Yessongs"); builder.setTitle("Heart of the Sunrise");
* UserTuneElement userTuneElement = builder.build(); <br>
* Values such as title, source, artist, length, source, track and uri can be set using their respective setters through {@link Builder}
* {@link UserTuneElement} instance can be obtained using the {@link #build()} method as follows. <br><br>
* <pre>
* {@code
* UserTuneElement.Builder builder = UserTuneElement.getBuilder();
* builder.setSource("Yessongs");
* builder.setTitle("Heart of the Sunrise");
* UserTuneElement userTuneElement = builder.build();
* }
* </pre>
* Values such as title, source, artist, length, source, track and uri can be set using their respective setters through {@link Builder}.
*/
public static final class Builder {
private String artist;

View file

@ -0,0 +1,38 @@
/**
*
* Copyright 2020 Paul Schaub
*
* 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.attention;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import org.jivesoftware.smackx.attention.packet.AttentionExtension;
import org.junit.Test;
public class AttentionElementTest {
/**
* Serialized Attention element.
* @see <a href="https://xmpp.org/extensions/xep-0224.html#example-2">XEP-0224: Attention - Example 2</a>
*/
private static final String XML = "<attention xmlns='urn:xmpp:attention:0'/>";
@Test
public void serializationTest() {
AttentionExtension extension = new AttentionExtension();
assertXmlSimilar(XML, extension.toXML());
}
}

View file

@ -0,0 +1,83 @@
/**
*
* Copyright 2020 Paul Schaub
*
* 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.nick;
import static org.jivesoftware.smack.test.util.XmlUnitUtils.assertXmlSimilar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import java.io.IOException;
import org.jivesoftware.smack.parsing.SmackParsingException;
import org.jivesoftware.smack.test.util.SmackTestUtil;
import org.jivesoftware.smack.xml.XmlPullParserException;
import org.jivesoftware.smackx.nick.packet.Nick;
import org.jivesoftware.smackx.nick.provider.NickProvider;
import org.junit.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
public class NickTest {
/**
* see <a href="https://xmpp.org/extensions/xep-0172.html#example-3">XEP-0172: User Nickname - Example 3</a>
*/
private static final String XML = "<nick xmlns='http://jabber.org/protocol/nick'>Ishmael</nick>";
@Test
public void disallowEmptyNickTest() {
assertThrows("Empty String as argument MUST cause IllegalArgumentException.",
IllegalArgumentException.class, () -> new Nick(""));
}
@Test
public void disallowNullNickTest() {
assertThrows("Null argument MUST cause IllegalArgumentException.",
IllegalArgumentException.class, () -> new Nick(null));
}
@Test
public void serializationTest() {
Nick nick = new Nick("Ishmael");
assertXmlSimilar(XML, nick.toXML());
}
@ParameterizedTest
@EnumSource(SmackTestUtil.XmlPullParserKind.class)
public void deserializationTest(SmackTestUtil.XmlPullParserKind parserKind)
throws XmlPullParserException, IOException, SmackParsingException {
Nick nick = SmackTestUtil.parse(XML, NickProvider.class, parserKind);
assertNotNull(nick);
assertEquals("Ishmael", nick.getName());
}
@Test
public void nicksAreEscapedTest() {
String name = "</nick>\"'&";
Nick nick = new Nick(name);
assertXmlSimilar("<nick xmlns='http://jabber.org/protocol/nick'>" +
"&lt;/nick&gt;&quot;&apos;&amp;" +
"</nick>", nick.toXML());
assertEquals(name, nick.getName());
}
}

View file

@ -14,23 +14,25 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smack.tcp;
package org.jivesoftware.smack.c2s;
import java.io.IOException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.igniterealtime.smack.inttest.AbstractSmackSpecificLowLevelIntegrationTest;
import org.igniterealtime.smack.inttest.SmackIntegrationTest;
import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment;
public class XmppNioTcpConnectionLowLevelIntegrationTest extends AbstractSmackSpecificLowLevelIntegrationTest<ModularXmppClientToServerConnection> {
public class ModularXmppClientToServerConnectionLowLevelIntegrationTest extends AbstractSmackSpecificLowLevelIntegrationTest<ModularXmppClientToServerConnection> {
public XmppNioTcpConnectionLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment) {
public ModularXmppClientToServerConnectionLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment) {
super(environment, ModularXmppClientToServerConnection.class);
}
@ -44,4 +46,11 @@ public class XmppNioTcpConnectionLowLevelIntegrationTest extends AbstractSmackSp
connection.disconnect();
}
@SmackIntegrationTest
public void testDisconnectNeverConnected()
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
ModularXmppClientToServerConnection connection = getSpecificUnconnectedConnection();
connection.disconnect();
}
}

View file

@ -0,0 +1 @@
../../../../../../../../smack-core/src/main/java/org/jivesoftware/smack/c2s/package-info.java

View file

@ -16,4 +16,214 @@
<className>org.jivesoftware.smackx.xroster.provider.RosterExchangeProvider</className>
</extensionProvider>
<!-- XEP-0142: Workgroup Queues -->
<iqProvider>
<elementName>offer</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OfferRequestProvider</className>
</iqProvider>
<iqProvider>
<elementName>offer-revoke</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OfferRevokeProvider</className>
</iqProvider>
<iqProvider>
<elementName>agent-status-request</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentStatusRequest$Provider</className>
</iqProvider>
<iqProvider>
<elementName>transcripts</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptsProvider</className>
</iqProvider>
<iqProvider>
<elementName>transcript</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroups</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups$Provider</className>
</iqProvider>
<iqProvider>
<elementName>agent-info</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentInfo$Provider</className>
</iqProvider>
<iqProvider>
<elementName>transcript-search</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptSearch$Provider</className>
</iqProvider>
<iqProvider>
<elementName>occupants-info</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OccupantsInfo$Provider</className>
</iqProvider>
<iqProvider>
<elementName>chat-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.ChatSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>chat-notes</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes$Provider</className>
</iqProvider>
<iqProvider>
<elementName>chat-sessions</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.history.AgentChatHistory$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>offline-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.OfflineSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>sound-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.SoundSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroup-properties</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.WorkgroupProperties$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>search-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.SearchSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroup-form</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>macros</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.macros.Macros$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>chat-metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata$Provider</className>
</iqProvider>
<!--
org.jivesoftware.smackx.workgroup.site is missing ...
<iqProvider>
<elementName>site-user</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteUser$Provider</className>
</iqProvider>
<iqProvider>
<elementName>site-invite</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteInvitation$Provider</className>
</iqProvider>
<iqProvider>
<elementName>site-user-history</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteUserHistory$Provider</className>
</iqProvider>
-->
<iqProvider>
<elementName>generic-metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.GenericSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>monitor</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.MonitorPacket$InternalProvider</className>
</iqProvider>
<!-- Packet Extension Providers -->
<extensionProvider>
<elementName>queue-status</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueUpdate$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>workgroup</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.WorkgroupInformation$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.MetaDataProvider</className>
</extensionProvider>
<extensionProvider>
<elementName>session</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.SessionID$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>user</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.UserID$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>agent-status</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentStatus$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>notify-queue-details</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueDetails$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>notify-queue</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueOverview$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>invite</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.RoomInvitation$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>transfer</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.RoomTransfer$Provider</className>
</extensionProvider>
</smackProviders>

View file

@ -1,215 +0,0 @@
<?xml version="1.0"?>
<!-- Providers for workgroup extensions -->
<smackProviders>
<!-- XEP-0142: Workgroup Queues -->
<iqProvider>
<elementName>offer</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OfferRequestProvider</className>
</iqProvider>
<iqProvider>
<elementName>offer-revoke</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OfferRevokeProvider</className>
</iqProvider>
<iqProvider>
<elementName>agent-status-request</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentStatusRequest$Provider</className>
</iqProvider>
<iqProvider>
<elementName>transcripts</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptsProvider</className>
</iqProvider>
<iqProvider>
<elementName>transcript</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroups</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentWorkgroups$Provider</className>
</iqProvider>
<iqProvider>
<elementName>agent-info</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentInfo$Provider</className>
</iqProvider>
<iqProvider>
<elementName>transcript-search</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.TranscriptSearch$Provider</className>
</iqProvider>
<iqProvider>
<elementName>occupants-info</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.OccupantsInfo$Provider</className>
</iqProvider>
<iqProvider>
<elementName>chat-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.ChatSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>chat-notes</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.notes.ChatNotes$Provider</className>
</iqProvider>
<iqProvider>
<elementName>chat-sessions</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.history.AgentChatHistory$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>offline-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.OfflineSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>sound-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.SoundSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroup-properties</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.WorkgroupProperties$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>search-settings</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.SearchSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>workgroup-form</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.forms.WorkgroupForm$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>macros</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.macros.Macros$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>chat-metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.ext.history.ChatMetadata$Provider</className>
</iqProvider>
<!--
org.jivesoftware.smackx.workgroup.site is missing ...
<iqProvider>
<elementName>site-user</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteUser$Provider</className>
</iqProvider>
<iqProvider>
<elementName>site-invite</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteInvitation$Provider</className>
</iqProvider>
<iqProvider>
<elementName>site-user-history</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.site.SiteUserHistory$Provider</className>
</iqProvider>
-->
<iqProvider>
<elementName>generic-metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.settings.GenericSettings$InternalProvider</className>
</iqProvider>
<iqProvider>
<elementName>monitor</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.MonitorPacket$InternalProvider</className>
</iqProvider>
<!-- Packet Extension Providers -->
<extensionProvider>
<elementName>queue-status</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueUpdate$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>workgroup</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.WorkgroupInformation$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>metadata</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.MetaDataProvider</className>
</extensionProvider>
<extensionProvider>
<elementName>session</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.SessionID$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>user</elementName>
<namespace>http://jivesoftware.com/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.UserID$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>agent-status</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.AgentStatus$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>notify-queue-details</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueDetails$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>notify-queue</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.QueueOverview$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>invite</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.RoomInvitation$Provider</className>
</extensionProvider>
<extensionProvider>
<elementName>transfer</elementName>
<namespace>http://jabber.org/protocol/workgroup</namespace>
<className>org.jivesoftware.smackx.workgroup.packet.RoomTransfer$Provider</className>
</extensionProvider>
</smackProviders>