src/net/java/sip/communicator/impl/protocol/jabber/OperationSetFileTransferJabberImpl.java
/**
         * Listens for file transfer packets.
         * @param packet packet to be processed
         */
Listens for file transfer packets.
@param packet packet to be processed
Listens for file transfer packets . @param packet packet to be processed
@Override
        public void fileTransferRequest(final FileTransferRequest request)
        {
            logger.info("Incoming XMPP file transfer request");
            IncomingFileTransferRequestJabberImpl incomingFileTransferRequest
                = new IncomingFileTransferRequestJabberImpl(
                        jabberProvider,
                        OperationSetFileTransferJabberImpl.this,
                        request);
            boolean isThumbnailedFile = false;
            StreamInitiation si = getStreamInitiation(request);
            if (si != null)
            {
                StreamInitiation.File file = si.getFile();
                if (file instanceof ThumbnailFile)
                {
                    Thumbnail thumbnail = ((ThumbnailFile)file).getThumbnail();
                    if (thumbnail != null)
                    {
                        isThumbnailedFile = true;
                        incomingFileTransferRequest
                            .fetchThumbnailAndNotify(thumbnail.getCid());
                    }
                }
            }
            if (!isThumbnailedFile)
            {
                fireFileTransferRequest(incomingFileTransferRequest);
            }
        }
@ Override public void fileTransferRequest ( final FileTransferRequest request ) { logger . info ( "Incoming XMPP file transfer request" ) ; IncomingFileTransferRequestJabberImpl incomingFileTransferRequest = new IncomingFileTransferRequestJabberImpl ( jabberProvider , OperationSetFileTransferJabberImpl . this , request ) ; boolean isThumbnailedFile = false ; StreamInitiation si = getStreamInitiation ( request ) ; if ( si != null ) { StreamInitiation . File file = si . getFile ( ) ; if ( file instanceof ThumbnailFile ) { Thumbnail thumbnail = ( ( ThumbnailFile ) file ) . getThumbnail ( ) ; if ( thumbnail != null ) { isThumbnailedFile = true ; incomingFileTransferRequest . fetchThumbnailAndNotify ( thumbnail . getCid ( ) ) ; } } } if ( ! isThumbnailedFile ) { fireFileTransferRequest ( incomingFileTransferRequest ) ; } }
Listens for file transfer packets.
Listens for file transfer packets .
// Create a global incoming file transfer request. // Send a thumbnail request if a thumbnail is advertised in the // streamInitiation packet. // Notify the global listener that a request has arrived.