module Jabber::FileTransfer::TransferSource

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

Public Instance Methods

can_range?() click to toggle source

Does implement the methods seek and length= ?

FileTransfer will only then offer a ranged transfer.

result
false

or [true]

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 58
def can_range?
  false
end
date() click to toggle source

Date of the offered file, can be nil

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 35
def date
end
filename() click to toggle source

Filename of the offered file

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 19
def filename
end
length=(l) click to toggle source

Set the amount of data to send for ranged transfers

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 51
def length=(l)
end
md5() click to toggle source

MD5-Sum of the offered file, can be nil

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 31
def md5
end
mime() click to toggle source

Mime-type of the offered file, can be nil

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 23
def mime
end
read(length=nil) click to toggle source

Read a chunk from the source

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

length
Fixnum
# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 43
def read(length=nil)
end
seek(position) click to toggle source

Seek in the source for ranged transfers

# File lib/xmpp4r/bytestreams/helper/filetransfer.rb, line 47
def seek(position)
end
size() click to toggle source

Size of the offered file

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