#include <DirectoryDeltaTransfer.h>
Inheritance diagram for DirectoryDeltaTransfer:
Public Member Functions | |
DirectoryDeltaTransfer () | |
Constructor. | |
~DirectoryDeltaTransfer () | |
Destructor. | |
void | SetFileListTransferPlugin (FileListTransfer *flt) |
void | SetApplicationDirectory (const char *pathToApplication) |
void | SetUploadSendParameters (PacketPriority _priority, char _orderingChannel) |
void | AddUploadsFromSubdirectory (const char *subdir) |
unsigned short | DownloadFromSubdirectory (const char *subdir, const char *outputSubdir, bool prependAppDirToOutputSubdir, PlayerID host, FileListTransferCBInterface *onFileCallback, PacketPriority _priority, char _orderingChannel) |
void | ClearUploads (void) |
Clear all allowed uploads previously set with AddUploadsFromSubdirectory. | |
unsigned | GetNumberOfFilesForUpload (void) const |
virtual void | OnAttach (RakPeerInterface *peer) |
virtual void | Update (RakPeerInterface *peer) |
virtual PluginReceiveResult | OnReceive (RakPeerInterface *peer, Packet *packet) |
virtual void | OnDisconnect (RakPeerInterface *peer) |
Protected Member Functions | |
void | OnDownloadRequest (RakPeerInterface *peer, Packet *packet) |
Protected Attributes | |
char | applicationDirectory [512] |
FileListTransfer * | fileListTransfer |
FileList * | availableUploads |
RakPeerInterface * | rakPeer |
PacketPriority | priority |
char | orderingChannel |
|
Add all files in the specified subdirectory recursively subdir is appended to pathToApplication in SetApplicationDirectory(). All files in the resultant directory and subdirectories are then hashed so that users can download them.
|
|
Downloads files from the matching parameter subdir in AddUploadsFromSubdirectory. subdir must contain all starting characters in subdir in AddUploadsFromSubdirectory Therefore, AddUploadsFromSubdirectory("Levels/Level1/"); would allow you to download using DownloadFromSubdirectory("Levels/Level1/Textures/"... but it would NOT allow you to download from DownloadFromSubdirectory("Levels/"... or DownloadFromSubdirectory("Levels/Level2/"...
|
|
Returns how many files are available for upload
|
|
Called when the interface is attached
Reimplemented from PluginInterface. |
|
Called when RakPeer is shutdown
Reimplemented from PluginInterface. |
|
OnReceive is called for every packet.
Reimplemented from PluginInterface. |
|
Set the local root directory to base all file uploads and downloads off of.
|
|
This plugin has a dependency on the FileListTransfer plugin, which it uses to actually send the files. So you need an instance of that plugin registered with RakPeerInterface, and a pointer to that interface should be passed here.
|
|
What parameters to use for the RakPeerInterface::Send() call when uploading files.
|
|
Update is called every time a packet is checked for .
Reimplemented from PluginInterface. |