Enable Jingle to provide audio and video call with XMPP.

cusax-fix
Sebastien Vincent 15 years ago
parent d82a4be4b0
commit 02f25e55c0

@ -749,11 +749,6 @@
<!--sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION" <!--sysproperty key="net.java.sip.communicator.SC_HOME_DIR_LOCATION"
value="${user.home}/schome"/--> value="${user.home}/schome"/-->
<!-- this is a temporary option that would need to disappear once
we finalize jingle -->
<sysproperty key="enableJingle"
value="${enableJingle}"/>
<sysproperty key="smack.debugEnabled" <sysproperty key="smack.debugEnabled"
value="${smack.debugEnabled}"/> value="${smack.debugEnabled}"/>
<!--sysproperty key="smack.debuggerClass" <!--sysproperty key="smack.debuggerClass"

@ -28,6 +28,11 @@ public class TransferActiveCallsMenu
extends JPopupMenu extends JPopupMenu
implements Skinnable implements Skinnable
{ {
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/** /**
* The invoker component. * The invoker component.
*/ */
@ -173,8 +178,21 @@ private class CallPeerMenuItem
extends JMenuItem extends JMenuItem
implements Skinnable implements Skinnable
{ {
/**
* Serial version UID.
*/
private static final long serialVersionUID = 0L;
/**
* The <tt>CallPeer</tt> of this instance.
*/
private final CallPeer callPeer; private final CallPeer callPeer;
/**
* Constructor.
*
* @param peer the <tt>CallPeer</tt>
*/
public CallPeerMenuItem(CallPeer peer) public CallPeerMenuItem(CallPeer peer)
{ {
this.callPeer = peer; this.callPeer = peer;
@ -183,6 +201,11 @@ public CallPeerMenuItem(CallPeer peer)
loadSkin(); loadSkin();
} }
/**
* Get the <tt>CallPeer</tt> of this instance.
*
* @return <tt>CallPeer</tt>
*/
public CallPeer getCallPeer() public CallPeer getCallPeer()
{ {
return callPeer; return callPeer;

@ -353,7 +353,7 @@ public synchronized void answer()
* and set the new state to DISCONNECTED. * and set the new state to DISCONNECTED.
* *
* @param reasonText the text, if any, to be set on the * @param reasonText the text, if any, to be set on the
* <tt>ReasonPacketExtension</tt> as the value of its * <tt>ReasonPacketExtension</tt> as the value of its
* @param reasonOtherExtension the <tt>PacketExtension</tt>, if any, to be * @param reasonOtherExtension the <tt>PacketExtension</tt>, if any, to be
* set on the <tt>ReasonPacketExtension</tt> as the value of its * set on the <tt>ReasonPacketExtension</tt> as the value of its
* <tt>otherExtension</tt> property * <tt>otherExtension</tt> property
@ -983,7 +983,7 @@ public void processTransportInfo(JingleIQ jingleIQ)
* peer to the remote peer using the <tt>transport-info</tt> * peer to the remote peer using the <tt>transport-info</tt>
* {@link JingleIQ} * {@link JingleIQ}
*/ */
void sendTransportInfo(Iterable<ContentPacketExtension> contents) protected void sendTransportInfo(Iterable<ContentPacketExtension> contents)
{ {
JingleIQ transportInfo = new JingleIQ(); JingleIQ transportInfo = new JingleIQ();
@ -1013,7 +1013,7 @@ void sendTransportInfo(Iterable<ContentPacketExtension> contents)
* in the case of unattended transfer * in the case of unattended transfer
* @throws OperationFailedException if something goes wrong * @throws OperationFailedException if something goes wrong
*/ */
void transfer(String to, String sid) protected void transfer(String to, String sid)
throws OperationFailedException throws OperationFailedException
{ {
JingleIQ transferSessionInfo = new JingleIQ(); JingleIQ transferSessionInfo = new JingleIQ();

@ -1093,74 +1093,69 @@ protected void initialize(String screenname,
new InputEvtIQProvider()); new InputEvtIQProvider());
//initialize the telephony operation set //initialize the telephony operation set
//until we actually finish jingle, we'll have a clumsy way of OperationSetBasicTelephonyJabberImpl basicTelephony
//enabling it through a system property.
if(Boolean.getBoolean("enableJingle"))
{
OperationSetBasicTelephonyJabberImpl basicTelephony
= new OperationSetBasicTelephonyJabberImpl(this); = new OperationSetBasicTelephonyJabberImpl(this);
addSupportedOperationSet( addSupportedOperationSet(
OperationSetAdvancedTelephony.class, OperationSetAdvancedTelephony.class,
basicTelephony); basicTelephony);
addSupportedOperationSet( addSupportedOperationSet(
OperationSetBasicTelephony.class, OperationSetBasicTelephony.class,
basicTelephony); basicTelephony);
addSupportedOperationSet( addSupportedOperationSet(
OperationSetSecureTelephony.class, OperationSetSecureTelephony.class,
basicTelephony); basicTelephony);
// initialize video telephony OperationSet // initialize video telephony OperationSet
addSupportedOperationSet( addSupportedOperationSet(
OperationSetVideoTelephony.class, OperationSetVideoTelephony.class,
new OperationSetVideoTelephonyJabberImpl(basicTelephony)); new OperationSetVideoTelephonyJabberImpl(basicTelephony));
// TODO: Uncomment the following lines when the desktop sharing feature is ready // TODO: Uncomment the following lines when the desktop sharing feature is ready
// to use. // to use.
// initialize desktop streaming OperationSet // initialize desktop streaming OperationSet
// addSupportedOperationSet( // addSupportedOperationSet(
// OperationSetDesktopStreaming.class, // OperationSetDesktopStreaming.class,
// new OperationSetDesktopStreamingJabberImpl(basicTelephony)); // new OperationSetDesktopStreamingJabberImpl(basicTelephony));
// initialize desktop sharing OperationSets // initialize desktop sharing OperationSets
// addSupportedOperationSet( // addSupportedOperationSet(
// OperationSetDesktopSharingServer.class, // OperationSetDesktopSharingServer.class,
// new OperationSetDesktopSharingServerJabberImpl( // new OperationSetDesktopSharingServerJabberImpl(
// basicTelephony)); // basicTelephony));
// addSupportedOperationSet( // addSupportedOperationSet(
// OperationSetDesktopSharingClient.class, // OperationSetDesktopSharingClient.class,
// new OperationSetDesktopSharingClientJabberImpl(this)); // new OperationSetDesktopSharingClientJabberImpl(this));
addSupportedOperationSet(
OperationSetTelephonyConferencing.class,
new OperationSetTelephonyConferencingJabberImpl(this));
// Add Jingle features to supported features.
supportedFeatures.add(URN_XMPP_JINGLE);
supportedFeatures.add(URN_XMPP_JINGLE_RTP);
supportedFeatures.add(URN_XMPP_JINGLE_RAW_UDP_0);
/* addSupportedOperationSet(
* Reflect the preference of the user with respect to the use of OperationSetTelephonyConferencing.class,
* ICE. new OperationSetTelephonyConferencingJabberImpl(this));
*/
if (accountID.getAccountPropertyBoolean( // Add Jingle features to supported features.
ProtocolProviderFactory.IS_USE_ICE, supportedFeatures.add(URN_XMPP_JINGLE);
false)) supportedFeatures.add(URN_XMPP_JINGLE_RTP);
{ supportedFeatures.add(URN_XMPP_JINGLE_RAW_UDP_0);
supportedFeatures.add(URN_XMPP_JINGLE_ICE_UDP_1);
} /*
* Reflect the preference of the user with respect to the use of
* ICE.
*/
if (accountID.getAccountPropertyBoolean(
ProtocolProviderFactory.IS_USE_ICE,
false))
{
supportedFeatures.add(URN_XMPP_JINGLE_ICE_UDP_1);
}
supportedFeatures.add(URN_XMPP_JINGLE_RTP_AUDIO); supportedFeatures.add(URN_XMPP_JINGLE_RTP_AUDIO);
supportedFeatures.add(URN_XMPP_JINGLE_RTP_VIDEO); supportedFeatures.add(URN_XMPP_JINGLE_RTP_VIDEO);
supportedFeatures.add(URN_XMPP_JINGLE_RTP_ZRTP); supportedFeatures.add(URN_XMPP_JINGLE_RTP_ZRTP);
/* add extension to support remote control */ /* add extension to support remote control */
supportedFeatures.add(InputEvtIQ.NAMESPACE); supportedFeatures.add(InputEvtIQ.NAMESPACE);
// XEP-0251: Jingle Session Transfer // XEP-0251: Jingle Session Transfer
supportedFeatures.add(URN_XMPP_JINGLE_TRANSFER_0); supportedFeatures.add(URN_XMPP_JINGLE_TRANSFER_0);
}
// OperationSetContactCapabilities // OperationSetContactCapabilities
opsetContactCapabilities opsetContactCapabilities

@ -131,7 +131,6 @@ public enum JingleAction
*/ */
TRANSPORT_ACCEPT("transport-accept"), TRANSPORT_ACCEPT("transport-accept"),
/** /**
* The <tt>transport-info</tt> action is used to exchange transport * The <tt>transport-info</tt> action is used to exchange transport
* candidates; it is mainly used in Jingle ICE-UDP but might be used in * candidates; it is mainly used in Jingle ICE-UDP but might be used in

Loading…
Cancel
Save