vendredi 11 juillet 2008

Update

In the last check in, many things were changed, added or modified.

First the OperationSetFileTransfer:
In this class, two methods were added (addFileTranserListener and removeFileTransferListener). Then, we can add or remove listener of file transfer easily from a file transfer listener vector. Furthermore, in order to triggered events, I have added a fireFileTransferEvent function. Therefore, we can fire the FileTransferEvent method when we need. The FileTransferEvent are defined in …/service/protocol/event.

We have for the moment (it could change in the future) 7 events:
o FileTransferCancelEvent -> when the user cancel the file being transfered
o FileTransferDoneEvent -> when the file has been correctly received
o FileTransferFailEvent -> when the file transfer operation has failed
o FileTransferNegotiationEvent -> when we have began talking to the other side
o FileTransferPerformingEvent -> when we start transferring files
o FileTransferProgressEvent -> notify the progress of a file being transferred
o FileTransferWaitingEvent -> notify that we are not yet connected

Furthermore, I have created a new plugin. In this plugin I have 4 classes:
o FileTransferActivator -> which activate our filetransfer plugin
o FileTransferDialog -> which is the main GUI of the fileTransfer. This class will be improved.
o FileTransferProtocolListener -> which implement ServiceListener and RegistrationStateChangeListener. Thanks to this class, we can add or remove FileTransfListener when a RegistrationStateChange occured.
o FileSendingListener -> this class implements the FileTransfListener in order to get the Events which are fired in the OperationSetFileTransfer.

Presently, we can only see the file transfer’s progress in the console. But I can't get the fileTransferDialog in the plugin (FileTransferListener.java). The problem is that when I add a new fileTransferDialog or a method on an instance of a fileTransferDialog, I can't get fileTransferEvents anymore…

Aucun commentaire: