src/net/java/sip/communicator/impl/protocol/jabber/OperationSetDesktopSharingServerJabberImpl.java
/**
     * Sends IQ InputEvent START or STOP in order to enable/disable the remote
     * peer to remotely control our PC.
     *
     * @param cp call peer that will stop controlling on local computer.
     * @param enables True to enable remote peer to gain remote control on our
     * PC. False Otherwise.
     */
Sends IQ InputEvent START or STOP in order to enable/disable the remote
peer to remotely control our PC.

@param cp call peer that will stop controlling on local computer.
@param enables True to enable remote peer to gain remote control on our
PC. False Otherwise.
Sends IQ InputEvent START or STOP in order to enable / disable the remote peer to remotely control our PC . @param cp call peer that will stop controlling on local computer . @param enables True to enable remote peer to gain remote control on our PC . False Otherwise .
public void modifyRemoteControl(CallPeer cp, boolean enables)
    {
        CallPeerJabberImpl callPeer = (CallPeerJabberImpl) cp;
        synchronized(callPeers)
        {
            if(callPeers.contains(callPeer.getAddressAsJid()) != enables)
            {
                if(isRemoteControlAvailable(callPeer))
                {
                    if(logger.isInfoEnabled())
                        logger.info("Enables remote control: " + enables);
                    InputEvtIQ inputIQ = new InputEvtIQ();
                    if(enables)
                    {
                        inputIQ.setAction(InputEvtAction.START);
                    }
                    else
                    {
                        inputIQ.setAction(InputEvtAction.STOP);
                    }
                    inputIQ.setType(IQ.Type.set);
                    inputIQ.setFrom(parentProvider.getOurJID());
                    inputIQ.setTo(callPeer.getAddressAsJid());
                    Stanza p = null;
                    try
                    {
                        StanzaCollector collector = parentProvider
                            .getConnection()
                            .createStanzaCollectorAndSend(inputIQ);
                        try
                        {
                            p = collector.nextResult();
                        }
                        finally
                        {
                            collector.cancel();
                        }
                    }
                    catch (InterruptedException | NotConnectedException e)
                    {
                        logger.error("Could not set remote control status", e);
                    }
                    if(enables)
                    {
                        receivedResponseToIqStart(callPeer, p);
                    }
                    else
                    {
                        receivedResponseToIqStop(callPeer, p);
                    }
                }
            }
        }
    }
public void modifyRemoteControl ( CallPeer cp , boolean enables ) { CallPeerJabberImpl callPeer = ( CallPeerJabberImpl ) cp ; synchronized ( callPeers ) { if ( callPeers . contains ( callPeer . getAddressAsJid ( ) ) != enables ) { if ( isRemoteControlAvailable ( callPeer ) ) { if ( logger . isInfoEnabled ( ) ) logger . info ( "Enables remote control: " + enables ) ; InputEvtIQ inputIQ = new InputEvtIQ ( ) ; if ( enables ) { inputIQ . setAction ( InputEvtAction . START ) ; } else { inputIQ . setAction ( InputEvtAction . STOP ) ; } inputIQ . setType ( IQ . Type . set ) ; inputIQ . setFrom ( parentProvider . getOurJID ( ) ) ; inputIQ . setTo ( callPeer . getAddressAsJid ( ) ) ; Stanza p = null ; try { StanzaCollector collector = parentProvider . getConnection ( ) . createStanzaCollectorAndSend ( inputIQ ) ; try { p = collector . nextResult ( ) ; } finally { collector . cancel ( ) ; } } catch ( InterruptedException | NotConnectedException e ) { logger . error ( "Could not set remote control status" , e ) ; } if ( enables ) { receivedResponseToIqStart ( callPeer , p ) ; } else { receivedResponseToIqStop ( callPeer , p ) ; } } } } }
Sends IQ InputEvent START or STOP in order to enable/disable the remote
 peer to remotely control our PC.
Sends IQ InputEvent START or STOP in order to enable / disable the remote peer to remotely control our PC .