1 // ZipUpdate.h 2 3 #ifndef __ZIP_UPDATE_H 4 #define __ZIP_UPDATE_H 5 6 #include "../../ICoder.h" 7 #include "../IArchive.h" 8 9 #include "../../Common/CreateCoder.h" 10 11 #include "ZipCompressionMode.h" 12 #include "ZipIn.h" 13 14 namespace NArchive { 15 namespace NZip { 16 17 /* 18 struct CUpdateRange 19 { 20 UInt64 Position; 21 UInt64 Size; 22 23 // CUpdateRange() {}; 24 CUpdateRange(UInt64 position, UInt64 size): Position(position), Size(size) {}; 25 }; 26 */ 27 28 struct CUpdateItem 29 { 30 bool NewData; 31 bool NewProps; 32 bool IsDir; 33 bool NtfsTimeIsDefined; 34 bool IsUtf8; 35 // bool IsAltStream; 36 int IndexInArc; 37 unsigned IndexInClient; 38 UInt32 Attrib; 39 UInt32 Time; 40 UInt64 Size; 41 AString Name; 42 CByteBuffer Name_Utf; // for Info-Zip (kIzUnicodeName) Extra 43 CByteBuffer Comment; 44 // bool Commented; 45 // CUpdateRange CommentRange; 46 FILETIME Ntfs_MTime; 47 FILETIME Ntfs_ATime; 48 FILETIME Ntfs_CTime; 49 ClearCUpdateItem50 void Clear() 51 { 52 IsDir = false; 53 NtfsTimeIsDefined = false; 54 IsUtf8 = false; 55 // IsAltStream = false; 56 Size = 0; 57 Name.Empty(); 58 Name_Utf.Free(); 59 Comment.Free(); 60 } 61 CUpdateItemCUpdateItem62 CUpdateItem(): 63 IsDir(false), 64 NtfsTimeIsDefined(false), 65 IsUtf8(false), 66 // IsAltStream(false), 67 Size(0) 68 {} 69 }; 70 71 HRESULT Update( 72 DECL_EXTERNAL_CODECS_LOC_VARS 73 const CObjectVector<CItemEx> &inputItems, 74 CObjectVector<CUpdateItem> &updateItems, 75 ISequentialOutStream *seqOutStream, 76 CInArchive *inArchive, bool removeSfx, 77 const CCompressionMethodMode &compressionMethodMode, 78 IArchiveUpdateCallback *updateCallback); 79 80 }} 81 82 #endif 83