use of org.jivesoftware.smackx.jingle.element.Jingle in project Smack by igniterealtime.
the class JingleS5BTransportManager method createCandidateUsed.
public Jingle createCandidateUsed(FullJid recipient, FullJid initiator, String sessionId, JingleContent.Senders contentSenders, JingleContent.Creator contentCreator, String contentName, String streamId, String candidateId) {
Jingle.Builder jb = Jingle.builder(connection());
jb.setSessionId(sessionId).setInitiator(initiator).setAction(JingleAction.transport_info);
JingleContent.Builder cb = JingleContent.getBuilder();
cb.setName(contentName).setCreator(contentCreator).setSenders(contentSenders);
JingleS5BTransport.Builder tb = JingleS5BTransport.getBuilder();
tb.setCandidateUsed(candidateId).setStreamId(streamId);
Jingle jingle = jb.addJingleContent(cb.setTransport(tb.build()).build()).build();
jingle.setFrom(getConnection().getUser().asFullJidOrThrow());
jingle.setTo(recipient);
return jingle;
}
use of org.jivesoftware.smackx.jingle.element.Jingle in project Smack by igniterealtime.
the class JingleUtil method createSessionTerminateContentCancel.
public Jingle createSessionTerminateContentCancel(FullJid recipient, String sessionId, JingleContent.Creator contentCreator, String contentName) {
Jingle.Builder jb = Jingle.builder(connection);
jb.setAction(JingleAction.session_terminate).setSessionId(sessionId);
JingleContent.Builder cb = JingleContent.getBuilder();
cb.setCreator(contentCreator).setName(contentName);
Jingle jingle = jb.addJingleContent(cb.build()).build();
jingle.setFrom(connection.getUser());
jingle.setTo(recipient);
return jingle;
}
use of org.jivesoftware.smackx.jingle.element.Jingle in project Smack by igniterealtime.
the class JingleUtil method createSessionTerminate.
public Jingle createSessionTerminate(FullJid recipient, String sessionId, JingleReason reason) {
Jingle.Builder jb = Jingle.builder(connection);
jb.setAction(JingleAction.session_terminate).setSessionId(sessionId).setReason(reason);
Jingle jingle = jb.build();
jingle.setFrom(connection.getUser());
jingle.setTo(recipient);
return jingle;
}
use of org.jivesoftware.smackx.jingle.element.Jingle in project Smack by igniterealtime.
the class JingleUtil method createSessionPing.
public Jingle createSessionPing(FullJid recipient, String sessionId) {
Jingle.Builder jb = Jingle.builder(connection);
jb.setSessionId(sessionId).setAction(JingleAction.session_info);
Jingle jingle = jb.build();
jingle.setFrom(connection.getUser());
jingle.setTo(recipient);
return jingle;
}
Aggregations