Add implementation of onFileSending and onFileReceiving events.
Merge remote-tracking branch 'origin/master' into riversyang