mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-12 10:39:38 +02:00
Some work on Jingle File Transfer
This commit is contained in:
parent
438fc0e94b
commit
c0e5fcf737
10 changed files with 166 additions and 43 deletions
|
@ -1,7 +1,38 @@
|
|||
package org.jivesoftware.smackx.jft.internal;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamSession;
|
||||
|
||||
/**
|
||||
* Created by vanitas on 22.07.17.
|
||||
*/
|
||||
public class JingleFileOffer extends JingleFileTransfer {
|
||||
|
||||
private static final Logger LOGGER = Logger.getLogger(JingleFileOffer.class.getName());
|
||||
|
||||
private File file;
|
||||
|
||||
public JingleFileOffer(File file) {
|
||||
super();
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTransportReady(BytestreamSession bytestreamSession) {
|
||||
OutputStream outputStream;
|
||||
|
||||
try {
|
||||
outputStream = bytestreamSession.getOutputStream();
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE, "Error retrieving outputStream: " + e, e);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
package org.jivesoftware.smackx.jft.internal;
|
||||
|
||||
import org.jivesoftware.smackx.bytestreams.BytestreamSession;
|
||||
|
||||
/**
|
||||
* Created by vanitas on 22.07.17.
|
||||
*/
|
||||
public class JingleFileRequest extends JingleFileTransfer {
|
||||
|
||||
@Override
|
||||
public void onTransportReady(BytestreamSession bytestreamSession) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
package org.jivesoftware.smackx.jingle_filetransfer;
|
||||
|
||||
import org.jivesoftware.smack.XMPPConnection;
|
||||
import org.jivesoftware.smackx.jingle.JingleManager;
|
||||
import org.jivesoftware.smackx.jingle.Role;
|
||||
import org.jivesoftware.smackx.jingle.element.JingleElement;
|
||||
|
||||
import org.jxmpp.jid.FullJid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue