mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Send/recv works
This commit is contained in:
parent
598c193408
commit
491db53f89
9 changed files with 173 additions and 41 deletions
|
@ -19,6 +19,7 @@ package org.jivesoftware.smackx.jingle;
|
|||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.Manager;
|
||||
|
@ -31,6 +32,7 @@ import org.jivesoftware.smackx.jingle.element.Jingle;
|
|||
import org.jivesoftware.smackx.jingle.element.JingleAction;
|
||||
import org.jivesoftware.smackx.jingle.element.JingleContent;
|
||||
import org.jivesoftware.smackx.jingle.element.JingleContentDescription;
|
||||
import org.jivesoftware.smackx.jingle_ibb.JingleInBandByteStreamManager;
|
||||
import org.jxmpp.jid.FullJid;
|
||||
import org.jxmpp.jid.Jid;
|
||||
|
||||
|
@ -60,6 +62,7 @@ public final class JingleManager extends Manager {
|
|||
new AbstractIqRequestHandler(Jingle.ELEMENT, Jingle.NAMESPACE, Type.set, Mode.async) {
|
||||
@Override
|
||||
public IQ handleIQRequest(IQ iqRequest) {
|
||||
LOGGER.log(Level.INFO, "handleIQRequest");
|
||||
final Jingle jingle = (Jingle) iqRequest;
|
||||
|
||||
if (jingle.getAction() != JingleAction.session_initiate) {
|
||||
|
@ -92,6 +95,7 @@ public final class JingleManager extends Manager {
|
|||
return jingleDescriptionHandler.handleJingleRequest(jingle);
|
||||
}
|
||||
});
|
||||
JingleInBandByteStreamManager.getInstanceFor(connection);
|
||||
}
|
||||
|
||||
public JingleHandler registerDescriptionHandler(String namespace, JingleHandler handler) {
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle.element;
|
||||
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smack.packet.ExtensionElement;
|
||||
import org.jivesoftware.smack.util.XmlStringBuilder;
|
||||
|
||||
/**
|
||||
* Jingle content description.
|
||||
*
|
||||
|
|
|
@ -16,14 +16,15 @@
|
|||
*/
|
||||
package org.jivesoftware.smackx.jingle_ibb;
|
||||
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import org.jivesoftware.smack.Manager;
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.jingle.provider.JingleContentProviderManager;
|
||||
import org.jivesoftware.smackx.jingle_ibb.provider.JingleInBandByteStreamTransportProvider;
|
||||
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
/**
|
||||
* Manager for Jingle In-Band-ByteStreams.
|
||||
*/
|
||||
|
@ -36,6 +37,7 @@ public final class JingleInBandByteStreamManager extends Manager {
|
|||
private JingleInBandByteStreamManager(XMPPConnection connection) {
|
||||
super(connection);
|
||||
JingleContentProviderManager.addJingleContentTransportProvider(NAMESPACE_V1, new JingleInBandByteStreamTransportProvider());
|
||||
ServiceDiscoveryManager.getInstanceFor(connection).addFeature(NAMESPACE_V1);
|
||||
}
|
||||
|
||||
public static JingleInBandByteStreamManager getInstanceFor(XMPPConnection connection) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue