• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

DirectoryDeltaTransfer.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 #include "NativeFeatureIncludes.h"
00010 #if _RAKNET_SUPPORT_DirectoryDeltaTransfer==1
00011 
00012 #ifndef __DIRECTORY_DELTA_TRANSFER_H
00013 #define __DIRECTORY_DELTA_TRANSFER_H
00014 
00015 #include "RakMemoryOverride.h"
00016 #include "RakNetTypes.h"
00017 #include "Export.h"
00018 #include "PluginInterface2.h"
00019 #include "DS_Map.h"
00020 #include "PacketPriority.h"
00021 
00022 class RakPeerInterface;
00023 class FileList;
00024 struct Packet;
00025 struct InternalPacket;
00026 struct DownloadRequest;
00027 class FileListTransfer;
00028 class FileListTransferCBInterface;
00029 class FileListProgress;
00030 class IncrementalReadInterface;
00031 
00036 
00052 
00053 class RAK_DLL_EXPORT DirectoryDeltaTransfer : public PluginInterface2
00054 {
00055 public:
00056         // Constructor
00057         DirectoryDeltaTransfer();
00058 
00059         // Destructor
00060         virtual ~DirectoryDeltaTransfer();
00061 
00065         void SetFileListTransferPlugin(FileListTransfer *flt);
00066 
00069         void SetApplicationDirectory(const char *pathToApplication);
00070 
00074         void SetUploadSendParameters(PacketPriority _priority, char _orderingChannel);
00075 
00081         void AddUploadsFromSubdirectory(const char *subdir);
00082 
00098         unsigned short DownloadFromSubdirectory(const char *subdir, const char *outputSubdir, bool prependAppDirToOutputSubdir, SystemAddress host, FileListTransferCBInterface *onFileCallback, PacketPriority _priority, char _orderingChannel, FileListProgress *cb);
00099 
00101         void ClearUploads(void);
00102 
00105         unsigned GetNumberOfFilesForUpload(void) const;
00106 
00111         void SetCompressOutgoingSends(bool compress);
00112 
00117         void SetDownloadRequestIncrementalReadInterface(IncrementalReadInterface *_incrementalReadInterface, unsigned int _chunkSize);
00118         
00120         virtual PluginReceiveResult OnReceive(Packet *packet);
00121 protected:
00122         void OnDownloadRequest(Packet *packet);
00123 
00124         char applicationDirectory[512];
00125         FileListTransfer *fileListTransfer;
00126         FileList *availableUploads;
00127         PacketPriority priority;
00128         char orderingChannel;
00129         bool compressOutgoingSends;
00130         IncrementalReadInterface *incrementalReadInterface;
00131         unsigned int chunkSize;
00132 };
00133 
00134 #endif
00135 
00136 #endif // _RAKNET_SUPPORT_*

Generated on Thu Sep 30 2010 01:27:22 for RakNet by  doxygen 1.7.1