Public Member Functions
|virtual bool||OnFile (OnFileStruct *onFileStruct)=0|
|Got a file. |
|virtual void||OnFileProgress (FileProgressStruct *fps)=0|
|Got part of a big file internally in RakNet. |
|virtual bool||Update (void)|
|Called while the handler is active by FileListTransfer. |
|virtual bool||OnDownloadComplete (DownloadCompleteStruct *dcs)|
|Called when the download is completed. |
|virtual void||OnDereference (void)|
|This function is called when this instance is about to be dereferenced by the FileListTransfer plugin. |
You get the last file when fileIndex==numberOfFilesInThisSet
|virtual void RakNet::FileListTransferCBInterface::OnDereference||(||void||)||
This function is called when this instance is about to be dereferenced by the FileListTransfer plugin.
Update will no longer be called. It will will be deleted automatically if true was passed to FileListTransfer::SetupReceive::deleteHandler Otherwise it is up to you to delete it yourself.
|virtual bool RakNet::FileListTransferCBInterface::OnDownloadComplete||(||DownloadCompleteStruct *||dcs||)||
Called when the download is completed.
If you are finished with this class, return false. At that point OnDereference will be called and the class will no longer be maintained by the FileListTransfer plugin. Otherwise return true, and Update will continue to be called.
|virtual bool RakNet::FileListTransferCBInterface::OnFile||(||OnFileStruct *||onFileStruct||)||
Got a file.
This structure is only valid for the duration of this function call.
|virtual void RakNet::FileListTransferCBInterface::OnFileProgress||(||FileProgressStruct *||fps||)||
Got part of a big file internally in RakNet.
This is called in one of two circumstances: Either the transport layer is returning ID_PROGRESS_NOTIFICATION, or you got a block via IncrementalReadInterface If the transport layer is returning ID_PROGRESS_NOTIFICATION (see RakPeer::SetSplitMessageProgressInterval()) then FileProgressStruct::iriDataChunk will be 0. If this is a block via IncrementalReadInterface, then iriDataChunk will point to the block just downloaded. If not using IncrementalReadInterface, then you only care about partCount and partTotal to tell how far the download has progressed. YOu can use firstDataChunk to read the first part of the file if desired. The file is usable when you get the OnFile callback. If using IncrementalReadInterface and you let RakNet buffer the files in memory (default), then it is the same as above. The file is usable when you get the OnFile callback. If using IncrementalReadInterface and you do not let RakNet buffer the files in memory, then set allocateIrIDataChunkAutomatically to false. Write the file to disk whenever you get OnFileProgress and iriDataChunk is not 0, and ignore OnFile.
|virtual bool RakNet::FileListTransferCBInterface::Update||(||void||)||