1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// 7zUpdate.h 2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __7Z_UPDATE_H 4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __7Z_UPDATE_H 5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zCompressionMode.h" 7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zIn.h" 8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zOut.h" 9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../IArchive.h" 11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 12baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace NArchive { 13baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace N7z { 14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 15baa3858d3f5d128a5c8466b700098109edcad5f2repo syncstruct CUpdateItem 16baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 17baa3858d3f5d128a5c8466b700098109edcad5f2repo sync int IndexInArchive; 18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync int IndexInClient; 19baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 CTime; 21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 ATime; 22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 MTime; 23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 Size; 25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UString Name; 26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt32 Attrib; 28baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool NewData; 30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool NewProps; 31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool IsAnti; 33baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool IsDir; 34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool AttribDefined; 36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool CTimeDefined; 37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool ATimeDefined; 38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool MTimeDefined; 39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool HasStream() const { return !IsDir && !IsAnti && Size != 0; } 41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CUpdateItem(): 43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync IsAnti(false), 44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync IsDir(false), 45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync AttribDefined(false), 46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CTimeDefined(false), 47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ATimeDefined(false), 48baa3858d3f5d128a5c8466b700098109edcad5f2repo sync MTimeDefined(false) 49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync {} 50baa3858d3f5d128a5c8466b700098109edcad5f2repo sync void SetDirStatusFromAttrib() { IsDir = ((Attrib & FILE_ATTRIBUTE_DIRECTORY) != 0); }; 51baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync int GetExtensionPos() const; 53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UString GetExtension() const; 54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 56baa3858d3f5d128a5c8466b700098109edcad5f2repo syncstruct CUpdateOptions 57baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{ 58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const CCompressionMethodMode *Method; 59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const CCompressionMethodMode *HeaderMethod; 60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool UseFilters; 61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool MaxFilter; 62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 63baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CHeaderOptions HeaderOptions; 64baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 65baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 NumSolidFiles; 66baa3858d3f5d128a5c8466b700098109edcad5f2repo sync UInt64 NumSolidBytes; 67baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool SolidExtension; 68baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool RemoveSfxBlock; 69baa3858d3f5d128a5c8466b700098109edcad5f2repo sync bool VolumeMode; 70baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}; 71baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 72baa3858d3f5d128a5c8466b700098109edcad5f2repo syncHRESULT Update( 73baa3858d3f5d128a5c8466b700098109edcad5f2repo sync DECL_EXTERNAL_CODECS_LOC_VARS 74baa3858d3f5d128a5c8466b700098109edcad5f2repo sync IInStream *inStream, 75baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const CArchiveDatabaseEx *db, 76baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const CObjectVector<CUpdateItem> &updateItems, 77baa3858d3f5d128a5c8466b700098109edcad5f2repo sync COutArchive &archive, 78baa3858d3f5d128a5c8466b700098109edcad5f2repo sync CArchiveDatabase &newDatabase, 79baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ISequentialOutStream *seqOutStream, 80baa3858d3f5d128a5c8466b700098109edcad5f2repo sync IArchiveUpdateCallback *updateCallback, 81baa3858d3f5d128a5c8466b700098109edcad5f2repo sync const CUpdateOptions &options 82baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #ifndef _NO_CRYPTO 83baa3858d3f5d128a5c8466b700098109edcad5f2repo sync , ICryptoGetTextPassword *getDecoderPassword 84baa3858d3f5d128a5c8466b700098109edcad5f2repo sync #endif 85baa3858d3f5d128a5c8466b700098109edcad5f2repo sync ); 86baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}} 87baa3858d3f5d128a5c8466b700098109edcad5f2repo sync 88baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif 89