1// UpdateProduce.h 2 3#ifndef ZIP7_INC_UPDATE_PRODUCE_H 4#define ZIP7_INC_UPDATE_PRODUCE_H 5 6#include "UpdatePair.h" 7 8struct CUpdatePair2 9{ 10 bool NewData; 11 bool NewProps; 12 bool UseArcProps; // if (UseArcProps && NewProps), we want to change only some properties. 13 bool IsAnti; // if (!IsAnti) we use other ways to detect Anti status 14 15 int DirIndex; 16 int ArcIndex; 17 int NewNameIndex; 18 19 bool IsMainRenameItem; 20 bool IsSameTime; 21 22 void SetAs_NoChangeArcItem(unsigned arcIndex) // int 23 { 24 NewData = NewProps = false; 25 UseArcProps = true; 26 IsAnti = false; 27 ArcIndex = (int)arcIndex; 28 } 29 30 bool ExistOnDisk() const { return DirIndex != -1; } 31 bool ExistInArchive() const { return ArcIndex != -1; } 32 33 CUpdatePair2(): 34 NewData(false), 35 NewProps(false), 36 UseArcProps(false), 37 IsAnti(false), 38 DirIndex(-1), 39 ArcIndex(-1), 40 NewNameIndex(-1), 41 IsMainRenameItem(false), 42 IsSameTime(false) 43 {} 44}; 45 46Z7_PURE_INTERFACES_BEGIN 47 48DECLARE_INTERFACE(IUpdateProduceCallback) 49{ 50 virtual HRESULT ShowDeleteFile(unsigned arcIndex) = 0; 51}; 52Z7_PURE_INTERFACES_END 53 54void UpdateProduce( 55 const CRecordVector<CUpdatePair> &updatePairs, 56 const NUpdateArchive::CActionSet &actionSet, 57 CRecordVector<CUpdatePair2> &operationChain, 58 IUpdateProduceCallback *callback); 59 60#endif 61