public class IncomingFileTransferRequestJabberImpl extends java.lang.Object implements IncomingFileTransferRequest
Constructor and Description |
---|
IncomingFileTransferRequestJabberImpl(ProtocolProviderServiceJabberImpl jabberProvider,
OperationSetFileTransferJabberImpl fileTransferOpSet,
org.jivesoftware.smackx.filetransfer.FileTransferRequest fileTransferRequest)
Creates an IncomingFileTransferRequestJabberImpl based on the
given fileTransferRequest, coming from the Jabber protocol.
|
Modifier and Type | Method and Description |
---|---|
FileTransfer |
acceptFile(java.io.File file)
Accepts the file and starts the transfer.
|
void |
createThumbnailListeners(java.lang.String cid)
Sets the thumbnail content-ID.
|
java.lang.String |
getFileDescription()
Returns the description of the file corresponding to this request.
|
java.lang.String |
getFileName()
Returns the name of the file corresponding to this request.
|
long |
getFileSize()
Returns the size of the file corresponding to this request.
|
java.lang.String |
getID()
The unique id.
|
Contact |
getSender()
Returns the Contact making this request.
|
byte[] |
getThumbnail()
Returns the thumbnail contained in this request.
|
void |
rejectFile()
Refuses the file transfer request.
|
public IncomingFileTransferRequestJabberImpl(ProtocolProviderServiceJabberImpl jabberProvider, OperationSetFileTransferJabberImpl fileTransferOpSet, org.jivesoftware.smackx.filetransfer.FileTransferRequest fileTransferRequest)
jabberProvider
- the protocol providerfileTransferOpSet
- file transfer operation setfileTransferRequest
- the request coming from the Jabber protocolpublic Contact getSender()
getSender
in interface IncomingFileTransferRequest
public java.lang.String getFileDescription()
getFileDescription
in interface IncomingFileTransferRequest
public java.lang.String getFileName()
getFileName
in interface IncomingFileTransferRequest
public long getFileSize()
getFileSize
in interface IncomingFileTransferRequest
public FileTransfer acceptFile(java.io.File file)
acceptFile
in interface IncomingFileTransferRequest
file
- the file to acceptfalse
if the transfer fails,
true
otherwisepublic void rejectFile()
rejectFile
in interface IncomingFileTransferRequest
public java.lang.String getID()
getID
in interface IncomingFileTransferRequest
public byte[] getThumbnail()
getThumbnail
in interface IncomingFileTransferRequest
public void createThumbnailListeners(java.lang.String cid)
cid
- the thumbnail content-ID
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.