src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopSharingServerSipImpl.java
/**
             * Populates a specific <tt>Request</tt> instance with the headers
             * common to dialog-creating <tt>Request</tt>s and ones sent inside
             * existing dialogs and specific to the general event package
             * subscription functionality that this instance and a specific
             * <tt>Subscription</tt> represent.
             *
             * @param req the <tt>Request</tt> instance to be populated with
             * common headers and ones specific to the event package of a
             * specific <tt>Subscription</tt>
             * @param subscription the <tt>Subscription</tt> which is to be
             * described in the specified <tt>Request</tt> i.e. its properties
             * are to be used to populate the specified <tt>Request</tt>
             * @param expires the subscription duration to be set into the
             * Expires header of the specified SUBSCRIBE <tt>Request</tt>
             * @throws OperationFailedException if we fail parsing or populating
             * the subscription request.
             */
Populates a specific Request instance with the headers
common to dialog-creating Requests and ones sent inside
existing dialogs and specific to the general event package
subscription functionality that this instance and a specific
Subscription represent.

@param req the Request instance to be populated with
common headers and ones specific to the event package of a
specific Subscription
@param subscription the Subscription which is to be
described in the specified Request i.e. its properties
are to be used to populate the specified Request
@param expires the subscription duration to be set into the
Expires header of the specified SUBSCRIBE Request
@throws OperationFailedException if we fail parsing or populating
the subscription request.
Populates a specific Request instance with the headers common to dialog - creating Requests and ones sent inside existing dialogs and specific to the general event package subscription functionality that this instance and a specific Subscription represent . @param req the Request instance to be populated with common headers and ones specific to the event package of a specific Subscription @param subscription the Subscription which is to be described in the specified Request i . e . its properties are to be used to populate the specified Request @param expires the subscription duration to be set into the Expires header of the specified SUBSCRIBE Request @throws OperationFailedException if we fail parsing or populating the subscription request .
@Override
            protected void populateSubscribeRequest(
                Request req,
                Subscription subscription,
                int expires)
                throws
                OperationFailedException
            {
                super.populateSubscribeRequest(req, subscription, expires);
                RemoteControlSubscriberSubscription
                    rControlSubs = (RemoteControlSubscriberSubscription)subscription;
                if(rControlSubs.callPeer.getCall()
                        instanceof DesktopSharingCallSipImpl)
                {
                    try
                    {
                        Header dssidHeader = parentProvider.getHeaderFactory()
                            .createHeader(
                                DesktopSharingCallSipImpl.DSSID_HEADER,
                                ((DesktopSharingCallSipImpl)rControlSubs
                                    .callPeer.getCall())
                                    .getDesktopSharingSessionID());
                        req.setHeader(dssidHeader);
                    }
                    catch(ParseException ex)
                    {
                        logger.error("error ", ex);
                    }
                }
            }
@ Override protected void populateSubscribeRequest ( Request req , Subscription subscription , int expires ) throws OperationFailedException { super . populateSubscribeRequest ( req , subscription , expires ) ; RemoteControlSubscriberSubscription rControlSubs = ( RemoteControlSubscriberSubscription ) subscription ; if ( rControlSubs . callPeer . getCall ( ) instanceof DesktopSharingCallSipImpl ) { try { Header dssidHeader = parentProvider . getHeaderFactory ( ) . createHeader ( DesktopSharingCallSipImpl . DSSID_HEADER , ( ( DesktopSharingCallSipImpl ) rControlSubs . callPeer . getCall ( ) ) . getDesktopSharingSessionID ( ) ) ; req . setHeader ( dssidHeader ) ; } catch ( ParseException ex ) { logger . error ( "error " , ex ) ; } } }
Populates a specific <tt>Request</tt> instance with the headers
 common to dialog-creating <tt>Request</tt>s and ones sent inside
 existing dialogs and specific to the general event package
 subscription functionality that this instance and a specific
 <tt>Subscription</tt> represent.
Populates a specific <tt > Request< / tt > instance with the headers common to dialog - creating <tt > Request< / tt > s and ones sent inside existing dialogs and specific to the general event package subscription functionality that this instance and a specific <tt > Subscription< / tt > represent .
// add DSSID for subscribe if needed, if out of dialog // desktop control is enabled