Inherits FileListTransferCBInterface.
Public Member Functions | |
DDTCallback () | |
virtual | ~DDTCallback () |
virtual bool | OnFile (OnFileStruct *onFileStruct) |
Got a file. | |
virtual void | OnFileProgress (FileProgressStruct *fps) |
Got part of a big file internally in RakNet. | |
virtual bool | OnDownloadComplete (void) |
Called when the download is completed. | |
Public Attributes | |
unsigned | subdirLen |
char | outputSubdir [512] |
FileListTransferCBInterface * | onFileCallback |
Definition at line 19 of file DirectoryDeltaTransfer.cpp.
DDTCallback::DDTCallback | ( | ) | [inline] |
Definition at line 19 of file DirectoryDeltaTransfer.cpp.
virtual DDTCallback::~DDTCallback | ( | ) | [inline, virtual] |
Definition at line 20 of file DirectoryDeltaTransfer.cpp.
virtual bool DDTCallback::OnDownloadComplete | ( | void | ) | [inline, virtual] |
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.
Reimplemented from FileListTransferCBInterface.
Definition at line 52 of file DirectoryDeltaTransfer.cpp.
virtual bool DDTCallback::OnFile | ( | OnFileStruct * | onFileStruct | ) | [inline, virtual] |
Got a file.
This structure is only valid for the duration of this function call.
Implements FileListTransferCBInterface.
Definition at line 22 of file DirectoryDeltaTransfer.cpp.
virtual void DDTCallback::OnFileProgress | ( | FileProgressStruct * | fps | ) | [inline, virtual] |
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.
Implements FileListTransferCBInterface.
Definition at line 38 of file DirectoryDeltaTransfer.cpp.
Definition at line 17 of file DirectoryDeltaTransfer.cpp.
char DDTCallback::outputSubdir[512] |
Definition at line 16 of file DirectoryDeltaTransfer.cpp.
unsigned DDTCallback::subdirLen |
Definition at line 15 of file DirectoryDeltaTransfer.cpp.