gbin/err — pull request #295 by gbin (2014-08-29 17:54:33+00:00)
Title: Implemented a file transfer API

This allows users to exchange streams / files with the bot.

1 callback is used to warn the plugins of an incoming transfer:
def callback_stream(self, stream)
where stream is a file-like object with extra controls and feedback for the transfer

There is a multicasting mecanism if several plugins claim the file (imagine a file server plugin and an antivirus plugin for example).

1 function has been added to the botplugin contract to allow outgoing transfers:
def send_stream_request(self, user, fsource, name=None, size=None, stream_type=None)

on which you specify a user to send the file to, fsource is a file-like object, name is an optional filename, size an optional known size and stream_type an optional mime_type of the content.

There is a rough first implementation on Tox that works. Contributions are welcome for the other backends !