Search in sources :

Example 16 with JinglePacket

use of eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket in project Conversations by siacs.

the class JingleConnection method sendCancel.

private void sendCancel() {
    JinglePacket packet = bootstrapPacket("session-terminate");
    Reason reason = new Reason();
    reason.addChild("cancel");
    packet.setReason(reason);
    this.sendJinglePacket(packet);
}
Also used : JinglePacket(eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket) Reason(eu.siacs.conversations.xmpp.jingle.stanzas.Reason)

Example 17 with JinglePacket

use of eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket in project Conversations by siacs.

the class JingleConnection method sendCandidateError.

private void sendCandidateError() {
    JinglePacket packet = bootstrapPacket("transport-info");
    Content content = new Content(this.contentCreator, this.contentName);
    content.setTransportId(this.transportId);
    content.socks5transport().addChild("candidate-error");
    packet.setContent(content);
    this.sentCandidate = true;
    if ((receivedCandidate) && (mJingleStatus == JINGLE_STATUS_ACCEPTED)) {
        connect();
    }
    this.sendJinglePacket(packet);
}
Also used : JinglePacket(eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket) Content(eu.siacs.conversations.xmpp.jingle.stanzas.Content)

Example 18 with JinglePacket

use of eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket in project Conversations by siacs.

the class JingleConnection method sendFallbackToIbb.

private void sendFallbackToIbb() {
    Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": sending fallback to ibb");
    JinglePacket packet = this.bootstrapPacket("transport-replace");
    Content content = new Content(this.contentCreator, this.contentName);
    this.transportId = this.mJingleConnectionManager.nextRandomId();
    content.setTransportId(this.transportId);
    content.ibbTransport().setAttribute("block-size", Integer.toString(this.ibbBlockSize));
    packet.setContent(content);
    this.sendJinglePacket(packet);
}
Also used : JinglePacket(eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket) Content(eu.siacs.conversations.xmpp.jingle.stanzas.Content)

Example 19 with JinglePacket

use of eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket in project Conversations by siacs.

the class JingleFileTransferConnection method sendProxyActivated.

private void sendProxyActivated(String cid) {
    final JinglePacket packet = bootstrapPacket(JinglePacket.Action.TRANSPORT_INFO);
    final Content content = new Content(this.contentCreator, this.contentName);
    content.setSenders(this.contentSenders);
    content.setTransport(new S5BTransportInfo(this.transportId, new Element("activated").setAttribute("cid", cid)));
    packet.addJingleContent(content);
    this.sendJinglePacket(packet);
}
Also used : JinglePacket(eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket) Content(eu.siacs.conversations.xmpp.jingle.stanzas.Content) Element(eu.siacs.conversations.xml.Element) S5BTransportInfo(eu.siacs.conversations.xmpp.jingle.stanzas.S5BTransportInfo)

Example 20 with JinglePacket

use of eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket in project Conversations by siacs.

the class JingleFileTransferConnection method bootstrapPacket.

private JinglePacket bootstrapPacket(JinglePacket.Action action) {
    final JinglePacket packet = new JinglePacket(action, this.id.sessionId);
    packet.setTo(id.with);
    return packet;
}
Also used : JinglePacket(eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket)

Aggregations

JinglePacket (eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket)30 Content (eu.siacs.conversations.xmpp.jingle.stanzas.Content)18 Element (eu.siacs.conversations.xml.Element)7 S5BTransportInfo (eu.siacs.conversations.xmpp.jingle.stanzas.S5BTransportInfo)6 IbbTransportInfo (eu.siacs.conversations.xmpp.jingle.stanzas.IbbTransportInfo)4 IqPacket (eu.siacs.conversations.xmpp.stanzas.IqPacket)3 CryptoFailedException (eu.siacs.conversations.crypto.axolotl.CryptoFailedException)2 Account (eu.siacs.conversations.entities.Account)2 OnIqPacketReceived (eu.siacs.conversations.xmpp.OnIqPacketReceived)2 Reason (eu.siacs.conversations.xmpp.jingle.stanzas.Reason)2 FileNotFoundException (java.io.FileNotFoundException)2 ExecutionException (java.util.concurrent.ExecutionException)2 ImmutableMap (com.google.common.collect.ImmutableMap)1 Conversation (eu.siacs.conversations.entities.Conversation)1 Jid (eu.siacs.conversations.xmpp.Jid)1 FileInputStream (java.io.FileInputStream)1 InputStream (java.io.InputStream)1 Map (java.util.Map)1