1 // UpdateProduce.h 2 3 #ifndef __UPDATE_PRODUCE_H 4 #define __UPDATE_PRODUCE_H 5 6 #include "UpdatePair.h" 7 8 struct 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 SetAs_NoChangeArcItemCUpdatePair222 void SetAs_NoChangeArcItem(unsigned arcIndex) // int 23 { 24 NewData = NewProps = false; 25 UseArcProps = true; 26 IsAnti = false; 27 ArcIndex = (int)arcIndex; 28 } 29 ExistOnDiskCUpdatePair230 bool ExistOnDisk() const { return DirIndex != -1; } ExistInArchiveCUpdatePair231 bool ExistInArchive() const { return ArcIndex != -1; } 32 CUpdatePair2CUpdatePair233 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 46 struct IUpdateProduceCallback 47 { 48 virtual HRESULT ShowDeleteFile(unsigned arcIndex) = 0; 49 }; 50 51 void UpdateProduce( 52 const CRecordVector<CUpdatePair> &updatePairs, 53 const NUpdateArchive::CActionSet &actionSet, 54 CRecordVector<CUpdatePair2> &operationChain, 55 IUpdateProduceCallback *callback); 56 57 #endif 58