![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: compressedFileTransport.h,v $ $Revision: 1.11 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00012 #ifndef DtCompressedFileTransporter_H_ 00013 #define DtCompressedFileTransporter_H_ 00014 00015 #include <vlutil/vlInetFileTransport.h> 00016 00019 #include <map> 00020 00021 typedef std::pair <int, DtInetFileTransportObject*> FileObject_Pair; 00022 00023 #include "vrfutil/vrfutilDefines.h" 00024 class DT_DLL_vrfutil DtCompressedFileTransporter : public DtInetFileTransporter 00025 { 00026 public: 00027 00035 DtCompressedFileTransporter( 00036 int port = 3000, 00037 bool findFirstAvailable = false, 00038 int portRangeToTry = 100, 00039 int compressionLevel = 9); 00040 00042 virtual ~DtCompressedFileTransporter(); 00043 00044 protected: 00047 virtual void receiveFile(DtInetTcpSocket* sock); 00048 00054 virtual bool readFileToBuffer(std::ifstream& inFile, 00055 std::vector<char>& fileBuffer, int fileLengthInBytes, int& retBufLen, 00056 DtInetFileTransportFlags& flags); 00057 00059 virtual void finishFile(DtInetFileTransportObject& object); 00060 00061 private: 00062 DtCompressedFileTransporter(const DtCompressedFileTransporter&); 00063 DtCompressedFileTransporter& operator=(const DtCompressedFileTransporter&); 00064 00065 protected: 00066 int myCompressionLevel; 00067 }; 00068 00069 #endif //! DtCompressedFileTransporter_H_ 00070 00071