1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-12 10:39:38 +02:00
This commit is contained in:
vanitasvitae 2017-06-12 14:44:00 +02:00
parent d4deaa2517
commit 4feda2ffa9
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
9 changed files with 188 additions and 68 deletions

View file

@ -37,7 +37,7 @@ public class Socks5BytestreamSession implements BytestreamSession {
/* flag to indicate if this session is a direct or mediated connection */
private final boolean isDirect;
protected Socks5BytestreamSession(Socket socket, boolean isDirect) {
public Socks5BytestreamSession(Socket socket, boolean isDirect) {
this.socket = socket;
this.isDirect = isDirect;
}

View file

@ -26,4 +26,8 @@ public interface JingleSessionHandler {
XMPPConnection getConnection();
void addTransportInfoListener(JingleTransportInfoListener listener);
void removeTransportInfoListener(JingleTransportInfoListener listener);
}

View file

@ -23,14 +23,19 @@ import org.jivesoftware.smackx.jingle.element.JingleContentTransport;
/**
* Handler for JingleTransports.
*/
public interface JingleTransportHandler<D extends JingleContentTransport> {
public interface JingleTransportHandler<D extends JingleContentTransport> extends JingleTransportInfoListener {
void prepareOutgoingSession(JingleManager.FullJidAndSessionId fullJidAndSessionId,
JingleContent content);
void establishOutgoingSession(JingleManager.FullJidAndSessionId fullJidAndSessionId,
JingleContent content,
JingleContent receivedContent,
JingleContent proposedContent,
JingleTransportEstablishedCallback callback);
void establishIncomingSession(JingleManager.FullJidAndSessionId fullJidAndSessionId,
JingleContent content,
JingleContent receivedContent,
JingleContent proposedContent,
JingleTransportEstablishedCallback callback);
XMPPConnection getConnection();

View file

@ -0,0 +1,27 @@
/**
*
* Copyright © 2017 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.jingle;
import org.jivesoftware.smackx.jingle.element.Jingle;
/**
* Listener for transport-info Jingle stanzas.
*/
public interface JingleTransportInfoListener {
void onTransportInfoReceived(Jingle transportInfo);
}