mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-27 14:32:06 +01:00
Typo
This commit is contained in:
parent
eda7859aa7
commit
38f54b140c
2 changed files with 26 additions and 22 deletions
|
@ -61,13 +61,25 @@ public class InitiatorOutgoingFileTransferInitiated implements JingleSessionHand
|
||||||
|
|
||||||
switch (jingle.getAction()) {
|
switch (jingle.getAction()) {
|
||||||
case session_accept:
|
case session_accept:
|
||||||
|
startTransfer(bm, jingle);
|
||||||
|
break;
|
||||||
|
case session_terminate:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
return IQ.createResultIQ(jingle);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startTransfer(AbstractJingleTransportManager<?> transportManager, Jingle jingle) {
|
||||||
BytestreamSession session;
|
BytestreamSession session;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
session = bm.outgoingInitiatedSession(jingle);
|
session = transportManager.outgoingInitiatedSession(jingle);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
//TODO
|
//TODO
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
HashElement fileHash;
|
HashElement fileHash;
|
||||||
|
@ -79,15 +91,7 @@ public class InitiatorOutgoingFileTransferInitiated implements JingleSessionHand
|
||||||
session.close();
|
session.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
//TODO:
|
//TODO:
|
||||||
return null;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
case session_terminate:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
|
|
||||||
}
|
|
||||||
return IQ.createResultIQ(jingle);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -140,7 +140,7 @@ public final class JingleS5BTransportManager extends AbstractJingleTransportMana
|
||||||
public Jingle createSessionAccept(Jingle request)
|
public Jingle createSessionAccept(Jingle request)
|
||||||
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException {
|
throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException {
|
||||||
JingleContent receivedContent = request.getContents().get(0);
|
JingleContent receivedContent = request.getContents().get(0);
|
||||||
JingleS5BTransport receviedTransport = (JingleS5BTransport) receivedContent.getJingleTransports().get(0);
|
JingleS5BTransport receivedTransport = (JingleS5BTransport) receivedContent.getJingleTransports().get(0);
|
||||||
Jingle.Builder jb = Jingle.getBuilder();
|
Jingle.Builder jb = Jingle.getBuilder();
|
||||||
jb.setResponder(connection().getUser())
|
jb.setResponder(connection().getUser())
|
||||||
.setAction(JingleAction.session_accept)
|
.setAction(JingleAction.session_accept)
|
||||||
|
@ -151,7 +151,7 @@ public final class JingleS5BTransportManager extends AbstractJingleTransportMana
|
||||||
.setCreator(receivedContent.getCreator())
|
.setCreator(receivedContent.getCreator())
|
||||||
.setName(receivedContent.getName())
|
.setName(receivedContent.getName())
|
||||||
.setDescription(receivedContent.getDescription())
|
.setDescription(receivedContent.getDescription())
|
||||||
.addTransport(createJingleContentTransport(request.getInitiator(), receviedTransport));
|
.addTransport(createJingleContentTransport(request.getInitiator(), receivedTransport));
|
||||||
jb.addJingleContent(cb.build());
|
jb.addJingleContent(cb.build());
|
||||||
|
|
||||||
Jingle jingle = jb.build();
|
Jingle jingle = jb.build();
|
||||||
|
|
Loading…
Reference in a new issue