Module: Jabber::FileTransfer::TransferSource
- Included in:
- FileSource
- Defined in:
- lib/gems/xmpp4r-0.4/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]
58 59 60 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 58 def can_range? false end |
#date ⇒ Object
Date of the offered file, can be nil
35 36 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 35 def date end |
#filename ⇒ Object
Filename of the offered file
19 20 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 19 def filename end |
#length=(l) ⇒ Object
Set the amount of data to send for ranged transfers
51 52 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 51 def length=(l) end |
#md5 ⇒ Object
MD5-Sum of the offered file, can be nil
31 32 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 31 def md5 end |
#mime ⇒ Object
Mime-type of the offered file, can be nil
23 24 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 23 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
43 44 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 43 def read(length=nil) end |
#seek(position) ⇒ Object
Seek in the source for ranged transfers
47 48 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 47 def seek(position) end |
#size ⇒ Object
Size of the offered file
27 28 |
# File 'lib/gems/xmpp4r-0.4/lib/xmpp4r/bytestreams/helper/filetransfer.rb', line 27 def size end |