1 // TarUpdate.h 2 3 #ifndef ZIP7_INC_TAR_UPDATE_H 4 #define ZIP7_INC_TAR_UPDATE_H 5 6 #include "../IArchive.h" 7 8 #include "TarItem.h" 9 10 namespace NArchive { 11 namespace NTar { 12 13 struct CUpdateItem 14 { 15 int IndexInArc; 16 unsigned IndexInClient; 17 UInt64 Size; 18 // Int64 MTime; 19 UInt32 Mode; 20 bool NewData; 21 bool NewProps; 22 bool IsDir; 23 bool DeviceMajor_Defined; 24 bool DeviceMinor_Defined; 25 UInt32 UID; 26 UInt32 GID; 27 UInt32 DeviceMajor; 28 UInt32 DeviceMinor; 29 AString Name; 30 AString User; 31 AString Group; 32 33 CPaxTimes PaxTimes; 34 CUpdateItemCUpdateItem35 CUpdateItem(): 36 Size(0), 37 IsDir(false), 38 DeviceMajor_Defined(false), 39 DeviceMinor_Defined(false), 40 UID(0), 41 GID(0) 42 {} 43 }; 44 45 46 struct CUpdateOptions 47 { 48 UINT CodePage; 49 unsigned UtfFlags; 50 bool PosixMode; 51 CBoolPair Write_MTime; 52 CBoolPair Write_ATime; 53 CBoolPair Write_CTime; 54 CTimeOptions TimeOptions; 55 }; 56 57 58 HRESULT UpdateArchive(IInStream *inStream, ISequentialOutStream *outStream, 59 const CObjectVector<CItemEx> &inputItems, 60 const CObjectVector<CUpdateItem> &updateItems, 61 const CUpdateOptions &options, 62 IArchiveUpdateCallback *updateCallback); 63 64 HRESULT GetPropString(IArchiveUpdateCallback *callback, UInt32 index, PROPID propId, AString &res, 65 UINT codePage, unsigned utfFlags, bool convertSlash); 66 67 HRESULT Prop_To_PaxTime(const NWindows::NCOM::CPropVariant &prop, CPaxTime &pt); 68 69 void Get_AString_From_UString(const UString &s, AString &res, 70 UINT codePage, unsigned utfFlags); 71 72 }} 73 74 #endif 75