Module: Jabber::FileTransfer::TransferSource

Module | Jabber::FileTransfer::TransferSource
In: | lib/xmpp4r/bytestreams/helper/filetransfer.rb

The TransferSource is an interface (Mix-in) which sources for FileTransfer#offer should include

### Methods

can_range? date filename length= md5 mime read seek size

### Public Instance methods

can_range?()

Does implement the methods seek and length= ?

FileTransfer will only then offer a ranged transfer.

result: | [false] or [true]

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 58
    58:       def can_range?
    59:         false
    60:       end

date()

Date of the offered file, can be nil

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 35
    35:       def date
    36:       end

filename()

Filename of the offered file

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 19
    19:       def filename
    20:       end

length=(l)

Set the amount of data to send for ranged transfers

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 51
    51:       def length=(l)
    52:       end

md5()

MD5-Sum of the offered file, can be nil

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 31
    31:       def md5
    32:       end

mime()

Mime-type of the offered file, can be nil

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 23
    23:       def mime
    24:       end

read(length=nil)

Read a chunk from the source

If this is a ranged transfer, it should implement length checking

length: | [Fixnum]

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 43
    43:       def read(length=nil)
    44:       end

seek(position)

Seek in the source for ranged transfers

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 47
    47:       def seek(position)
    48:       end

size()

Size of the offered file

[Source]

        # File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 27
    27:       def size
    28:       end

[Validate]