Module: Jabber::FileTransfer::TransferSource
- Included in:
- FileSource
- Defined in:
- lib/xmpp4r/bytestreams/helper/filetransfer.rb
Overview
The TransferSource is an interface (Mix-in) which sources for FileTransfer#offer should include
Instance Method Summary collapse
-
#can_range? ⇒ Boolean
Does implement the methods seek and length= ?.
-
#date ⇒ Object
Date of the offered file, can be nil.
-
#filename ⇒ Object
Filename of the offered file.
-
#length=(l) ⇒ Object
Set the amount of data to send for ranged transfers.
-
#md5 ⇒ Object
MD5-Sum of the offered file, can be nil.
-
#mime ⇒ Object
Mime-type of the offered file, can be nil.
-
#read(length = nil) ⇒ Object
Read a chunk from the source.
-
#seek(position) ⇒ Object
Seek in the source for ranged transfers.
-
#size ⇒ Object
Size of the offered file.
Instance Method Details
#can_range? ⇒ Boolean
Does implement the methods seek and length= ?
FileTransfer will only then offer a ranged transfer.
- result
- false
-
or [true]
59 60 61 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 59 def can_range? false end |
#date ⇒ Object
Date of the offered file, can be nil
36 37 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 36 def date end |
#filename ⇒ Object
Filename of the offered file
20 21 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 20 def filename end |
#length=(l) ⇒ Object
Set the amount of data to send for ranged transfers
52 53 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 52 def length=(l) end |
#md5 ⇒ Object
MD5-Sum of the offered file, can be nil
32 33 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 32 def md5 end |
#mime ⇒ Object
Mime-type of the offered file, can be nil
24 25 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 24 def mime end |
#read(length = nil) ⇒ Object
Read a chunk from the source
If this is a ranged transfer, it should implement length checking
- length
- Fixnum
44 45 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 44 def read(length=nil) end |
#seek(position) ⇒ Object
Seek in the source for ranged transfers
48 49 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 48 def seek(position) end |
#size ⇒ Object
Size of the offered file
28 29 |
# File 'lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 28 def size end |